@twick/core 0.15.16 → 0.15.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4425,12 +4425,14 @@ var Player = class {
|
|
|
4425
4425
|
const state = await this.prepare();
|
|
4426
4426
|
const previousState = this.playback.state;
|
|
4427
4427
|
this.playback.state = state.paused ? 2 /* Paused */ : 0 /* Playing */;
|
|
4428
|
+
let didSeekWhilePaused = false;
|
|
4428
4429
|
if (state.seek >= 0 || !this.isInUserRange(this.status.frame)) {
|
|
4429
4430
|
const seekFrame = state.seek < 0 ? this.status.frame : state.seek;
|
|
4430
4431
|
const clampedFrame = this.clampRange(seekFrame);
|
|
4431
4432
|
this.logger.profile("seek time");
|
|
4432
4433
|
await this.playback.seek(clampedFrame);
|
|
4433
4434
|
this.logger.profile("seek time");
|
|
4435
|
+
didSeekWhilePaused = state.paused;
|
|
4434
4436
|
} else if (state.paused) {
|
|
4435
4437
|
if (state.render || state.paused && previousState !== 2 /* Paused */) {
|
|
4436
4438
|
await this.render.dispatch();
|
|
@@ -4446,6 +4448,9 @@ var Player = class {
|
|
|
4446
4448
|
}
|
|
4447
4449
|
await this.render.dispatch();
|
|
4448
4450
|
this.frame.current = this.playback.frame;
|
|
4451
|
+
if (didSeekWhilePaused) {
|
|
4452
|
+
this.requestRender();
|
|
4453
|
+
}
|
|
4449
4454
|
this.request();
|
|
4450
4455
|
}
|
|
4451
4456
|
request() {
|