1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add support for seeking with milliseconds

Needed for the media notification seekbar in jellyfin-android (available on Android 10+).
The relevant change needed in jellyfin-android is already merged.
This commit is contained in:
Maxr1998 2020-07-21 00:50:14 +02:00
parent a83f541a70
commit 32f2020801
No known key found for this signature in database
GPG key ID: 3BA0CD3A11CDF7B8
2 changed files with 11 additions and 0 deletions

View file

@ -3664,6 +3664,14 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
this.seek(parseInt(ticks), player);
};
PlaybackManager.prototype.seekMs = function (ms, player) {
player = player || this._currentPlayer;
var ticks = ms * 10000;
this.seek(ticks, player);
};
PlaybackManager.prototype.playTrailers = function (item) {
var player = this._currentPlayer;

View file

@ -201,6 +201,9 @@ import appHost from 'apphost';
'rewind': () => {
playbackManager.rewind();
},
'seek': () => {
playbackManager.seekMs(options);
},
'togglefullscreen': () => {
playbackManager.toggleFullscreen();
},