1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-07-25 03:17:00 +00:00
fcast/receivers/tizen/src/main/Renderer.ts

28 lines
762 B
TypeScript
Raw Normal View History

2025-02-13 17:33:21 -06:00
import 'common/main/Renderer';
const backgroundVideo = document.getElementById('video-player');
const loadingScreen = document.getElementById('loading-screen');
// WebOS 6.0 requires global scope for access during callback invocation
// eslint-disable-next-line no-var
var backgroundVideoLoaded: boolean;
// eslint-disable-next-line no-var
var qrCodeRendered: boolean;
backgroundVideo.onplaying = () => {
backgroundVideoLoaded = true;
if (backgroundVideoLoaded && qrCodeRendered) {
loadingScreen.style.display = 'none';
backgroundVideo.onplaying = null;
}
};
export function onQRCodeRendered() {
qrCodeRendered = true;
if (backgroundVideoLoaded && qrCodeRendered) {
loadingScreen.style.display = 'none';
}
}