chore: Update screen.orientation.lock usage for autoOrientation plugin

This commit is contained in:
Harvey Zack committed 2024-06-01 07:11:53 +08:00
1 parent 574bb14643
commit d86840749b
3 files changed
+5 -5

No files matched your search

@@ -44,7 +44,7 @@ export default function autoOrientation(art) {
(videoWidth < videoHeight && viewWidth > viewHeight)
) {
const oppositeOrientation = lastOrientation.startsWith('portrait') ? 'landscape' : 'portrait';
await screen.orientation.lock(oppositeOrientation);
await screen.orientation.lock?.(oppositeOrientation);
addClass($player, 'art-auto-orientation-fullscreen');
}
} else {