Skip to content

Commit

Permalink
fix(player): Removed conditional to create controls on iPhone as well…
Browse files Browse the repository at this point in the history
…, and added negative `z-index` in Ads container when inactive
  • Loading branch information
rafa8626 committed May 1, 2018
1 parent ee57974 commit 1aca10e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/css/player.css
Original file line number Diff line number Diff line change
Expand Up @@ -651,11 +651,14 @@ video:-webkit-media-text-track-display {
position: absolute;
top: 0;
width: 100%;
z-index: 1;
z-index: -1;
}
.om-ads--active {
overflow: hidden;
}
.om-ads--active #om-ads {
z-index: 1;
}
.om-player[data-fullscreen='true'] #om-ads {
z-index: 2147483647;
}
Expand Down
7 changes: 2 additions & 5 deletions src/js/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PlayerInstanceList from './interfaces/instance';
import Source from './interfaces/source';
import Media from './media';
import Ads from './media/ads';
import { IS_ANDROID, IS_FIREFOX, IS_IOS, IS_IPHONE } from './utils/constants';
import { IS_ANDROID, IS_FIREFOX, IS_IOS } from './utils/constants';
import { addEvent } from './utils/events';
import { isAudio, isVideo } from './utils/general';
import { isAutoplaySupported } from './utils/media';
Expand Down Expand Up @@ -220,10 +220,7 @@ class Player {
this._wrapInstance();
this._createPlayButton();
this._createUID();

if (!IS_IPHONE && isVideo) {
this._createControls();
}
this._createControls();
this._setEvents();
this._autoplay();
Player.instances[this.id] = this;
Expand Down

0 comments on commit 1aca10e

Please sign in to comment.