diff options
| author | RblSb <msrblsb@gmail.com> | 2025-01-12 19:35:56 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2025-01-12 22:35:22 +0300 |
| commit | f84fdc40ba817b6a2d907484b1e1500197ceeafe (patch) | |
| tree | 73a5b81e082d0ac1741c24742db12e6c2bd54249 /src/client/players/Iframe.hx | |
| parent | 25b7ecb45d43018235c6a8eb5b4ce833f2dec668 (diff) | |
External audiotrack support
This works as voice over if video also has audio, changing video volume to 0.3.
Also improve autoplay by playing videos muted and unmute on first page click.
There is no mute if you use Firefox and allow autoplay on page (navigator.getAutoplayPolicy check).
Diffstat (limited to 'src/client/players/Iframe.hx')
| -rw-r--r-- | src/client/players/Iframe.hx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/client/players/Iframe.hx b/src/client/players/Iframe.hx index e07f814..56cf319 100644 --- a/src/client/players/Iframe.hx +++ b/src/client/players/Iframe.hx @@ -34,7 +34,8 @@ class Iframe implements IPlayer { function isValidIframe(iframe:Element):Bool { if (iframe.children.length != 1) return false; - return (iframe.firstChild.nodeName == "IFRAME" || iframe.firstChild.nodeName == "OBJECT"); + return (iframe.firstChild.nodeName == "IFRAME" + || iframe.firstChild.nodeName == "OBJECT"); } public function loadVideo(item:VideoItem):Void { @@ -66,6 +67,10 @@ class Iframe implements IPlayer { public function pause():Void {} + public function isPaused():Bool { + return false; + } + public function getTime():Float { return 0; } @@ -77,4 +82,12 @@ class Iframe implements IPlayer { } public function setPlaybackRate(rate:Float):Void {} + + public function getVolume():Float { + return 1; + } + + public function setVolume(volume:Float) {} + + public function unmute():Void {} } |
