expose trigger resize method

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 760f76ec16
commit 3089b1ae8c
4 changed files with 13 additions and 5 deletions

View File

@@ -64,6 +64,13 @@
`scale(${Math.min(widthScale, heightScale)})` + 'translate(-50%, -50%)';
};
export const triggerResize = () => {
updateScale(replayer.wrapper, {
width: replayer.iframe.offsetWidth,
height: replayer.iframe.offsetHeight,
});
};
export const toggleFullscreen = () => {
if (player) {
isFullscreen() ? exitFullscreen() : openFullscreen(player);