-
public final class VideoLoaderProject Name: OSMOS-Android-SDK File Name: VideoLoader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classVideoLoader.Companion
-
Constructor Summary
Constructors Constructor Description VideoLoader(CoroutineScope coroutineScope, AdTrackerInterface adTracker)
-
Method Summary
Modifier and Type Method Description final UnitsetViewLoadListener(Function2<Map<String, Object>, String, Unit> listener)Sets a listener to be notified when the ad view is fully loaded. final UnitsetErrorCallback(ErrorCallback callback)Set an error callback to handle errors that occur during video loading or playback. final UnitclearErrorCallback()Clear the error callback to prevent memory leaks. final UnitsafeStopAndReleasePlayer(PlayerView playerView)final Unitpause(PlayerView playerView)final UnitplayExclusive(PlayerView playerView)final UnitsafeReleaseAllPlayers()Safe version of releaseAllPlayers that handles dead thread scenarios -
-
Constructor Detail
-
VideoLoader
VideoLoader(CoroutineScope coroutineScope, AdTrackerInterface adTracker)
-
-
Method Detail
-
setViewLoadListener
final Unit setViewLoadListener(Function2<Map<String, Object>, String, Unit> listener)
Sets a listener to be notified when the ad view is fully loaded.
- Parameters:
listener- Callback receiving the loaded ImageAd and its tracking ID.
-
setErrorCallback
final Unit setErrorCallback(ErrorCallback callback)
Set an error callback to handle errors that occur during video loading or playback.
- Parameters:
callback- Callback that handles error scenarios with structured error information.
-
clearErrorCallback
final Unit clearErrorCallback()
Clear the error callback to prevent memory leaks.
-
safeStopAndReleasePlayer
final Unit safeStopAndReleasePlayer(PlayerView playerView)
-
pause
final Unit pause(PlayerView playerView)
-
playExclusive
final Unit playExclusive(PlayerView playerView)
-
safeReleaseAllPlayers
final Unit safeReleaseAllPlayers()
Safe version of releaseAllPlayers that handles dead thread scenarios
-
-
-
-