From ece7c650f6bac3a8c024d71d34e5a61da3795d55 Mon Sep 17 00:00:00 2001 From: bivashy Date: Tue, 12 Aug 2025 23:56:52 +0500 Subject: [PATCH] Initial implementation of "Next episode" button in player --- app/components/ui/player/Player.vue | 19 +++++++++++++++++++ app/pages/watch.vue | 23 +++-------------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/app/components/ui/player/Player.vue b/app/components/ui/player/Player.vue index b220fac..21c7e47 100644 --- a/app/components/ui/player/Player.vue +++ b/app/components/ui/player/Player.vue @@ -5,6 +5,7 @@ import Hls from "hls.js"; interface Props { urls: any; id: string; + nextEpisodeButton: boolean; } const props = withDefaults(defineProps(), { @@ -13,6 +14,23 @@ const props = withDefaults(defineProps(), { const emit = defineEmits(['get-instance']) const options = computed(() => { + const controls = [] + if (props.nextEpisodeButton) { + controls.push( + { + name: 'next-episode', + index: 50, + position: 'left', + html: '', + tooltip: 'Next episode', + style: { + color: 'red', + }, + click: function () { + }, + }, + ) + } return { url: props.urls[0].url || '', type: 'm3u8', @@ -30,6 +48,7 @@ const options = computed(() => { autoOrientation: true, autoPlayback: true, id: props.id, + controls: controls, } }) const artplayerRef = ref(); diff --git a/app/pages/watch.vue b/app/pages/watch.vue index e338908..f55ee74 100644 --- a/app/pages/watch.vue +++ b/app/pages/watch.vue @@ -8,7 +8,8 @@

Episode: {{ episode }}

- +
@@ -24,7 +25,7 @@