Skip to content

Commit

Permalink
fix: Fullscreen broken in iOS (#6735)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alex-barstow authored and gkatsev committed Jul 8, 2020
1 parent 1a8c6a4 commit d9408ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit d9408ee

Please sign in to comment.