Merge pull request #1612 from Maxr1998/master

Add support for seeking with milliseconds
This commit is contained in:
dkanada 2020-07-24 10:18:04 +09:00 committed by GitHub
commit 6b45755480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -3647,6 +3647,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();
},