fix win vframe; prevent context menu

This commit is contained in:
feie9456 2025-08-17 17:01:39 +08:00
parent f5cab67ef3
commit 45c275ae4f
4 changed files with 5 additions and 1 deletions

View File

@ -117,6 +117,9 @@ window.addEventListener('pointerdown', () => {
} }
}); });
window.addEventListener('contextmenu', (e) => {
e.preventDefault();
});
const isPortrait = ref(window.innerHeight > window.innerWidth); const isPortrait = ref(window.innerHeight > window.innerWidth);

View File

@ -8,7 +8,8 @@ export async function loadFromResSmartly({ url, rules, onprogress }: {
onprogress?: (progress: { download: number, decode: number }) => void onprogress?: (progress: { download: number, decode: number }) => void
}): Promise<CanvasImageSource[]> { }): Promise<CanvasImageSource[]> {
const isChromium = navigator.userAgent.includes('Chrome') || navigator.userAgent.includes('Chromium'); const isChromium = navigator.userAgent.includes('Chrome') || navigator.userAgent.includes('Chromium');
const useWebCodec = isChromium && 'VideoDecoder' in window; const isWindows = navigator.userAgent.includes('Windows');
const useWebCodec = isChromium && 'VideoDecoder' in window && !isWindows;
const finalType = const finalType =
useWebCodec && url.video ? 'video' : useWebCodec && url.video ? 'video' :

Binary file not shown.

Binary file not shown.