mirror of
https://github.com/stashapp/stash.git
synced 2026-01-02 13:42:31 +01:00
Fix marker seeking (#689)
This commit is contained in:
parent
c327a98ecb
commit
278be33618
1 changed files with 13 additions and 3 deletions
|
|
@ -95,9 +95,6 @@ export class ScenePlayerImpl extends React.Component<
|
|||
|
||||
private onReady() {
|
||||
this.player = JWUtils.getPlayer();
|
||||
if (this.props.timestamp > 0) {
|
||||
this.player.seek(this.props.timestamp);
|
||||
}
|
||||
|
||||
this.player.on("error", (err: any) => {
|
||||
if (err && err.code === 224003) {
|
||||
|
|
@ -115,6 +112,12 @@ export class ScenePlayerImpl extends React.Component<
|
|||
this.handleError();
|
||||
}
|
||||
});
|
||||
|
||||
this.player.on("playlist", () => {
|
||||
if (this.props.timestamp > 0) {
|
||||
this.player.seek(this.props.timestamp);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private onSeeked() {
|
||||
|
|
@ -152,6 +155,12 @@ export class ScenePlayerImpl extends React.Component<
|
|||
console.log("Trying next source in playlist");
|
||||
this.player.load(this.playlist);
|
||||
this.player.play();
|
||||
|
||||
this.player.on("firstFrame", () => {
|
||||
if (this.props.timestamp > 0) {
|
||||
this.player.seek(this.props.timestamp);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -210,6 +219,7 @@ export class ScenePlayerImpl extends React.Component<
|
|||
|
||||
const seekHook = (seekToPosition: number, _videoTag: HTMLVideoElement) => {
|
||||
if (
|
||||
!_videoTag.src ||
|
||||
ScenePlayerImpl.isDirectStream(_videoTag.src) ||
|
||||
_videoTag.src.endsWith(".m3u8")
|
||||
) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue