From d9408ee630b8bbf7dcb1418f44ef8fb34fa18533 Mon Sep 17 00:00:00 2001 From: Alex Barstow Date: Tue, 7 Jul 2020 17:33:03 -0400 Subject: [PATCH] fix: Fullscreen broken in iOS (#6735) The Fullscreen API is unsupported in iOS, so self.fsApi_.fullscreenerror and self.fsApi_.fullscreenchange are undefined, which was breaking the player after entering fullscreen by removing all bound player events. Fixes #6707, fixes #6684, fixes #6645. --- src/js/player.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/player.js b/src/js/player.js index 04bec7e450..574ebabc01 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -2792,8 +2792,8 @@ class Player extends Component { return new PromiseClass((resolve, reject) => { function offHandler() { - self.off(self.fsApi_.fullscreenerror, errorHandler); - self.off(self.fsApi_.fullscreenchange, changeHandler); + self.off('fullscreenerror', errorHandler); + self.off('fullscreenchange', changeHandler); } function changeHandler() { offHandler(); @@ -2870,8 +2870,8 @@ class Player extends Component { return new PromiseClass((resolve, reject) => { function offHandler() { - self.off(self.fsApi_.fullscreenerror, errorHandler); - self.off(self.fsApi_.fullscreenchange, changeHandler); + self.off('fullscreenerror', errorHandler); + self.off('fullscreenchange', changeHandler); } function changeHandler() { offHandler();