diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-11-27 16:52:27 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-11-27 16:52:27 -0600 |
| commit | 7ab9d741bfc36e19c703ea208a4d39b3a3c78587 (patch) | |
| tree | 97b9edf6891dadad6e72a4d741e3bcdf702a38d4 | |
| parent | 6540742c76ba1891cdd45988decde18f2c677420 (diff) | |
| download | invidious-7ab9d741bfc36e19c703ea208a4d39b3a3c78587.tar.gz invidious-7ab9d741bfc36e19c703ea208a4d39b3a3c78587.tar.bz2 invidious-7ab9d741bfc36e19c703ea208a4d39b3a3c78587.zip | |
Fix autoplay
| -rw-r--r-- | src/invidious/views/watch.ecr | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 0d6d932b..d3dcb6f8 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -338,14 +338,11 @@ if (bpb) { player.ready(function() { var promise = player.play(); - if (promise === undefined) { - bpb.show(); - } else { - promise.then(function() { - bpb.show(); - }, function() { - bpb.show(); - }); + if (promise !== undefined) { + promise.then(_ => { + }).catch(error => { + bpb.show(); + }); } }); } |
