Class HtmlPlayerVideoExperience
-
- All Implemented Interfaces:
public final class HtmlPlayerVideoExperience
-
-
Constructor Summary
Constructors Constructor Description HtmlPlayerVideoExperience(Context context, CoroutineScope coroutineScope, Player exoPlayer, Boolean muted, MutableSharedFlow<VideoEvent> playerEventsFlow)
-
Method Summary
Modifier and Type Method Description final UnitonVideoResume()final UnitonVideoPause()final BooleanisPlayerMuted()final JobrequestAudioFocusAndUnMuteOrMutePlayer()Requests audio focus and unmutes the player if focus is granted, otherwise mutes it. final UnitabandonAudioFocusAndMutePlayer()Mutes the media player and abandons audio focus. final UnitunMuteMediaPlayer()Unmutes the ExoPlayer and updates the UI to show the unmute button. final UnitmuteMediaPlayer()Mutes the ExoPlayer and updates the UI to show the mute button. final Unitdestroy()Releases resources to prevent memory leaks. -
-
Constructor Detail
-
HtmlPlayerVideoExperience
HtmlPlayerVideoExperience(Context context, CoroutineScope coroutineScope, Player exoPlayer, Boolean muted, MutableSharedFlow<VideoEvent> playerEventsFlow)
-
-
Method Detail
-
onVideoResume
final Unit onVideoResume()
-
onVideoPause
final Unit onVideoPause()
-
isPlayerMuted
final Boolean isPlayerMuted()
-
requestAudioFocusAndUnMuteOrMutePlayer
final Job requestAudioFocusAndUnMuteOrMutePlayer()
Requests audio focus and unmutes the player if focus is granted, otherwise mutes it.
-
abandonAudioFocusAndMutePlayer
final Unit abandonAudioFocusAndMutePlayer()
Mutes the media player and abandons audio focus.
-
unMuteMediaPlayer
final Unit unMuteMediaPlayer()
Unmutes the ExoPlayer and updates the UI to show the unmute button.
-
muteMediaPlayer
final Unit muteMediaPlayer()
Mutes the ExoPlayer and updates the UI to show the mute button.
-
-
-
-