1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-21 01:39:04 +02:00

Display time tooltip for mobile when sliding

This commit is contained in:
Chocobozzz 2022-01-07 16:52:50 +01:00
parent eeda26fbf7
commit 91e16677f9
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 4 additions and 6 deletions

View File

@ -129,7 +129,9 @@
} }
.video-js .vjs-progress-control:hover .vjs-time-tooltip, .video-js .vjs-progress-control:hover .vjs-time-tooltip,
.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip { .video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,
// For mobile
.video-js .vjs-progress-control .vjs-sliding .vjs-time-tooltip {
display: block; display: block;
// Ensure that we maintain a font-size of ~10px. // Ensure that we maintain a font-size of ~10px.

View File

@ -2,7 +2,6 @@
* @file play-progress-bar.js * @file play-progress-bar.js
*/ */
import Component from '../../component.js'; import Component from '../../component.js';
import {IS_IOS, IS_ANDROID} from '../../utils/browser.js';
import * as Fn from '../../utils/fn.js'; import * as Fn from '../../utils/fn.js';
import './time-tooltip'; import './time-tooltip';
@ -79,10 +78,7 @@ PlayProgressBar.prototype.options_ = {
children: [] children: []
}; };
// Time tooltips should not be added to a player on mobile devices PlayProgressBar.prototype.options_.children.push('timeTooltip');
if (!IS_IOS && !IS_ANDROID) {
PlayProgressBar.prototype.options_.children.push('timeTooltip');
}
Component.registerComponent('PlayProgressBar', PlayProgressBar); Component.registerComponent('PlayProgressBar', PlayProgressBar);
export default PlayProgressBar; export default PlayProgressBar;