Skip to content

Commit

Permalink
fix(FEC-9177): Smart TV showed as mobile device (#389)
Browse files Browse the repository at this point in the history
Change every check of device.type to mobile or tablet instead, there are more device types which not relevant.
  • Loading branch information
Yuvalke committed Jun 11, 2019
1 parent 1f5d820 commit ab5b905
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/shell/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class Shell extends BaseComponent {
* @memberof Shell
*/
componentDidMount() {
this.props.updateIsMobile(!!this.player.env.device.type || this.props.forceTouchUI);
this.props.updateIsMobile(this.player.env.isTablet || this.player.env.isMobile || this.props.forceTouchUI);
this._onWindowResize();
this.eventManager.listen(this.player, this.player.Event.RESIZE, () => this._onWindowResize());
this.eventManager.listen(this.player, this.player.Event.FIRST_PLAY, () => this._onWindowResize());
Expand Down
4 changes: 2 additions & 2 deletions src/ui-presets/ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ function getAdsUiCustomization(): Object {
* @returns {boolean} - Whether the default ads ui should be shown or not.
*/
function useDefaultAdsUi(props: any): boolean {
let isMobile = !!props.player.env.device.type;
const isMobile = props.state.shell.isMobile;
let useStyledLinearAds = false;
try {
let adsRenderingSettings = props.player.config.plugins.ima.adsRenderingSettings;
const adsRenderingSettings = props.player.config.plugins.ima.adsRenderingSettings;
useStyledLinearAds = adsRenderingSettings && adsRenderingSettings.useStyledLinearAds;
} catch (e) {
// Do nothing
Expand Down

0 comments on commit ab5b905

Please sign in to comment.