Skip to content

Commit

Permalink
fix(FEC-8826): element sent from UI for fullscreen (#382)
Browse files Browse the repository at this point in the history
default element decided on kaltura player (kaltura/kaltura-player-js#235) instead on UI
  • Loading branch information
Yuvalke committed Apr 4, 2019
1 parent d8b7912 commit b686d28
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/components/fullscreen/fullscreen.js
Expand Up @@ -12,7 +12,6 @@ import {default as Icon, IconType} from '../icon';
* @returns {Object} - mapped state to this component
*/
const mapStateToProps = state => ({
targetId: state.config.targetId,
fullscreen: state.engine.fullscreen
});

Expand All @@ -25,8 +24,6 @@ const mapStateToProps = state => ({
* @extends {BaseComponent}
*/
class FullscreenControl extends BaseComponent {
_targetDiv: ?HTMLElement;

/**
* Creates an instance of FullscreenControl.
* @param {Object} obj obj
Expand All @@ -36,16 +33,6 @@ class FullscreenControl extends BaseComponent {
super({name: 'Fullscreen', player: obj.player});
}

/**
* before component mounted, cache the target id div
*
* @returns {void}
* @memberof FullscreenControl
*/
componentWillMount(): void {
this._targetDiv = document.getElementById(this.props.targetId);
}

/**
* toggle fullscreen based on current fullscreen state in store
*
Expand All @@ -54,7 +41,7 @@ class FullscreenControl extends BaseComponent {
*/
toggleFullscreen(): void {
this.logger.debug(`Toggle fullscreen`);
this.props.fullscreen ? this.player.exitFullscreen() : this.player.enterFullscreen(this._targetDiv);
this.props.fullscreen ? this.player.exitFullscreen() : this.player.enterFullscreen();
this.notifyClick();
}

Expand Down

0 comments on commit b686d28

Please sign in to comment.