diff --git a/src/assets/languages.ts b/src/assets/languages.ts index a25a04ad..15dff819 100644 --- a/src/assets/languages.ts +++ b/src/assets/languages.ts @@ -84,7 +84,7 @@ export const locales = { ko, sl, ta, - "zh-HANT": zhhant, + "zh-Hant": zhhant, is, ru, gl, diff --git a/src/components/player/internals/MediaSession.tsx b/src/components/player/internals/MediaSession.tsx index 1dc7e737..73594793 100644 --- a/src/components/player/internals/MediaSession.tsx +++ b/src/components/player/internals/MediaSession.tsx @@ -32,6 +32,9 @@ export function MediaSession() { const updatePositionState = useCallback( (position: number) => { + // If the browser doesn't support setPositionState, return + if (typeof navigator.mediaSession.setPositionState !== "function") return; + // If the updated position needs to be buffered, queue an update if (position > data.progress.buffered) { shouldUpdatePositionState.current = true; diff --git a/vercel.json b/vercel.json index c4639dd2..6ed1f7c3 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,10 @@ { - "routes": [{ "src": "/[^.]+", "dest": "/", "status": 200 }], + "rewrites": [ + { + "source": "/(.*)", + "destination": "/" + } + ], "headers": [ { "source": "/(.*)",