Skip to content

Commit

Permalink
fix(FEC-12122):[WEB][Youtube media][iOS][Safari][iPhone] - Full scree…
Browse files Browse the repository at this point in the history
…n UI is not responsive for clicks (#687)

* fix(FEC-12122):[WEB][Youtube media][iOS][Safari][iPhone] - Full scree UI is not responsive for clicks

* add youtube to engine-type enum

Co-authored-by: Gilad Nadav <[email protected]>
  • Loading branch information
Tzipi-kaltura and giladna authored Dec 22, 2022
1 parent a9400ab commit 16c530e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/engines/engine-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const EngineType: PKEngineTypes = {
HTML5: 'html5',
FLASH: 'flash',
SILVERLIGHT: 'silverlight',
CAST: 'cast'
CAST: 'cast',
YOUTUBE: 'youtube'
};

export {EngineType};
5 changes: 3 additions & 2 deletions src/fullscreen/fullscreen-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Player from '../player';
import FakeEvent from '../event/fake-event';
import * as Utils from '../utils/util';
import {ScreenOrientationType} from '../enums/screen-orientation-type';
import {EngineType} from '../engines/engine-type';

/**
* The IOS fullscreen class name.
Expand Down Expand Up @@ -100,7 +101,7 @@ class FullscreenController {
fullScreenElement = this._player.getView();
}
if (this._player.env.os.name === 'iOS') {
if (playbackConfig.inBrowserFullscreen && playbackConfig.playsinline) {
if ((playbackConfig.inBrowserFullscreen && playbackConfig.playsinline) || this._player._engineType === EngineType.YOUTUBE) {
this._enterInBrowserFullscreen(fullScreenElement);
} else {
const videoElement: ?HTMLVideoElement = this._player.getVideoElement();
Expand Down Expand Up @@ -130,7 +131,7 @@ class FullscreenController {
if (this.isFullscreen()) {
if (this._player.env.os.name === 'iOS') {
// player will be in full screen with this flag or otherwise will be natively full screen
if (this._isInBrowserFullscreen) {
if (this._isInBrowserFullscreen || this._player._engineType === EngineType.YOUTUBE) {
this._exitInBrowserFullscreen();
} else {
const videoElement: ?HTMLVideoElement = this._player.getVideoElement();
Expand Down

0 comments on commit 16c530e

Please sign in to comment.