Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/components/playback/playbackmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,10 @@
}
};

self.getFps = function (player) {
self.currentMediaSource(player).MediaStreams.find(s => s.Type === "Video")?.RealFrameRate

Check failure on line 1349 in src/components/playback/playbackmanager.js

View workflow job for this annotation

GitHub Actions / Quality checks 👌🧪 / Run lint 🕵️‍♂️

Missing semicolon

Check failure on line 1349 in src/components/playback/playbackmanager.js

View workflow job for this annotation

GitHub Actions / Quality checks 👌🧪 / Run lint 🕵️‍♂️

Strings must use singlequote

Check failure on line 1349 in src/components/playback/playbackmanager.js

View workflow job for this annotation

GitHub Actions / Quality checks 👌🧪 / Run lint 🕵️‍♂️

Expected an assignment or function call and instead saw an expression
}

Check failure on line 1350 in src/components/playback/playbackmanager.js

View workflow job for this annotation

GitHub Actions / Quality checks 👌🧪 / Run lint 🕵️‍♂️

Missing semicolon

function getSavedMaxStreamingBitrate(apiClient, mediaType) {
if (!apiClient) {
// This should hopefully never happen
Expand Down Expand Up @@ -3885,6 +3889,20 @@
this.seekRelative(offsetTicks, player);
}

nextFrame(player = this._currentPlayer) {
const fps = this.getFps(player);
if (fps != null) {
this.seekRelative(1e6 / fps, player);
}
}

previousFrame(player = this._currentPlayer) {
const fps = this.getFps(player);
if (fps != null) {
this.seekRelative(-1e6 / fps, player);
}
}

seekPercent(percent, player = this._currentPlayer) {
let ticks = this.duration(player) || 0;

Expand Down
12 changes: 12 additions & 0 deletions src/controllers/playback/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,18 @@ export default function (view) {
showOsd(btnFastForward);
}
break;
case ',':
if (!e.shiftKey) {
e.preventDefault();
playbackManager.previousFrame(currentPlayer);
}
break;
case '.':
if (!e.shiftKey) {
e.preventDefault();
playbackManager.nextFrame(currentPlayer);
}
break;
case 'j':
case 'J':
case 'ArrowLeft':
Expand Down
Loading