Class NativeMRC50VideoManager

    • 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
      Flow<Unit> registerForTracking() Registers for MRC 50% video viewability tracking.
      Unit destroy() Destroys the viewability manager and releases all associated resources.
      • Methods inherited from class java.lang.Object

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

      • NativeMRC50VideoManager

        NativeMRC50VideoManager(VideoMRC50Model videoMRC50Model)
    • Method Detail

      • registerForTracking

         Flow<Unit> registerForTracking()

        Registers for MRC 50% video viewability tracking.

        This function returns a Flow that will emit a single Unit value when the video has met the MRC 50% duration criteria (i.e., played continuously for VideoMRC50Model.minDuration).

        The flow collects video events from VideoMRC50Model.mediaEventFlow:

        Operations within this flow are performed on the Dispatchers.Main thread.

        Returns:

        A Flow that emits Unit when MRC 50% video duration criteria are met.

      • destroy

         Unit destroy()

        Destroys the viewability manager and releases all associated resources.

        This method terminates viewability tracking and performs complete cleanup of all resources including observers, timers, background tasks, and any registered listeners. After calling destroy, the manager should not emit further events and cannot be reused without re-instantiation.