From 7ab9d741bfc36e19c703ea208a4d39b3a3c78587 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Tue, 27 Nov 2018 16:52:27 -0600 Subject: [PATCH] Fix autoplay --- src/invidious/views/watch.ecr | 13 +++++-------- 1 file 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(); + }); } }); }