Package com.my.target

Class InstreamResearch


  • public class InstreamResearch
    extends BaseAd
    Component for tracking video playback and visibility.
    • Method Detail

      • newResearch

        @NonNull
        public static InstreamResearch newResearch​(int slotId,
                                                   int duration,
                                                   @NonNull
                                                   android.content.Context context)
        The static constructor of the object.
        Parameters:
        slotId - slot number
        duration - creative length in seconds. If the length is unknown (for example, streaming content), a value of 0 is acceptable.
        context - application context
        Returns:
        InstreamResearch object
      • registerPlayerView

        public void registerPlayerView​(@NonNull
                                       android.view.View v)
        Method for registering the View in which the creative will be displayed. Visibility statistics will be calculated based on the data for this View.
        Parameters:
        v - view of the creative
      • unregisterPlayerView

        public void unregisterPlayerView()
        Method for deregistering View, clears references to View.
      • trackPause

        public void trackPause()
        Method for pause tracking. If the trackProgress method has never been called before, statistics will not be sent
      • trackResume

        public void trackResume()
        Method for tracking unpause. If the video is not paused, nothing will be sent
      • trackProgress

        public void trackProgress​(float progress)
        Method for tracking video progress. If progress is less than the previous value, then rewind statistics will be sent, tracking MRC statistics will be reset. If two consecutive progress values differ by more than a second, MRC tracking will also be reset.
        Parameters:
        progress - progress in seconds with fractional part
      • trackMute

        public void trackMute​(boolean mute)
        A method for tracking sound on / off.
        Parameters:
        mute - enable / disable sound flag
      • trackFullscreen

        public void trackFullscreen​(boolean fullscreen)
        Method for tracking full screen mode on / off.
        Parameters:
        fullscreen - flag to enable / disable fullscreen mode