Skip to content

Commit

Permalink
feat: time tooltips will not be added to a player on mobile devices (#…
Browse files Browse the repository at this point in the history
…4185)

Currently, the behavior of time tooltips is inconsistent across iOS and Android devices so we want to hide the tooltips on mobile devices for the time being.
  • Loading branch information
alex-barstow authored and gkatsev committed Mar 13, 2017
1 parent 41be5dc commit d79b8a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/js/control-bar/progress-control/play-progress-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @file play-progress-bar.js
*/
import Component from '../../component.js';
import {IE_VERSION} from '../../utils/browser.js';
import {IE_VERSION, IS_IOS, IS_ANDROID} from '../../utils/browser.js';
import formatTime from '../../utils/format-time.js';

import './time-tooltip';
Expand Down Expand Up @@ -71,7 +71,8 @@ PlayProgressBar.prototype.options_ = {
children: []
};

if (!IE_VERSION || IE_VERSION > 8) {
// Time tooltips should not be added to a player on mobile devices or IE8
if ((!IE_VERSION || IE_VERSION > 8) && !IS_IOS && !IS_ANDROID) {
PlayProgressBar.prototype.options_.children.push('timeTooltip');
}

Expand Down
5 changes: 3 additions & 2 deletions src/js/control-bar/progress-control/seek-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import Slider from '../../slider/slider.js';
import Component from '../../component.js';
import {IE_VERSION} from '../../utils/browser.js';
import {IE_VERSION, IS_IOS, IS_ANDROID} from '../../utils/browser.js';
import * as Dom from '../../utils/dom.js';
import * as Fn from '../../utils/fn.js';
import formatTime from '../../utils/format-time.js';
Expand Down Expand Up @@ -225,7 +225,8 @@ SeekBar.prototype.options_ = {
barName: 'playProgressBar'
};

if (!IE_VERSION || IE_VERSION > 8) {
// MouseTimeDisplay tooltips should not be added to a player on mobile devices or IE8
if ((!IE_VERSION || IE_VERSION > 8) && !IS_IOS && !IS_ANDROID) {
SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');
}

Expand Down

0 comments on commit d79b8a7

Please sign in to comment.