@braccato/core 1.17.0 → 1.17.1
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/engine.js +5 -2
- package/package.json +1 -1
package/dist/engine.js
CHANGED
|
@@ -2545,6 +2545,9 @@ export function tickView(engine, currentTime, options) {
|
|
|
2545
2545
|
const mediaSteppedBack = eventCreationTime === NO_PLAYER_SNAPSHOT &&
|
|
2546
2546
|
isPlaying &&
|
|
2547
2547
|
currentTime < playbackClock.lastTime - CLOCK_RESYNC_THRESHOLD_S;
|
|
2548
|
+
// A clock that was already paused only moves when the host seeks it, however small the step, as a
|
|
2549
|
+
// scrub does. The tick that pauses lands a moment past the last playing one and is not a seek.
|
|
2550
|
+
const pausedSeek = !isPlaying && !playbackClock.lastPlayState && currentTime !== playbackClock.lastTime;
|
|
2548
2551
|
if (timeJumped)
|
|
2549
2552
|
dropPendingLineScroll(engine);
|
|
2550
2553
|
playbackClock.lastTime = currentTime;
|
|
@@ -2657,7 +2660,7 @@ export function tickView(engine, currentTime, options) {
|
|
|
2657
2660
|
lineData.isAnimating = false; // reset the animation against current media time
|
|
2658
2661
|
}
|
|
2659
2662
|
// Lead-in animations have no timing sample for the drift check, so a jump while playing must reset them.
|
|
2660
|
-
if (((timeJumped && isPlaying) || mediaSteppedBack) && lineData.isAnimating)
|
|
2663
|
+
if (((timeJumped && isPlaying) || mediaSteppedBack || pausedSeek) && lineData.isAnimating)
|
|
2661
2664
|
resetLineAnimationState(lineData);
|
|
2662
2665
|
updateWordStates(lineData, currentTime);
|
|
2663
2666
|
const nativeTimingSample = lineNativeTimingSample(lineData, currentTime);
|
|
@@ -2692,7 +2695,7 @@ export function tickView(engine, currentTime, options) {
|
|
|
2692
2695
|
else {
|
|
2693
2696
|
const staleAnimationEndTime = effectiveEndTime + animationConfig.highlight.fadeOutDurationMs / 1000 + 0.05;
|
|
2694
2697
|
if (lineData.isSelected) {
|
|
2695
|
-
if (isPlaying || timeJumped) {
|
|
2698
|
+
if (isPlaying || timeJumped || pausedSeek) {
|
|
2696
2699
|
if (currentTime > staleAnimationEndTime) {
|
|
2697
2700
|
logAnimationCleanup(engine, "selected-stale-reset", lineData, index, currentTime, staleAnimationEndTime);
|
|
2698
2701
|
resetLineAnimationState(lineData);
|