mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Made playback speed available while watching a live video (makes sense for historical) and we no longer apply default playback speed when playing a live stream.
This commit is contained in:
+10
-4
@@ -916,7 +916,9 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
if(videoDetail.datetime != null && videoDetail.datetime!! > OffsetDateTime.now())
|
if(videoDetail.datetime != null && videoDetail.datetime!! > OffsetDateTime.now())
|
||||||
UIDialogs.toast(context, "Planned in ${videoDetail.datetime?.toHumanNowDiffString(true)}")
|
UIDialogs.toast(context, "Planned in ${videoDetail.datetime?.toHumanNowDiffString(true)}")
|
||||||
|
|
||||||
_player.setPlaybackRate(Settings.instance.playback.getDefaultPlaybackSpeed());
|
if (!videoDetail.isLive) {
|
||||||
|
_player.setPlaybackRate(Settings.instance.playback.getDefaultPlaybackSpeed());
|
||||||
|
}
|
||||||
|
|
||||||
val video = if(videoDetail is VideoLocal)
|
val video = if(videoDetail is VideoLocal)
|
||||||
videoDetail;
|
videoDetail;
|
||||||
@@ -1381,8 +1383,8 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
?.toList() ?: listOf();
|
?.toList() ?: listOf();
|
||||||
|
|
||||||
_overlay_quality_selector = SlideUpMenuOverlay(this.context, _overlay_quality_container, "Quality", null, true,
|
_overlay_quality_selector = SlideUpMenuOverlay(this.context, _overlay_quality_container, "Quality", null, true,
|
||||||
if (!_isCasting && video?.isLive != true) SlideUpMenuTitle(this.context).apply { setTitle("Playback Rate") } else null,
|
if (!_isCasting) SlideUpMenuTitle(this.context).apply { setTitle("Playback Rate") } else null,
|
||||||
if (!_isCasting && video?.isLive != true) SlideUpMenuButtonList(this.context).apply {
|
if (!_isCasting) SlideUpMenuButtonList(this.context).apply {
|
||||||
setButtons(listOf("0.25", "0.5", "0.75", "1.0", "1.25", "1.5", "1.75", "2.0", "2.25"), _player.getPlaybackRate().toString());
|
setButtons(listOf("0.25", "0.5", "0.75", "1.0", "1.25", "1.5", "1.75", "2.0", "2.25"), _player.getPlaybackRate().toString());
|
||||||
onClick.subscribe { v ->
|
onClick.subscribe { v ->
|
||||||
if (_isCasting) {
|
if (_isCasting) {
|
||||||
@@ -1652,7 +1654,7 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
|
|
||||||
private fun setCastEnabled(isCasting: Boolean) {
|
private fun setCastEnabled(isCasting: Boolean) {
|
||||||
Logger.i(TAG, "setCastEnabled(isCasting=$isCasting)")
|
Logger.i(TAG, "setCastEnabled(isCasting=$isCasting)")
|
||||||
_player.setPlaybackRate(Settings.instance.playback.getDefaultPlaybackSpeed());
|
|
||||||
video?.let { updateQualitySourcesOverlay(it); };
|
video?.let { updateQualitySourcesOverlay(it); };
|
||||||
|
|
||||||
_isCasting = isCasting;
|
_isCasting = isCasting;
|
||||||
@@ -1666,6 +1668,10 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
StateCasting.instance.stopVideo();
|
StateCasting.instance.stopVideo();
|
||||||
_cast.stopTimeJob();
|
_cast.stopTimeJob();
|
||||||
_cast.visibility = View.GONE;
|
_cast.visibility = View.GONE;
|
||||||
|
|
||||||
|
if (video?.isLive == false) {
|
||||||
|
_player.setPlaybackRate(Settings.instance.playback.getDefaultPlaybackSpeed());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user