-
- All Implemented Interfaces:
-
androidx.lifecycle.DefaultLifecycleObserver,androidx.lifecycle.LifecycleObserver
public final class VideoPlayerLifecycleObserver implements DefaultLifecycleObserver
Project Name: OSMOS-Android-SDK File Name: VideoPlayerLifecycleObserver
-
-
Constructor Summary
Constructors Constructor Description VideoPlayerLifecycleObserver(ExoPlayer player, ErrorCallback errorCallback)
-
Method Summary
Modifier and Type Method Description final UnitsetErrorCallback(ErrorCallback callback)Set an error callback to handle errors that occur during lifecycle events. final UnitclearErrorCallback()Clear the error callback to prevent memory leaks. UnitonPause(LifecycleOwner owner)UnitonResume(LifecycleOwner owner)UnitonDestroy(LifecycleOwner owner)-
-
Constructor Detail
-
VideoPlayerLifecycleObserver
VideoPlayerLifecycleObserver(ExoPlayer player, ErrorCallback errorCallback)
-
-
Method Detail
-
setErrorCallback
final Unit setErrorCallback(ErrorCallback callback)
Set an error callback to handle errors that occur during lifecycle events.
- Parameters:
callback- Callback that handles error scenarios with structured error information.
-
clearErrorCallback
final Unit clearErrorCallback()
Clear the error callback to prevent memory leaks.
-
onPause
Unit onPause(LifecycleOwner owner)
-
onResume
Unit onResume(LifecycleOwner owner)
-
onDestroy
Unit onDestroy(LifecycleOwner owner)
-
-
-
-