mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-20 03:24:50 +00:00
Resolving wakelock on play interuptions
This commit is contained in:
parent
8964dc68f0
commit
9b48664de4
3 changed files with 11 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -629,6 +629,7 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onPlay
|
||||
override fun onPlaybackStateChanged(playbackState: Int) {
|
||||
Logger.v(TAG, "onPlaybackStateChanged $playbackState");
|
||||
updatePlayPause()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue