|
@@ -19,6 +19,7 @@ import { Song } from "@/types/song.js";
|
|
|
import { useWebsocketsStore } from "@/stores/websockets";
|
|
|
import { useModalsStore } from "@/stores/modals";
|
|
|
import { useEditSongStore } from "@/stores/editSong";
|
|
|
+import { useStationStore } from "@/stores/station";
|
|
|
|
|
|
const FloatingBox = defineAsyncComponent(
|
|
|
() => import("@/components/FloatingBox.vue")
|
|
@@ -55,6 +56,7 @@ const emit = defineEmits([
|
|
|
]);
|
|
|
|
|
|
const editSongStore = useEditSongStore(props);
|
|
|
+const stationStore = useStationStore();
|
|
|
const { socket } = useWebsocketsStore();
|
|
|
|
|
|
const modalsStore = useModalsStore();
|
|
@@ -203,6 +205,8 @@ const {
|
|
|
setPlaybackRate
|
|
|
} = editSongStore;
|
|
|
|
|
|
+const { updateMediaModalPlayingAudio } = stationStore;
|
|
|
+
|
|
|
const showTab = payload => {
|
|
|
if (tabs.value[`${payload}-tab`])
|
|
|
tabs.value[`${payload}-tab`].scrollIntoView({ block: "nearest" });
|
|
@@ -336,6 +340,7 @@ const unloadSong = (_youtubeId, songId?) => {
|
|
|
songDeleted.value = false;
|
|
|
stopVideo();
|
|
|
pauseVideo(true);
|
|
|
+ updateMediaModalPlayingAudio(false);
|
|
|
resetSong(_youtubeId);
|
|
|
thumbnailNotSquare.value = false;
|
|
|
thumbnailWidth.value = null;
|
|
@@ -427,6 +432,7 @@ const drawCanvas = () => {
|
|
|
|
|
|
const seekTo = position => {
|
|
|
pauseVideo(false);
|
|
|
+ updateMediaModalPlayingAudio(true);
|
|
|
video.value.player.seekTo(position);
|
|
|
};
|
|
|
|
|
@@ -464,6 +470,7 @@ const init = () => {
|
|
|
) {
|
|
|
stopVideo();
|
|
|
pauseVideo(true);
|
|
|
+ updateMediaModalPlayingAudio(false);
|
|
|
drawCanvas();
|
|
|
}
|
|
|
if (
|
|
@@ -600,6 +607,7 @@ const init = () => {
|
|
|
if (song.value.duration > youtubeDuration + 1) {
|
|
|
stopVideo();
|
|
|
pauseVideo(true);
|
|
|
+ updateMediaModalPlayingAudio(false);
|
|
|
return new Toast(
|
|
|
"Video can't play. Specified duration is bigger than the YouTube song duration."
|
|
|
);
|
|
@@ -607,6 +615,7 @@ const init = () => {
|
|
|
if (song.value.duration <= 0) {
|
|
|
stopVideo();
|
|
|
pauseVideo(true);
|
|
|
+ updateMediaModalPlayingAudio(false);
|
|
|
return new Toast(
|
|
|
"Video can't play. Specified duration has to be more than 0 seconds."
|
|
|
);
|
|
@@ -951,16 +960,20 @@ const settings = type => {
|
|
|
case "stop":
|
|
|
stopVideo();
|
|
|
pauseVideo(true);
|
|
|
+ updateMediaModalPlayingAudio(false);
|
|
|
break;
|
|
|
case "hardStop":
|
|
|
hardStopVideo();
|
|
|
pauseVideo(true);
|
|
|
+ updateMediaModalPlayingAudio(false);
|
|
|
break;
|
|
|
case "pause":
|
|
|
pauseVideo(true);
|
|
|
+ updateMediaModalPlayingAudio(false);
|
|
|
break;
|
|
|
case "play":
|
|
|
pauseVideo(false);
|
|
|
+ updateMediaModalPlayingAudio(true);
|
|
|
break;
|
|
|
case "skipToLast10Secs":
|
|
|
seekTo(song.value.duration - 10 + song.value.skipDuration);
|