forked from midou/invidious
Fix autoplay
This commit is contained in:
1 parent
6540742c76
commit
7ab9d741bf
1 file changed
+5
-8
@@ -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();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user