🐛 修复窗口全屏失效

This commit is contained in:
目棃
2024-08-03 21:37:55 +08:00
parent 5c0d5f50fe
commit 6a39aa127b

View File

@@ -63,6 +63,7 @@ onMounted(async () => {
const width = highestResolution.width;
const height = highestResolution.height;
if (width && height) {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
width > height
? (vodAspectRatio.value = width / height)
: (vodAspectRatio.value = height / width);
@@ -118,7 +119,7 @@ onMounted(async () => {
};
container.value = new Artplayer(option);
container.value?.on("fullscreen", async (state) => {
await TauriWindow.getCurrent().setFullscreen(state);
await TauriWindow.getCurrentWindow().setFullscreen(state);
});
});