@hyperframes/core 0.8.218 → 0.8.220
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/runtime/clock.d.ts
CHANGED
|
@@ -36,7 +36,6 @@ export declare class TransportClock {
|
|
|
36
36
|
});
|
|
37
37
|
now(): number;
|
|
38
38
|
private _elementTimeNeverBehind;
|
|
39
|
-
private _heldTimeWhenBehind;
|
|
40
39
|
/** Folds a >500ms gap since the last read into `_playStartMs` so it's never reported as played time. */
|
|
41
40
|
private _applyStallCorrection;
|
|
42
41
|
play(): boolean;
|
package/dist/runtime/clock.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { timeAtSourceTime } from "../speedRamp.js";
|
|
2
|
-
import { MEDIA_HARD_SYNC_SECONDS } from "./mediaSteer.js";
|
|
3
2
|
import { playRangeHoldTime } from "./protocol.js";
|
|
4
3
|
/** GSAP's own `lagSmoothing` default — see the PR body for why this clock needs its own copy. */
|
|
5
4
|
const STALL_THRESHOLD_MS = 500;
|
|
@@ -48,7 +47,6 @@ export class TransportClock {
|
|
|
48
47
|
return this._baseTime;
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
// Monotonic fallback
|
|
52
50
|
this._applyStallCorrection();
|
|
53
51
|
const elapsed = (this._nowMs() - this._playStartMs) / 1000;
|
|
54
52
|
const t = this._baseTime + elapsed * this._rate;
|
|
@@ -60,16 +58,13 @@ export class TransportClock {
|
|
|
60
58
|
if (el.paused || !Number.isFinite(el.currentTime))
|
|
61
59
|
return null;
|
|
62
60
|
if (el.seeking)
|
|
63
|
-
return
|
|
61
|
+
return null;
|
|
64
62
|
const spec = rate ?? 1;
|
|
65
63
|
const time = timeAtSourceTime(spec, el.currentTime - mediaStart) + compositionStart;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return null;
|
|
71
|
-
const buffering = el.readyState < HAVE_FUTURE_DATA;
|
|
72
|
-
return buffering || behind <= MEDIA_HARD_SYNC_SECONDS ? this._lastNow : null;
|
|
64
|
+
if (time >= this._lastNow)
|
|
65
|
+
return time;
|
|
66
|
+
const wrapped = el.loop && this._lastNow - time > timeAtSourceTime(spec, el.duration) / 2;
|
|
67
|
+
return !wrapped && el.readyState < HAVE_FUTURE_DATA ? this._lastNow : null;
|
|
73
68
|
}
|
|
74
69
|
/** Folds a >500ms gap since the last read into `_playStartMs` so it's never reported as played time. */
|
|
75
70
|
_applyStallCorrection() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.220",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -429,9 +429,9 @@
|
|
|
429
429
|
"linkedom": "^0.18.12",
|
|
430
430
|
"postcss": "^8.5.8",
|
|
431
431
|
"wawoff2": "^2.0.1",
|
|
432
|
-
"@hyperframes/lint": "0.8.
|
|
433
|
-
"@hyperframes/
|
|
434
|
-
"@hyperframes/
|
|
432
|
+
"@hyperframes/lint": "0.8.220",
|
|
433
|
+
"@hyperframes/parsers": "0.8.220",
|
|
434
|
+
"@hyperframes/studio-server": "0.8.220"
|
|
435
435
|
},
|
|
436
436
|
"devDependencies": {
|
|
437
437
|
"@fontsource/archivo-black": "^5.2.8",
|