Skip to content

Commit b3667d7

Browse files
committed
do not add mouse time display on mobile divices. Based on based on videojs#4185
1 parent b334544 commit b3667d7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/js/control-bar/progress-control/seek-bar.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import LoadProgressBar from './load-progress-bar.js';
88
import PlayProgressBar from './play-progress-bar.js';
99
import TooltipProgressBar from './tooltip-progress-bar.js';
1010
import * as Fn from '../../utils/fn.js';
11+
import {IE_VERSION, IS_IOS, IS_ANDROID} from '../../utils/browser.js';
1112
import formatTime from '../../utils/format-time.js';
1213
import assign from 'object.assign';
1314

@@ -158,12 +159,16 @@ class SeekBar extends Slider {
158159
SeekBar.prototype.options_ = {
159160
children: [
160161
'loadProgressBar',
161-
'mouseTimeDisplay',
162162
'playProgressBar'
163163
],
164164
'barName': 'playProgressBar'
165165
};
166166

167+
// MouseTimeDisplay tooltips should not be added to a player on mobile devices or IE8
168+
if ((!IE_VERSION || IE_VERSION > 8) && !IS_IOS && !IS_ANDROID) {
169+
SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');
170+
}
171+
167172
SeekBar.prototype.playerEvent = 'timeupdate';
168173

169174
Component.registerComponent('SeekBar', SeekBar);

0 commit comments

Comments
 (0)