Exit fullscreen when song ends
This commit is contained in:
1 parent
23f5709c68
commit
9cbf96564f
1 file changed
+2
@@ -1,6 +1,7 @@
|
|||||||
import { Howl } from "howler"
|
import { Howl } from "howler"
|
||||||
|
|
||||||
export default defineNuxtPlugin((nuxtApp) => {
|
export default defineNuxtPlugin((nuxtApp) => {
|
||||||
|
const { close: closeFullscreen } = useFullscreen()
|
||||||
const VOLUME_STORAGE_KEY = "music-v2-player-volume"
|
const VOLUME_STORAGE_KEY = "music-v2-player-volume"
|
||||||
const DEFAULT_VOLUME = 0.5
|
const DEFAULT_VOLUME = 0.5
|
||||||
|
|
||||||
@@ -117,6 +118,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|||||||
sound.value?.volume(storedVolume.value)
|
sound.value?.volume(storedVolume.value)
|
||||||
},
|
},
|
||||||
onend: () => {
|
onend: () => {
|
||||||
|
void closeFullscreen()
|
||||||
next()
|
next()
|
||||||
stopTracking()
|
stopTracking()
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user