From a30cc5643c1e8366d2e8743fbe7c01ce1a468111 Mon Sep 17 00:00:00 2001 From: RblSb Date: Sat, 18 Jan 2025 08:37:21 +0300 Subject: Make raw videos adaptive for aspect ratios Sadly there is no info about video size for iframes, so they will be keeped as 16/9. Let me know if this change breaks anything. --- src/client/players/Iframe.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/players/Iframe.hx') diff --git a/src/client/players/Iframe.hx b/src/client/players/Iframe.hx index 8a2e06e..6614f9d 100644 --- a/src/client/players/Iframe.hx +++ b/src/client/players/Iframe.hx @@ -46,7 +46,6 @@ class Iframe implements IPlayer { public function loadVideo(item:VideoItem):Void { removeVideo(); video = document.createDivElement(); - video.id = "videoplayer"; video.innerHTML = item.url; // actually data if (!isValidIframe(video)) { video = null; @@ -55,6 +54,7 @@ class Iframe implements IPlayer { if (video.firstChild.nodeName == "IFRAME") { video.setAttribute("sandbox", "allow-scripts"); } + video.firstElementChild.id = "videoplayer"; playerEl.appendChild(video); } -- cgit v1.2.3