Class BaseVideoAdSessionManager

  • All Implemented Interfaces:
    com.inmobi.media.ads.common.omid.base.AdSessionManagerInterface , com.inmobi.media.ads.common.omid.base.ClickEventAdSessionInterface , com.inmobi.media.ads.common.omid.base.DisplayAdEventsInterface , com.inmobi.media.ads.common.omid.base.VideoAdEventsInterface

    
    public abstract class BaseVideoAdSessionManager
    extends AdSessionManager
                        

    Abstract base class for managing OMID ad sessions specifically for video advertisements.

    This class extends AdSessionManager to provide specialized functionality for video ads, implementing comprehensive video event tracking and lifecycle management. It handles both skippable and non-skippable video ads, creating appropriate VastProperties configurations for each type. The class processes various video events including playback state changes, quartile progress, completion, and error conditions.

    The implementation ensures proper OMID compliance for video ad measurement by converting internal VideoEvent instances to their corresponding OMID MediaEvents API calls. All operations are executed on the main thread using coroutines for thread safety.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit nonSkippableVideoAdLoaded(Boolean isAutoPlay) Registers the non-skippable video ad load event.
      Unit skippableVideoAdLoaded(Float skipOffset, Boolean isAutoPlay) Registers the skippable video ad load event.
      Unit trackAdVideoEvent(VideoEvent videoEvent) Tracks a video ad event during playback.
      • Methods inherited from class com.inmobi.media.ads.common.omid.manager.AdSessionManager

        addObstruction, initializeAdSession, isSessionActive, registerAdView, registerImpression, removeObstruction, startAdSession, stopAdSession, stopAdSessionFromMain, trackAdUserInteractionEvent
      • Methods inherited from class com.inmobi.media.ads.common.omid.base.DisplayAdEventsInterface

        displayAdLoaded
      • Methods inherited from class java.lang.Object

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

      • BaseVideoAdSessionManager

        BaseVideoAdSessionManager(CoroutineScope coroutineScope, InMobiLogger logger)
        Parameters:
        coroutineScope - The CoroutineScope used for managing coroutine-based operations
    • Method Detail

      • nonSkippableVideoAdLoaded

         Unit nonSkippableVideoAdLoaded(Boolean isAutoPlay)

        Registers the non-skippable video ad load event.

        Parameters:
        isAutoPlay - indicates if ad starts after load.
      • skippableVideoAdLoaded

         Unit skippableVideoAdLoaded(Float skipOffset, Boolean isAutoPlay)

        Registers the skippable video ad load event.

        Parameters:
        skipOffset - indicates the skip offset.
        isAutoPlay - indicates if ad starts after load.
      • trackAdVideoEvent

         Unit trackAdVideoEvent(VideoEvent videoEvent)

        Tracks a video ad event during playback.

        This method should be called to report various video playback events such as start, pause, resume, quartile progress, completion, etc. These events are crucial for video ad measurement and verification.

        Parameters:
        videoEvent - The VideoEvent representing the specific video playback event