diff --git a/src/providers/song-info-front.ts b/src/providers/song-info-front.ts index 90891e58..b203a556 100644 --- a/src/providers/song-info-front.ts +++ b/src/providers/song-info-front.ts @@ -5,6 +5,7 @@ import type { GetState } from '@/types/datahost-get-state'; import type { VideoDataChangeValue } from '@/types/player-api-events'; import type { SongInfo } from './song-info'; +import type { VideoDataChanged } from '@/types/video-data-changed'; let songInfo: SongInfo = {} as SongInfo; export const getSongInfo = () => songInfo; @@ -107,7 +108,7 @@ export default (api: YoutubePlayer) => { const waitingEvent = new Set(); // Name = "dataloaded" and abit later "dataupdated" api.addEventListener('videodatachange', (name: string, videoData) => { - document.dispatchEvent(new CustomEvent('videodatachange', { detail: { name, videoData } })); + document.dispatchEvent(new CustomEvent('videodatachange', { detail: { name, videoData } })); if (name === 'dataupdated' && waitingEvent.has(videoData.videoId)) { waitingEvent.delete(videoData.videoId);