@bendyline/squisq-react 2.11.24 → 2.11.25
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/{chunk-WGLW7T3F.js → chunk-JKR5LJXK.js} +10 -10
- package/dist/index.js +1 -1
- package/dist/player/index.js +1 -1
- package/dist/squisq-player.full.global.js +269 -269
- package/dist/squisq-player.global.js +66 -66
- package/dist/standalone-player-full.js +1 -1
- package/dist/standalone-source.js +1 -1
- package/package.json +2 -2
|
@@ -476,6 +476,7 @@ function contrastText(hex) {
|
|
|
476
476
|
var TARGET_CHUNK_SIZE = 4;
|
|
477
477
|
var MIN_CHUNK_SIZE = 2;
|
|
478
478
|
var MAX_CHUNK_SIZE = 6;
|
|
479
|
+
var SOCIAL_CAPTION_HOLD_SECONDS = 1;
|
|
479
480
|
function resolvePhraseTiming(phrase) {
|
|
480
481
|
if (phrase.words && phrase.words.length > 0) {
|
|
481
482
|
return phrase.words.map((w) => ({
|
|
@@ -558,17 +559,15 @@ function SocialCaptionOverlay({
|
|
|
558
559
|
}
|
|
559
560
|
}
|
|
560
561
|
if (!activeChunk) {
|
|
561
|
-
for (let i =
|
|
562
|
-
if (currentTime >= chunks[i].endTime
|
|
563
|
-
|
|
564
|
-
|
|
562
|
+
for (let i = chunks.length - 1; i >= 0; i--) {
|
|
563
|
+
if (currentTime >= chunks[i].endTime) {
|
|
564
|
+
if (currentTime < chunks[i].endTime + SOCIAL_CAPTION_HOLD_SECONDS) {
|
|
565
|
+
activeChunk = chunks[i];
|
|
566
|
+
activeWordIndex = activeChunk.words.length - 1;
|
|
567
|
+
}
|
|
565
568
|
break;
|
|
566
569
|
}
|
|
567
570
|
}
|
|
568
|
-
if (!activeChunk && chunks.length > 0 && currentTime >= chunks[chunks.length - 1].startTime) {
|
|
569
|
-
activeChunk = chunks[chunks.length - 1];
|
|
570
|
-
activeWordIndex = activeChunk.words.length - 1;
|
|
571
|
-
}
|
|
572
571
|
}
|
|
573
572
|
if (!activeChunk) return null;
|
|
574
573
|
if (activeWordIndex === -1) {
|
|
@@ -764,6 +763,7 @@ function formatTime(seconds) {
|
|
|
764
763
|
// src/DocProgressBar.tsx
|
|
765
764
|
import { useRef as useRef2, useState as useState2, useCallback } from "react";
|
|
766
765
|
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
766
|
+
var PLAYER_ACCENT = "var(--squisq-player-accent, #5b9bd5)";
|
|
767
767
|
function DocProgressBar({
|
|
768
768
|
state,
|
|
769
769
|
actions,
|
|
@@ -881,7 +881,7 @@ function DocProgressBar({
|
|
|
881
881
|
left: 0,
|
|
882
882
|
width: `${playProgress * 100}%`,
|
|
883
883
|
height: "6px",
|
|
884
|
-
background:
|
|
884
|
+
background: PLAYER_ACCENT,
|
|
885
885
|
borderRadius: "3px"
|
|
886
886
|
}
|
|
887
887
|
}
|
|
@@ -908,7 +908,7 @@ function DocProgressBar({
|
|
|
908
908
|
height: "14px",
|
|
909
909
|
padding: 0,
|
|
910
910
|
backgroundColor: active ? "#ffffff" : "rgba(255,255,255,0.75)",
|
|
911
|
-
border:
|
|
911
|
+
border: `2px solid ${PLAYER_ACCENT}`,
|
|
912
912
|
boxShadow: "0 1px 3px rgba(0,0,0,0.5)",
|
|
913
913
|
zIndex: 3
|
|
914
914
|
} : {
|
package/dist/index.js
CHANGED
package/dist/player/index.js
CHANGED