mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-09-18 15:32:35 +00:00
remove layout changed listener
Changelog: changed
This commit is contained in:
parent
30c41044da
commit
98b6213886
2 changed files with 9 additions and 10 deletions
|
@ -432,10 +432,6 @@ class VideoDetailView : ConstraintLayout {
|
||||||
showChaptersUI();
|
showChaptersUI();
|
||||||
};
|
};
|
||||||
|
|
||||||
_layoutPlayerContainer.addOnLayoutChangeListener { v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom ->
|
|
||||||
onShouldEnterPictureInPictureChanged.emit()
|
|
||||||
}
|
|
||||||
|
|
||||||
_title.setOnLongClickListener {
|
_title.setOnLongClickListener {
|
||||||
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager;
|
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager;
|
||||||
val clip = ClipData.newPlainText("Video Title", (it as TextView).text);
|
val clip = ClipData.newPlainText("Video Title", (it as TextView).text);
|
||||||
|
@ -1967,6 +1963,10 @@ class VideoDetailView : ConstraintLayout {
|
||||||
videoTrackFormats.distinctBy { it.height }.sortedBy { it.height },
|
videoTrackFormats.distinctBy { it.height }.sortedBy { it.height },
|
||||||
audioTrackFormats.distinctBy { it.bitrate }.sortedBy { it.bitrate });
|
audioTrackFormats.distinctBy { it.bitrate }.sortedBy { it.bitrate });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_layoutPlayerContainer.post {
|
||||||
|
onShouldEnterPictureInPictureChanged.emit()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var _didTriggerDatasourceErrorCount = 0;
|
private var _didTriggerDatasourceErrorCount = 0;
|
||||||
|
@ -2427,7 +2427,6 @@ class VideoDetailView : ConstraintLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
isPlaying = playing;
|
isPlaying = playing;
|
||||||
onShouldEnterPictureInPictureChanged.emit()
|
|
||||||
updateTracker(lastPositionMilliseconds, playing, true);
|
updateTracker(lastPositionMilliseconds, playing, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2559,6 +2558,9 @@ class VideoDetailView : ConstraintLayout {
|
||||||
setProgressBarOverlayed(false);
|
setProgressBarOverlayed(false);
|
||||||
}
|
}
|
||||||
onFullscreenChanged.emit(fullscreen);
|
onFullscreenChanged.emit(fullscreen);
|
||||||
|
_layoutPlayerContainer.post {
|
||||||
|
onShouldEnterPictureInPictureChanged.emit()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setCastEnabled(isCasting: Boolean) {
|
private fun setCastEnabled(isCasting: Boolean) {
|
||||||
|
@ -2832,10 +2834,6 @@ class VideoDetailView : ConstraintLayout {
|
||||||
} else {
|
} else {
|
||||||
_layoutPlayerContainer.setPadding(0, 0, 0, 0);
|
_layoutPlayerContainer.setPadding(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
_layoutPlayerContainer.post {
|
|
||||||
onShouldEnterPictureInPictureChanged.emit()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
fun getPictureInPictureParams() : PictureInPictureParams {
|
fun getPictureInPictureParams() : PictureInPictureParams {
|
||||||
var videoSourceWidth = _player.exoPlayer?.player?.videoSize?.width ?: 0;
|
var videoSourceWidth = _player.exoPlayer?.player?.videoSize?.width ?: 0;
|
||||||
|
|
|
@ -484,7 +484,8 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
||||||
|
|
||||||
fun getVideoRect(): Rect {
|
fun getVideoRect(): Rect {
|
||||||
val r = Rect()
|
val r = Rect()
|
||||||
_videoView.getGlobalVisibleRect(r)
|
// this is the only way i could reliably get a reference to a view that matches perfectly with the video playback
|
||||||
|
_videoView.subtitleView?.getGlobalVisibleRect(r)
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue