File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
android/src/main/java/com/theoplayer Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ private const val ALLOWED_PLAYBACK_ACTIONS = (
5151 PlaybackStateCompat .ACTION_REWIND or
5252 PlaybackStateCompat .ACTION_SET_PLAYBACK_SPEED )
5353
54+ private const val ALLOWED_PLAY_PAUSE_ACTIONS = (
55+ PlaybackStateCompat .ACTION_PLAY_PAUSE or
56+ PlaybackStateCompat .ACTION_PLAY or
57+ PlaybackStateCompat .ACTION_PAUSE )
58+
5459class ReactTHEOplayerContext private constructor(
5560 private val reactContext : ThemedReactContext ,
5661 private val configAdapter : PlayerConfigAdapter
@@ -180,9 +185,7 @@ class ReactTHEOplayerContext private constructor(
180185 val isInAd = player.ads.isPlaying
181186 mediaSessionConnector?.enabledPlaybackActions = when {
182187 // Allow trick-play for live events if configured
183- isLive && mediaSessionConfig.allowLivePlayPause -> ALLOWED_PLAYBACK_ACTIONS xor
184- PlaybackStateCompat .ACTION_FAST_FORWARD xor
185- PlaybackStateCompat .ACTION_REWIND
188+ isLive && mediaSessionConfig.allowLivePlayPause -> ALLOWED_PLAY_PAUSE_ACTIONS
186189 isLive && ! mediaSessionConfig.allowLivePlayPause -> 0
187190 // Do not allow playback actions during ad play-out
188191 isInAd -> 0
You can’t perform that action at this time.
0 commit comments