diff --git a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt index a80b1aab..ed6a6c8e 100644 --- a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt +++ b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt @@ -1857,7 +1857,7 @@ class VideoDetailView : ConstraintLayout { } } - private fun handlePlayChanged(playing: Boolean) { + private fun c(playing: Boolean) { Logger.i(TAG, "handlePlayChanged(playing=$playing)") val ad = StateCasting.instance.activeDevice; diff --git a/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayer.kt b/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayer.kt index b93af720..f5ab5137 100644 --- a/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayer.kt +++ b/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayer.kt @@ -629,6 +629,7 @@ class FutoVideoPlayer : FutoVideoPlayerBase { } } + override fun onPlay override fun onPlaybackStateChanged(playbackState: Int) { Logger.v(TAG, "onPlaybackStateChanged $playbackState"); updatePlayPause() diff --git a/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayerBase.kt b/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayerBase.kt index 0239fe69..eda60133 100644 --- a/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayerBase.kt +++ b/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayerBase.kt @@ -100,6 +100,15 @@ abstract class FutoVideoPlayerBase : RelativeLayout { private var _toResume = false; private val _playerEventListener = object: Player.Listener { + override fun onPlaybackSuppressionReasonChanged(playbackSuppressionReason: Int) { + super.onPlaybackSuppressionReasonChanged(playbackSuppressionReason) + } + + override fun onIsPlayingChanged(isPlaying: Boolean) { + super.onIsPlayingChanged(isPlaying); + updatePlaying(); + } + //TODO: Figure out why this is deprecated, and what the alternative is. override fun onPlaybackStateChanged(playbackState: Int) { super.onPlaybackStateChanged(playbackState)