aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/players/Raw.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/players/Raw.hx')
-rw-r--r--src/client/players/Raw.hx19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/client/players/Raw.hx b/src/client/players/Raw.hx
index 3f69958..5c5b7a4 100644
--- a/src/client/players/Raw.hx
+++ b/src/client/players/Raw.hx
@@ -67,7 +67,7 @@ class Raw implements IPlayer {
callback({
duration: video.duration,
title: title,
- subs: subs
+ subs: subs,
});
}
Utils.prepend(playerEl, video);
@@ -115,6 +115,7 @@ class Raw implements IPlayer {
}
video.onpause = player.onPause;
video.onratechange = player.onRateChange;
+ if (!main.isAutoplayAllowed()) video.muted = true;
playerEl.appendChild(video);
}
if (isHls) initHlsSource(video, url);
@@ -185,6 +186,10 @@ class Raw implements IPlayer {
video.pause();
}
+ public function isPaused():Bool {
+ return video.paused;
+ }
+
public function getTime():Float {
return video.currentTime;
}
@@ -200,4 +205,16 @@ class Raw implements IPlayer {
public function setPlaybackRate(rate:Float):Void {
video.playbackRate = rate;
}
+
+ public function getVolume():Float {
+ return video.volume;
+ }
+
+ public function setVolume(volume:Float):Void {
+ video.volume = volume;
+ }
+
+ public function unmute():Void {
+ video.muted = false;
+ }
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage