Skip to content

Commit

Permalink
Fix player state is not delivered to Playback.
Browse files Browse the repository at this point in the history
  • Loading branch information
eneim committed Jun 5, 2021
1 parent 57d54d9 commit 01e4661
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kohii-core/src/main/java/kohii/v1/core/Interfaces.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ class PlayerEventListeners : CopyOnWriteArraySet<Player.Listener>(), Player.List
override fun onPlayWhenReadyChanged(playWhenReady: Boolean, reason: Int): Unit =
forEach { it.onPlayWhenReadyChanged(playWhenReady, reason) }

// Keep this to deliver the events to Playback.
override fun onPlayerStateChanged(playWhenReady: Boolean, playbackState: Int) {
forEach { it.onPlayerStateChanged(playWhenReady, playbackState) }
}

override fun onVideoSizeChanged(videoSize: VideoSize): Unit =
forEach { it.onVideoSizeChanged(videoSize) }

Expand Down

0 comments on commit 01e4661

Please sign in to comment.