aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/players/Youtube.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-03-02 20:17:31 +0300
committerRblSb <msrblsb@gmail.com>2020-03-02 20:17:31 +0300
commit5975bccc39f941044649d0ba72f43e5340396c66 (patch)
tree3adfec93e9acc2568bcbfdcae230a2196b684c7c /src/client/players/Youtube.hx
parent22aa8b4a4a0ec8bf6c082e75858b2c2803b1904c (diff)
Fix youtube player control
Diffstat (limited to 'src/client/players/Youtube.hx')
-rw-r--r--src/client/players/Youtube.hx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/players/Youtube.hx b/src/client/players/Youtube.hx
index 39328e0..4307514 100644
--- a/src/client/players/Youtube.hx
+++ b/src/client/players/Youtube.hx
@@ -137,13 +137,13 @@ class Youtube implements IPlayer {
modestbranding: 1,
rel: 0,
showinfo: 0,
+ start: 0
},
events: {
- // onReady: e -> player.onCanBePlayed(),
+ onReady: e -> isLoaded = true,
onStateChange: e -> {
switch (e.data) {
case UNSTARTED:
- isLoaded = true;
player.onCanBePlayed();
case ENDED:
case PLAYING:
@@ -161,7 +161,7 @@ class Youtube implements IPlayer {
public function removeVideo():Void {
if (video == null) return;
- playerEl.removeChild(video);
+ if (playerEl.contains(video)) playerEl.removeChild(video);
video = null;
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage