From 465e0fcfa198b7c114d3826eeb263a8350e03bfe Mon Sep 17 00:00:00 2001 From: Thibault Nocchi <1619359+ThibaultNocchi@users.noreply.github.com> Date: Tue, 31 Jan 2023 16:11:57 +0100 Subject: [PATCH 1/8] fix: wrong value for user check in URL --- frontend/src/plugins/remote/axios/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/plugins/remote/axios/index.ts b/frontend/src/plugins/remote/axios/index.ts index 053630e66cc..fdf3af8294e 100644 --- a/frontend/src/plugins/remote/axios/index.ts +++ b/frontend/src/plugins/remote/axios/index.ts @@ -28,7 +28,7 @@ class JellyfinInterceptors { } else if ( RemotePluginAuthInstance.currentUser && response.config.url?.includes( - `/Users/${RemotePluginAuthInstance.currentUser}/Items/` + `/Users/${RemotePluginAuthInstance.currentUser?.Id}/Items/` ) ) { response.data = items.add(data); From 0ff3a4ab9093af7e113b4f8ed30ef9fb3f2b5f77 Mon Sep 17 00:00:00 2001 From: Thibault Nocchi <1619359+ThibaultNocchi@users.noreply.github.com> Date: Thu, 2 Feb 2023 11:46:54 +0100 Subject: [PATCH 2/8] fix(mediastreamselector): didn't emit new values & set default audio track --- frontend/src/components/Item/MediaStreamSelector.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Item/MediaStreamSelector.vue b/frontend/src/components/Item/MediaStreamSelector.vue index d16373e191f..76dbd801ea3 100644 --- a/frontend/src/components/Item/MediaStreamSelector.vue +++ b/frontend/src/components/Item/MediaStreamSelector.vue @@ -142,17 +142,23 @@ const trackIndex = ref( ); /** - * Check if Type is Video and trackIndex is -1 then set trackIndex as this.selectItems[0].value + * Check if Type is Video or Audio and trackIndex is -1 then set trackIndex as this.selectItems[0].value */ if ( - props.type === 'Video' && + (props.type === 'Video' || props.type === 'Audio') && trackIndex.value === -1 && selectItems.value[0] !== undefined ) { trackIndex.value = selectItems.value[0].value; } -emits('input', trackIndex.value); +watch( + trackIndex, + (newValue) => { + emits('input', newValue); + }, + { immediate: true } +); watch( () => props.defaultStreamIndex, From fabf02f1d6d3bdaba61356fe75623d83d52d9f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Tue, 21 Feb 2023 13:21:50 +0100 Subject: [PATCH 3/8] fix music playback starting from the previous time when going to the next track --- frontend/src/store/playbackManager.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/store/playbackManager.ts b/frontend/src/store/playbackManager.ts index 90d05167eb8..dfb11169bb2 100644 --- a/frontend/src/store/playbackManager.ts +++ b/frontend/src/store/playbackManager.ts @@ -743,9 +743,11 @@ class PlaybackManagerStore { ) { state.lastItemIndex = state.currentItemIndex; state.currentItemIndex += 1; + this.currentTime = 0; } else if (state.repeatMode === RepeatMode.RepeatAll) { state.lastItemIndex = state.currentItemIndex; state.currentItemIndex = 0; + this.currentTime = 0; } else { this.stop(); } From b546b7d4874705fe2c27f10bba834656cbfcdb8a Mon Sep 17 00:00:00 2001 From: Thibault Nocchi <1619359+ThibaultNocchi@users.noreply.github.com> Date: Wed, 1 Feb 2023 10:45:56 +0100 Subject: [PATCH 4/8] feat: implement new HLS video player + subs + PiP --- frontend/package.json | 6 +- frontend/src/App.vue | 2 +- frontend/src/assets/styles/global.scss | 4 + .../src/components/Buttons/PlayButton.vue | 6 +- .../Buttons/PlaybackSettingsButton.vue | 213 +++++------ .../src/components/Buttons/QueueButton.vue | 264 ++++++-------- .../Buttons/SubtitleSelectionButton.vue | 138 +++----- .../src/components/Buttons/TooltipButton.vue | 26 ++ .../src/components/Playback/OsdPlayer.vue | 330 ++++++++++++++++++ .../components/Playback/PiPVideoPlayer.vue | 106 +++++- .../src/components/Playback/PlayerElement.vue | 189 ++++++++-- frontend/src/composables/index.ts | 1 + frontend/src/composables/use-router.ts | 10 + frontend/src/layouts/default.vue | 14 +- frontend/src/pages/playback/video/index.vue | 94 ++++- frontend/src/store/index.ts | 8 + frontend/src/store/playbackManager.ts | 177 ++++++++-- frontend/src/store/playerElement.ts | 168 +++++++++ frontend/vite.config.ts | 17 + package-lock.json | 259 ++++---------- 20 files changed, 1401 insertions(+), 631 deletions(-) create mode 100644 frontend/src/components/Buttons/TooltipButton.vue create mode 100644 frontend/src/components/Playback/OsdPlayer.vue create mode 100644 frontend/src/composables/use-router.ts create mode 100644 frontend/src/store/playerElement.ts diff --git a/frontend/package.json b/frontend/package.json index fa590274992..dfa6b41197b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,6 +26,7 @@ "vue-i18n-extract-remove": "vue-i18n-extract --remove" }, "dependencies": { + "@jellyfin/libass-wasm": "4.1.1", "@jellyfin/sdk": "0.0.0-unstable.202301101857", "@vueuse/components": "9.12.0", "@vueuse/core": "9.12.0", @@ -36,15 +37,15 @@ "destr": "1.1.1", "dompurify": "2.3.8", "he": "1.2.0", + "hls.js": "1.3.1", "langs": "2.0.0", "lodash-es": "4.17.21", - "screenfull": "6.0.1", "swiper": "9.0.3", "uuid": "9.0.0", "vue": "3.2.39", "vue-i18n": "9.2.2", "vue-router": "4.1.5", - "vuetify": "3.1.2" + "vuetify": "3.1.6" }, "devDependencies": { "@iconify/json": "2.1.104", @@ -85,6 +86,7 @@ "vite": "3.2.2", "vite-plugin-pages": "0.27.1", "vite-plugin-pwa": "0.13.2", + "vite-plugin-static-copy": "0.13.0", "vite-plugin-vue-layouts": "0.7.0", "vue-eslint-parser": "9.1.0", "vue-i18n-extract": "2.0.7", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index d7ea9d9181e..33619239ef3 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -3,6 +3,6 @@ - + diff --git a/frontend/src/assets/styles/global.scss b/frontend/src/assets/styles/global.scss index 5725435cfec..377ccdc15a5 100644 --- a/frontend/src/assets/styles/global.scss +++ b/frontend/src/assets/styles/global.scss @@ -72,6 +72,10 @@ cursor: pointer; } +.cursor-none { + cursor: none; +} + .pointer-events-none { pointer-events: none; } diff --git a/frontend/src/components/Buttons/PlayButton.vue b/frontend/src/components/Buttons/PlayButton.vue index 6c49c5ecfd9..42eb55b11eb 100644 --- a/frontend/src/components/Buttons/PlayButton.vue +++ b/frontend/src/components/Buttons/PlayButton.vue @@ -68,7 +68,7 @@ async function playOrResume(): Promise { await playbackManager.play({ item: props.item, audioTrackIndex: props.audioTrackIndex, - subtitleTrackIndex: props.subtitleTrackIndex || -1, + subtitleTrackIndex: props.subtitleTrackIndex, videoTrackIndex: props.videoTrackIndex, startFromTime: ticksToMs(props.item.UserData?.PlaybackPositionTicks) / 1000 @@ -78,7 +78,7 @@ async function playOrResume(): Promise { await playbackManager.play({ item: props.item, audioTrackIndex: props.audioTrackIndex, - subtitleTrackIndex: props.subtitleTrackIndex || -1, + subtitleTrackIndex: props.subtitleTrackIndex, videoTrackIndex: props.videoTrackIndex, startShuffled: true }); @@ -86,7 +86,7 @@ async function playOrResume(): Promise { await playbackManager.play({ item: props.item, audioTrackIndex: props.audioTrackIndex, - subtitleTrackIndex: props.subtitleTrackIndex || -1, + subtitleTrackIndex: props.subtitleTrackIndex, videoTrackIndex: props.videoTrackIndex }); } diff --git a/frontend/src/components/Buttons/PlaybackSettingsButton.vue b/frontend/src/components/Buttons/PlaybackSettingsButton.vue index 604f56b8d23..863f604e2ba 100644 --- a/frontend/src/components/Buttons/PlaybackSettingsButton.vue +++ b/frontend/src/components/Buttons/PlaybackSettingsButton.vue @@ -1,143 +1,100 @@