mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-05-29 21:10:24 +02:00
Resolving wakelock on play interuptions
This commit is contained in:
parent
8964dc68f0
commit
9b48664de4
@ -1857,7 +1857,7 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handlePlayChanged(playing: Boolean) {
|
private fun c(playing: Boolean) {
|
||||||
Logger.i(TAG, "handlePlayChanged(playing=$playing)")
|
Logger.i(TAG, "handlePlayChanged(playing=$playing)")
|
||||||
|
|
||||||
val ad = StateCasting.instance.activeDevice;
|
val ad = StateCasting.instance.activeDevice;
|
||||||
|
@ -629,6 +629,7 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onPlay
|
||||||
override fun onPlaybackStateChanged(playbackState: Int) {
|
override fun onPlaybackStateChanged(playbackState: Int) {
|
||||||
Logger.v(TAG, "onPlaybackStateChanged $playbackState");
|
Logger.v(TAG, "onPlaybackStateChanged $playbackState");
|
||||||
updatePlayPause()
|
updatePlayPause()
|
||||||
|
@ -100,6 +100,15 @@ abstract class FutoVideoPlayerBase : RelativeLayout {
|
|||||||
private var _toResume = false;
|
private var _toResume = false;
|
||||||
|
|
||||||
private val _playerEventListener = object: Player.Listener {
|
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.
|
//TODO: Figure out why this is deprecated, and what the alternative is.
|
||||||
override fun onPlaybackStateChanged(playbackState: Int) {
|
override fun onPlaybackStateChanged(playbackState: Int) {
|
||||||
super.onPlaybackStateChanged(playbackState)
|
super.onPlaybackStateChanged(playbackState)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user