Skip to content

Commit

Permalink
Merge pull request jellyfin#1612 from Maxr1998/master
Browse files Browse the repository at this point in the history
Add support for seeking with milliseconds
  • Loading branch information
dkanada committed Jul 24, 2020
2 parents 71646b6 + 32f2020 commit 6b45755
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/playback/playbackmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/scripts/inputManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ import appHost from 'apphost';
'rewind': () => {
playbackManager.rewind();
},
'seek': () => {
playbackManager.seekMs(options);
},
'togglefullscreen': () => {
playbackManager.toggleFullscreen();
},
Expand Down

0 comments on commit 6b45755

Please sign in to comment.