Package com.my.target

Class InstreamResearch

  • All Implemented Interfaces:

    
    public class InstreamResearch
    extends BaseAd
                        

    Component for tracking video playback and visibility.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void load() Method responsible for loading data.
      static InstreamResearch newResearch(int slotId, int duration, @NonNull() Context context) The static constructor of the object.
      void registerPlayerView(@NonNull() View v) Method for registering the View in which the creative will be displayed.
      void setListener(@Nullable() InstreamResearch.InstreamResearchListener listener) Method for setting the listener.
      void trackFullscreen(boolean fullscreen) Method for tracking full screen mode on / off.
      void trackMute(boolean mute) A method for tracking sound on / off.
      void trackPause() Method for pause tracking.
      void trackProgress(float progress) Method for tracking video progress.
      void trackResume() Method for tracking unpause.
      void unregisterPlayerView() Method for deregistering View, clears references to View.
      • Methods inherited from class com.my.target.common.BaseAd

        getCustomParams, getTag, getWebFormClient, setAdNetworkConfig, setTag, setWebFormClient
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • load

         void load()

        Method responsible for loading data. In case of successful loading, the onLoad method will be called on the object passed as a listener, in case of loading error or lack of data - the onNoData method (see InstreamResearchListener). Listener must be added before loading

      • newResearch

        @NonNull() static InstreamResearch newResearch(int slotId, int duration, @NonNull() Context context)

        The static constructor of the object.

        Parameters:
        slotId - slot number
        duration - creative length in seconds.
        context - application context
        Returns:

        InstreamResearch object

      • registerPlayerView

         void registerPlayerView(@NonNull() 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
      • trackFullscreen

         void trackFullscreen(boolean fullscreen)

        Method for tracking full screen mode on / off.

        Parameters:
        fullscreen - flag to enable / disable fullscreen mode
      • trackMute

         void trackMute(boolean mute)

        A method for tracking sound on / off.

        Parameters:
        mute - enable / disable sound flag
      • trackPause

         void trackPause()

        Method for pause tracking. If the trackProgress method has never been called before, statistics will not be sent

      • trackProgress

         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
      • trackResume

         void trackResume()

        Method for tracking unpause. If the video is not paused, nothing will be sent

      • unregisterPlayerView

         void unregisterPlayerView()

        Method for deregistering View, clears references to View.