resize iframe if view width is smaller than frame

This commit is contained in:
vance 2024-05-02 21:38:36 -07:00
parent 36a8e9ce60
commit a307c5f743

View File

@ -153,8 +153,8 @@
// resize iframe if view width is smaller than frame
if (document.getElementById('live').width > vw) {
document.getElementById('live').width = vw;
document.getElementById('live').height = vw * (9 / 16);
document.getElementById('live').setAttribute('width', vw + 'px');
document.getElementById('live').setAttribute('height', vw * (9 / 16) + 'px');
}
// check if stream active every 5 seconds