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-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;
// Ensure that we maintain a font-size of ~10px.

View File

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