Update Player.svelte: fix the bug. (#1028)

The progress bar and controls now can be displayed under the fullscreen mode.
This commit is contained in:
Majia0712
2022-10-18 01:15:43 +11:00
committed by GitHub
parent ae643f4c48
commit 2286c11912

View File

@@ -59,8 +59,7 @@
const scale = [widthScale, heightScale];
if (maxScale) scale.push(maxScale);
el.style.transform =
`scale(${Math.min(...scale)})` +
'translate(-50%, -50%)';
`scale(${Math.min(...scale)})` + 'translate(-50%, -50%)';
};
export const triggerResize = () => {
@@ -168,7 +167,8 @@
_width = width;
_height = height;
width = player.offsetWidth;
height = player.offsetHeight;
height =
player.offsetHeight - (showController ? controllerHeight : 0);
updateScale(replayer.wrapper, {
width: replayer.iframe.offsetWidth,
height: replayer.iframe.offsetHeight,
@@ -229,6 +229,7 @@
{speedOption}
{skipInactive}
{tags}
on:fullscreen={() => toggleFullscreen()} />
on:fullscreen={() => toggleFullscreen()}
/>
{/if}
</div>