aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Player.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-06-05 16:39:39 +0300
committerRblSb <msrblsb@gmail.com>2020-06-05 16:39:39 +0300
commit8506b4edcb0a9bb1973bb38fcca4bcdc21e397c1 (patch)
treecbdc7d1d04807df61f15c6ef53b06b3616676f49 /src/client/Player.hx
parent2c22d551877e262740f524da6e2704bec19b46e7 (diff)
More api methods
Diffstat (limited to 'src/client/Player.hx')
-rw-r--r--src/client/Player.hx14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client/Player.hx b/src/client/Player.hx
index 7572673..4de76ce 100644
--- a/src/client/Player.hx
+++ b/src/client/Player.hx
@@ -128,6 +128,20 @@ class Player {
ge("#currenttitle").textContent = item.title;
}
+ public function changeVideoSrc(src:String):Void {
+ if (player == null) return;
+ final item = items[itemPos];
+ if (item == null) return;
+ player.loadVideo({
+ url: src,
+ title: item.title,
+ author: item.author,
+ duration: item.duration,
+ isTemp: item.isTemp,
+ isIframe: item.isIframe
+ });
+ }
+
public function removeVideo():Void {
JsApi.fireVideoRemoveEvents(items[itemPos]);
player.removeVideo();
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage