Skip to content

Invidious is an alternative front-end to YouTube

Fix autoplay

Omar Roth7ab9d741bfc3
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();
+ });
}
});
}