@hyperstream/videoplayer 0.1.4 → 0.1.6
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.d.mts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +327 -307
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +327 -307
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17158,7 +17158,7 @@ var init_video_transcript = __esm({
|
|
|
17158
17158
|
// src/index.ts
|
|
17159
17159
|
var index_exports = {};
|
|
17160
17160
|
__export(index_exports, {
|
|
17161
|
-
HyperstreamVideoPlayer: () =>
|
|
17161
|
+
HyperstreamVideoPlayer: () => SimpleVideoPlayerWithContext
|
|
17162
17162
|
});
|
|
17163
17163
|
module.exports = __toCommonJS(index_exports);
|
|
17164
17164
|
|
|
@@ -23172,18 +23172,27 @@ var PopupOverlay3 = import_react53.default.lazy(() => Promise.resolve().then(()
|
|
|
23172
23172
|
var VideoOverlays2 = import_react53.default.lazy(() => Promise.resolve().then(() => (init_VideoOverlays(), VideoOverlays_exports)).then((mod) => ({ default: mod.VideoOverlays })));
|
|
23173
23173
|
var VideoTranscript2 = import_react53.default.lazy(() => Promise.resolve().then(() => (init_video_transcript(), video_transcript_exports)).then((mod) => ({ default: mod.VideoTranscript })));
|
|
23174
23174
|
function SimpleVideoPlayer({
|
|
23175
|
-
poster,
|
|
23175
|
+
poster: initialPoster,
|
|
23176
23176
|
watermark,
|
|
23177
|
-
hyperstreamUrl,
|
|
23177
|
+
hyperstreamUrl: initialHyperstreamUrl,
|
|
23178
23178
|
autoplay = false,
|
|
23179
23179
|
muted = false,
|
|
23180
23180
|
controls = true,
|
|
23181
23181
|
objectFit = "contain",
|
|
23182
23182
|
containerWidth,
|
|
23183
23183
|
isMobile,
|
|
23184
|
-
brandColor
|
|
23185
|
-
playlist
|
|
23184
|
+
brandColor: initialBrandColor,
|
|
23185
|
+
playlist,
|
|
23186
|
+
// Aliases
|
|
23187
|
+
url: urlProp,
|
|
23188
|
+
primaryColor,
|
|
23189
|
+
thumbnail,
|
|
23190
|
+
title,
|
|
23191
|
+
artist
|
|
23186
23192
|
}) {
|
|
23193
|
+
const hyperstreamUrl = urlProp || initialHyperstreamUrl;
|
|
23194
|
+
const brandColor = primaryColor || initialBrandColor || "#d0d684";
|
|
23195
|
+
const poster = thumbnail || initialPoster;
|
|
23187
23196
|
const [apiPlaylist, setApiPlaylist] = (0, import_react53.useState)(null);
|
|
23188
23197
|
const effectivePlaylist = (0, import_react53.useMemo)(() => {
|
|
23189
23198
|
return apiPlaylist || playlist || { items: [] };
|
|
@@ -26394,330 +26403,341 @@ function SimpleVideoPlayer({
|
|
|
26394
26403
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
26395
26404
|
};
|
|
26396
26405
|
}, [showSettingsMenu]);
|
|
26397
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
26398
|
-
|
|
26399
|
-
|
|
26400
|
-
|
|
26401
|
-
|
|
26402
|
-
|
|
26406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
26407
|
+
"div",
|
|
26408
|
+
{
|
|
26409
|
+
className: "w-full h-full text-left text-base font-sans leading-normal antialiased",
|
|
26410
|
+
"data-hyperstream-player": "true",
|
|
26411
|
+
style: { color: "white" },
|
|
26412
|
+
children: [
|
|
26413
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "relative h-full", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
26414
|
+
"div",
|
|
26415
|
+
{
|
|
26416
|
+
ref: containerRef,
|
|
26417
|
+
className: `
|
|
26403
26418
|
relative w-full h-full bg-black rounded-lg overflow-hidden shadow-lg
|
|
26404
26419
|
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#d0d684]/70 focus-visible:ring-offset-1
|
|
26405
26420
|
`,
|
|
26406
|
-
|
|
26407
|
-
|
|
26408
|
-
|
|
26409
|
-
|
|
26410
|
-
|
|
26411
|
-
|
|
26412
|
-
|
|
26413
|
-
|
|
26414
|
-
|
|
26415
|
-
|
|
26416
|
-
|
|
26417
|
-
|
|
26418
|
-
|
|
26419
|
-
|
|
26420
|
-
|
|
26421
|
-
|
|
26422
|
-
|
|
26423
|
-
|
|
26424
|
-
|
|
26425
|
-
|
|
26426
|
-
|
|
26427
|
-
|
|
26428
|
-
|
|
26429
|
-
|
|
26430
|
-
|
|
26431
|
-
|
|
26432
|
-
|
|
26433
|
-
|
|
26434
|
-
|
|
26435
|
-
|
|
26436
|
-
|
|
26437
|
-
|
|
26438
|
-
|
|
26439
|
-
|
|
26440
|
-
|
|
26441
|
-
|
|
26442
|
-
|
|
26443
|
-
|
|
26444
|
-
|
|
26445
|
-
|
|
26446
|
-
|
|
26447
|
-
|
|
26448
|
-
|
|
26421
|
+
onMouseEnter: handleContainerMouseEnter,
|
|
26422
|
+
onMouseLeave: handleContainerMouseLeave,
|
|
26423
|
+
onMouseMove: handleContainerMouseMove,
|
|
26424
|
+
onClick: handleContainerClick,
|
|
26425
|
+
tabIndex: 0,
|
|
26426
|
+
role: "application",
|
|
26427
|
+
"aria-label": "Video player",
|
|
26428
|
+
children: [
|
|
26429
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorBoundary, { componentName: "PopupOverlay", brandColor, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react53.default.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26430
|
+
PopupOverlay3,
|
|
26431
|
+
{
|
|
26432
|
+
activePopup,
|
|
26433
|
+
activePopupStyles,
|
|
26434
|
+
videoPopupsData,
|
|
26435
|
+
formData,
|
|
26436
|
+
formErrors,
|
|
26437
|
+
activeResponses: interactiveResponses,
|
|
26438
|
+
currentStep,
|
|
26439
|
+
currentQuestionIndex: popupCurrentQuestionIndex,
|
|
26440
|
+
quizCompleted: popupIsQuizCompleted,
|
|
26441
|
+
showResults,
|
|
26442
|
+
handlePopupAction,
|
|
26443
|
+
handlePopupClose,
|
|
26444
|
+
handleFormFieldChange,
|
|
26445
|
+
handleFormSubmit,
|
|
26446
|
+
handleMultiStepSubmit,
|
|
26447
|
+
handleNextStep,
|
|
26448
|
+
handlePrevStep,
|
|
26449
|
+
handleInteractiveResponse,
|
|
26450
|
+
handleQuizCompletion: popupQuizCompletion,
|
|
26451
|
+
handleNextQuestion: popupNextQuestion,
|
|
26452
|
+
handlePrevQuestion: popupPrevQuestion,
|
|
26453
|
+
logEvent,
|
|
26454
|
+
videoRef,
|
|
26455
|
+
defaultUrl: hyperstreamUrl || "",
|
|
26456
|
+
url: url || ""
|
|
26457
|
+
}
|
|
26458
|
+
) }) }),
|
|
26459
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26460
|
+
"video",
|
|
26461
|
+
{
|
|
26462
|
+
ref: videoRef,
|
|
26463
|
+
className: `
|
|
26449
26464
|
w-full h-full
|
|
26450
26465
|
${videoAspectRatio ? "absolute inset-0" : ""}
|
|
26451
26466
|
`,
|
|
26452
|
-
|
|
26453
|
-
|
|
26454
|
-
|
|
26455
|
-
|
|
26456
|
-
|
|
26457
|
-
|
|
26458
|
-
|
|
26459
|
-
|
|
26460
|
-
|
|
26461
|
-
|
|
26462
|
-
|
|
26463
|
-
|
|
26464
|
-
|
|
26465
|
-
|
|
26466
|
-
|
|
26467
|
-
|
|
26468
|
-
|
|
26469
|
-
|
|
26470
|
-
|
|
26471
|
-
|
|
26472
|
-
|
|
26473
|
-
|
|
26474
|
-
|
|
26475
|
-
|
|
26476
|
-
|
|
26477
|
-
|
|
26478
|
-
|
|
26479
|
-
|
|
26480
|
-
|
|
26481
|
-
|
|
26482
|
-
|
|
26483
|
-
|
|
26484
|
-
|
|
26485
|
-
|
|
26486
|
-
|
|
26487
|
-
|
|
26488
|
-
|
|
26489
|
-
|
|
26490
|
-
|
|
26491
|
-
|
|
26492
|
-
|
|
26493
|
-
|
|
26494
|
-
|
|
26495
|
-
|
|
26496
|
-
|
|
26497
|
-
|
|
26498
|
-
|
|
26499
|
-
|
|
26500
|
-
|
|
26501
|
-
|
|
26502
|
-
|
|
26503
|
-
|
|
26504
|
-
|
|
26505
|
-
|
|
26506
|
-
|
|
26507
|
-
|
|
26508
|
-
|
|
26509
|
-
|
|
26510
|
-
|
|
26511
|
-
|
|
26512
|
-
|
|
26513
|
-
|
|
26514
|
-
|
|
26515
|
-
|
|
26516
|
-
|
|
26517
|
-
|
|
26518
|
-
|
|
26519
|
-
|
|
26520
|
-
|
|
26521
|
-
|
|
26522
|
-
|
|
26523
|
-
|
|
26524
|
-
|
|
26525
|
-
|
|
26526
|
-
|
|
26527
|
-
|
|
26528
|
-
|
|
26529
|
-
|
|
26530
|
-
|
|
26531
|
-
|
|
26532
|
-
|
|
26533
|
-
|
|
26534
|
-
|
|
26535
|
-
|
|
26536
|
-
|
|
26537
|
-
|
|
26538
|
-
|
|
26539
|
-
|
|
26540
|
-
|
|
26541
|
-
|
|
26542
|
-
|
|
26543
|
-
|
|
26544
|
-
|
|
26545
|
-
|
|
26546
|
-
|
|
26547
|
-
|
|
26548
|
-
|
|
26549
|
-
|
|
26550
|
-
|
|
26551
|
-
|
|
26552
|
-
|
|
26553
|
-
|
|
26554
|
-
|
|
26555
|
-
|
|
26556
|
-
|
|
26557
|
-
|
|
26558
|
-
|
|
26559
|
-
|
|
26560
|
-
|
|
26561
|
-
|
|
26562
|
-
|
|
26563
|
-
|
|
26564
|
-
|
|
26565
|
-
|
|
26566
|
-
|
|
26567
|
-
|
|
26568
|
-
|
|
26569
|
-
|
|
26570
|
-
|
|
26571
|
-
|
|
26572
|
-
|
|
26573
|
-
|
|
26574
|
-
|
|
26575
|
-
|
|
26576
|
-
|
|
26577
|
-
|
|
26578
|
-
|
|
26579
|
-
|
|
26580
|
-
|
|
26581
|
-
|
|
26582
|
-
|
|
26583
|
-
|
|
26584
|
-
|
|
26585
|
-
|
|
26586
|
-
|
|
26587
|
-
|
|
26588
|
-
|
|
26589
|
-
|
|
26590
|
-
|
|
26591
|
-
|
|
26592
|
-
|
|
26593
|
-
|
|
26594
|
-
|
|
26595
|
-
|
|
26596
|
-
|
|
26597
|
-
|
|
26598
|
-
|
|
26599
|
-
|
|
26600
|
-
|
|
26601
|
-
|
|
26602
|
-
|
|
26603
|
-
|
|
26604
|
-
|
|
26605
|
-
|
|
26606
|
-
|
|
26607
|
-
|
|
26608
|
-
|
|
26609
|
-
|
|
26610
|
-
|
|
26611
|
-
|
|
26612
|
-
|
|
26613
|
-
|
|
26614
|
-
|
|
26615
|
-
|
|
26616
|
-
|
|
26617
|
-
|
|
26618
|
-
|
|
26619
|
-
|
|
26620
|
-
|
|
26621
|
-
|
|
26622
|
-
|
|
26623
|
-
|
|
26624
|
-
|
|
26625
|
-
|
|
26626
|
-
|
|
26627
|
-
|
|
26628
|
-
|
|
26629
|
-
|
|
26630
|
-
|
|
26631
|
-
|
|
26632
|
-
|
|
26633
|
-
|
|
26634
|
-
|
|
26635
|
-
|
|
26636
|
-
|
|
26637
|
-
|
|
26638
|
-
|
|
26639
|
-
|
|
26640
|
-
|
|
26641
|
-
|
|
26642
|
-
|
|
26643
|
-
|
|
26644
|
-
|
|
26645
|
-
|
|
26646
|
-
|
|
26647
|
-
|
|
26648
|
-
|
|
26649
|
-
|
|
26650
|
-
|
|
26651
|
-
|
|
26652
|
-
|
|
26653
|
-
|
|
26654
|
-
|
|
26655
|
-
|
|
26656
|
-
|
|
26657
|
-
|
|
26658
|
-
|
|
26659
|
-
|
|
26660
|
-
|
|
26661
|
-
|
|
26662
|
-
|
|
26663
|
-
|
|
26664
|
-
|
|
26665
|
-
|
|
26666
|
-
|
|
26667
|
-
|
|
26668
|
-
|
|
26669
|
-
|
|
26670
|
-
|
|
26671
|
-
|
|
26672
|
-
|
|
26673
|
-
|
|
26674
|
-
|
|
26675
|
-
|
|
26676
|
-
|
|
26677
|
-
|
|
26678
|
-
|
|
26679
|
-
|
|
26680
|
-
|
|
26681
|
-
|
|
26682
|
-
|
|
26683
|
-
|
|
26684
|
-
|
|
26685
|
-
|
|
26686
|
-
|
|
26687
|
-
|
|
26688
|
-
|
|
26689
|
-
|
|
26690
|
-
|
|
26691
|
-
|
|
26692
|
-
|
|
26693
|
-
|
|
26694
|
-
|
|
26695
|
-
|
|
26696
|
-
|
|
26697
|
-
|
|
26698
|
-
|
|
26699
|
-
|
|
26700
|
-
|
|
26701
|
-
|
|
26467
|
+
style: {
|
|
26468
|
+
objectFit,
|
|
26469
|
+
filter: mobileOptimization.isMobile ? `brightness(${brightnessLevel})` : void 0
|
|
26470
|
+
},
|
|
26471
|
+
playsInline: true,
|
|
26472
|
+
"webkit-playsinline": "true",
|
|
26473
|
+
crossOrigin: "anonymous",
|
|
26474
|
+
autoPlay: autoplay,
|
|
26475
|
+
muted: autoplay ? true : muted,
|
|
26476
|
+
preload: autoplay ? "auto" : batteryOptimization.lowPowerMode ? "none" : connectionOptimization.saveData ? "metadata" : "auto",
|
|
26477
|
+
onPlay: videoEventHandlers.onPlay,
|
|
26478
|
+
onPause: videoEventHandlers.onPause,
|
|
26479
|
+
onEnded: videoEventHandlers.onEnded,
|
|
26480
|
+
onTimeUpdate: videoEventHandlers.onTimeUpdate,
|
|
26481
|
+
onVolumeChange: videoEventHandlers.onVolumeChange,
|
|
26482
|
+
onRateChange: videoEventHandlers.onRateChange,
|
|
26483
|
+
onLoadStart: videoEventHandlers.onLoadStart,
|
|
26484
|
+
onLoadedMetadata: videoEventHandlers.onLoadedMetadata,
|
|
26485
|
+
onCanPlay: videoEventHandlers.onCanPlay,
|
|
26486
|
+
onWaiting: videoEventHandlers.onWaiting,
|
|
26487
|
+
onError: videoEventHandlers.onError,
|
|
26488
|
+
onSeeking: videoEventHandlers.onSeeking,
|
|
26489
|
+
onSeeked: videoEventHandlers.onSeeked
|
|
26490
|
+
}
|
|
26491
|
+
),
|
|
26492
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AnimatePresence, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26493
|
+
PosterOverlay,
|
|
26494
|
+
{
|
|
26495
|
+
isVisible: !!poster && showPoster,
|
|
26496
|
+
posterUrl: poster,
|
|
26497
|
+
onPlay: togglePlay,
|
|
26498
|
+
onPosterLoad: () => {
|
|
26499
|
+
debugLog("\u2705 Poster loaded successfully");
|
|
26500
|
+
contentDispatch(contentActions.setLoaded(true));
|
|
26501
|
+
},
|
|
26502
|
+
onPosterError: () => {
|
|
26503
|
+
console.error("\u274C Failed to load poster image:", poster);
|
|
26504
|
+
contentDispatch(contentActions.error());
|
|
26505
|
+
},
|
|
26506
|
+
brandColor
|
|
26507
|
+
}
|
|
26508
|
+
) }),
|
|
26509
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AnimatePresence, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26510
|
+
LoadingSpinner,
|
|
26511
|
+
{
|
|
26512
|
+
isVisible: isBuffering,
|
|
26513
|
+
brandColor,
|
|
26514
|
+
size: "md"
|
|
26515
|
+
}
|
|
26516
|
+
) }),
|
|
26517
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26518
|
+
PasswordDialog,
|
|
26519
|
+
{
|
|
26520
|
+
isOpen: showPasswordDialog,
|
|
26521
|
+
password: passwordInput,
|
|
26522
|
+
onPasswordChange: (value) => authDispatch(authActions.setPasswordInput(value)),
|
|
26523
|
+
onSubmit: handlePasswordSubmit,
|
|
26524
|
+
onCancel: handlePasswordCancel,
|
|
26525
|
+
isLoading: isAuthenticating,
|
|
26526
|
+
error: passwordError,
|
|
26527
|
+
brandColor
|
|
26528
|
+
}
|
|
26529
|
+
),
|
|
26530
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AnimatePresence, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26531
|
+
ErrorDisplay,
|
|
26532
|
+
{
|
|
26533
|
+
isVisible: hasError,
|
|
26534
|
+
error,
|
|
26535
|
+
onRetry: retry,
|
|
26536
|
+
brandColor
|
|
26537
|
+
}
|
|
26538
|
+
) }),
|
|
26539
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react53.default.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26540
|
+
VideoOverlays2,
|
|
26541
|
+
{
|
|
26542
|
+
showSkipIndicator,
|
|
26543
|
+
isPictureInPicture,
|
|
26544
|
+
isSeeking,
|
|
26545
|
+
seekingTime,
|
|
26546
|
+
duration,
|
|
26547
|
+
isPlaying,
|
|
26548
|
+
isBuffering,
|
|
26549
|
+
hasError,
|
|
26550
|
+
showSeekbarTutorial,
|
|
26551
|
+
showPoster,
|
|
26552
|
+
showControls,
|
|
26553
|
+
currentUrl,
|
|
26554
|
+
videoTitle: (currentPlaylistItem == null ? void 0 : currentPlaylistItem.title) || videoTitle,
|
|
26555
|
+
playbackRate,
|
|
26556
|
+
showGestureIndicator,
|
|
26557
|
+
gestureType,
|
|
26558
|
+
volume,
|
|
26559
|
+
brightnessLevel,
|
|
26560
|
+
watermark: effectiveWatermark,
|
|
26561
|
+
brandColor,
|
|
26562
|
+
onTogglePlay: togglePlay
|
|
26563
|
+
}
|
|
26564
|
+
) }),
|
|
26565
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorBoundary, { componentName: "CaptionOverlay", minimal: true, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26566
|
+
CaptionOverlay,
|
|
26567
|
+
{
|
|
26568
|
+
captionsEnabled,
|
|
26569
|
+
currentCaption,
|
|
26570
|
+
containerWidth: containerDimensions.width,
|
|
26571
|
+
showControls
|
|
26572
|
+
}
|
|
26573
|
+
) }),
|
|
26574
|
+
showUpNext && hasNextTrack && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26575
|
+
UpNextOverlay,
|
|
26576
|
+
{
|
|
26577
|
+
nextVideoTitle: (() => {
|
|
26578
|
+
var _a;
|
|
26579
|
+
const idx = peekNextIndex();
|
|
26580
|
+
return idx !== null ? ((_a = effectivePlaylist.items[idx]) == null ? void 0 : _a.title) || "Next Video" : "Next Video";
|
|
26581
|
+
})(),
|
|
26582
|
+
countdownSeconds: upNextCountdown,
|
|
26583
|
+
isPaused: !isPlaying,
|
|
26584
|
+
brandColor,
|
|
26585
|
+
onPlayNext: () => {
|
|
26586
|
+
setShowUpNext(false);
|
|
26587
|
+
handleNextTrack();
|
|
26588
|
+
},
|
|
26589
|
+
onCancel: () => {
|
|
26590
|
+
setUpNextCancelled(true);
|
|
26591
|
+
setShowUpNext(false);
|
|
26592
|
+
toast2({
|
|
26593
|
+
title: "Auto-play cancelled",
|
|
26594
|
+
description: "Video will stop at the end.",
|
|
26595
|
+
duration: 2e3
|
|
26596
|
+
});
|
|
26597
|
+
}
|
|
26598
|
+
}
|
|
26599
|
+
),
|
|
26600
|
+
!showSeekbarTutorial && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26601
|
+
ControlBar,
|
|
26602
|
+
{
|
|
26603
|
+
isPlaying,
|
|
26604
|
+
currentTime,
|
|
26605
|
+
duration,
|
|
26606
|
+
buffered,
|
|
26607
|
+
isBuffering,
|
|
26608
|
+
playbackRate,
|
|
26609
|
+
volume,
|
|
26610
|
+
isMuted,
|
|
26611
|
+
isFullscreen,
|
|
26612
|
+
isPictureInPicture,
|
|
26613
|
+
pipSupported,
|
|
26614
|
+
pipButtonDisabled: pipButtonState.disabled,
|
|
26615
|
+
pipButtonReason: pipButtonState.reason,
|
|
26616
|
+
showControls,
|
|
26617
|
+
containerWidth: containerDimensions.width,
|
|
26618
|
+
brandColor,
|
|
26619
|
+
showChaptersButton: chaptersData.length > 0,
|
|
26620
|
+
showCaptionsButton: effectiveCaptions.length > 0,
|
|
26621
|
+
showSettingsButton: true,
|
|
26622
|
+
showPipButton: containerDimensions.width >= 640,
|
|
26623
|
+
showDockButton: chaptersData.length > 0 || transcriptData.length > 0,
|
|
26624
|
+
showPlaylistButton: effectivePlaylist.items.length > 0,
|
|
26625
|
+
onTogglePlaylist: handleTogglePlaylist,
|
|
26626
|
+
onNextTrack: handleNextTrack,
|
|
26627
|
+
onPrevTrack: handlePrevTrack,
|
|
26628
|
+
hasNextTrack,
|
|
26629
|
+
hasPrevTrack,
|
|
26630
|
+
isPlaylistMode,
|
|
26631
|
+
hasChapters: chaptersData.length > 0,
|
|
26632
|
+
hasCaptions: effectiveCaptions.length > 0,
|
|
26633
|
+
captionsEnabled,
|
|
26634
|
+
showDock,
|
|
26635
|
+
chapters: chaptersData,
|
|
26636
|
+
currentChapter: currentChapter != null ? currentChapter : void 0,
|
|
26637
|
+
onTogglePlay: togglePlay,
|
|
26638
|
+
onSkip: skip,
|
|
26639
|
+
onSeek: seek,
|
|
26640
|
+
onVolumeChange: changeVolume,
|
|
26641
|
+
onToggleMute: toggleMute,
|
|
26642
|
+
onToggleFullscreen: toggleFullscreen,
|
|
26643
|
+
onTogglePip: togglePictureInPicture,
|
|
26644
|
+
onRestart: restart,
|
|
26645
|
+
onToggleChapters: toggleChapters,
|
|
26646
|
+
onToggleCaptions: toggleCaptions,
|
|
26647
|
+
onOpenSettings: () => settingsMenuDispatch(settingsMenuActions.toggle()),
|
|
26648
|
+
onToggleDock: toggleDock,
|
|
26649
|
+
onChapterClick: (index) => navigateToChapter(index)
|
|
26650
|
+
}
|
|
26651
|
+
),
|
|
26652
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorBoundary, { componentName: "SettingsMenu", minimal: true, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react53.default.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26653
|
+
SettingsMenu3,
|
|
26654
|
+
{
|
|
26655
|
+
show: showSettingsMenu,
|
|
26656
|
+
showControls,
|
|
26657
|
+
isFullscreen,
|
|
26658
|
+
menuLevel: settingsMenuLevel,
|
|
26659
|
+
captions: effectiveCaptions,
|
|
26660
|
+
captionsEnabled,
|
|
26661
|
+
selectedLanguage,
|
|
26662
|
+
playbackRate,
|
|
26663
|
+
qualityLevels,
|
|
26664
|
+
currentQualityLevel,
|
|
26665
|
+
brandColor,
|
|
26666
|
+
onNavigateToSubmenu: navigateToSettingsSubmenu,
|
|
26667
|
+
onNavigateBack: navigateBackInSettings,
|
|
26668
|
+
onClose: resetSettingsMenu,
|
|
26669
|
+
onCaptionSelect: handleCaptionSelect,
|
|
26670
|
+
onPlaybackRateChange: changePlaybackRate,
|
|
26671
|
+
onQualitySelect: handleQualitySelect
|
|
26672
|
+
}
|
|
26673
|
+
) }) }),
|
|
26674
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorBoundary, { componentName: "DockPanel", minimal: true, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react53.default.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26675
|
+
DockPanel3,
|
|
26676
|
+
{
|
|
26677
|
+
show: showDock,
|
|
26678
|
+
showControls,
|
|
26679
|
+
containerWidth: containerDimensions.width,
|
|
26680
|
+
activeTab: activeDockTab,
|
|
26681
|
+
onTabChange: handleDockTabChange,
|
|
26682
|
+
chapters: chaptersData,
|
|
26683
|
+
currentChapter,
|
|
26684
|
+
onChapterSelect: seek,
|
|
26685
|
+
transcriptData,
|
|
26686
|
+
currentTime,
|
|
26687
|
+
onTranscriptSelect: seekToTranscriptPosition,
|
|
26688
|
+
captions: effectiveCaptions,
|
|
26689
|
+
selectedLanguage,
|
|
26690
|
+
onLanguageChange: handleDockLanguageChange,
|
|
26691
|
+
brandColor,
|
|
26692
|
+
dockRef,
|
|
26693
|
+
onClose: toggleDock,
|
|
26694
|
+
playlist: effectivePlaylist,
|
|
26695
|
+
currentVideoId: currentPlaylistItem == null ? void 0 : currentPlaylistItem.id,
|
|
26696
|
+
onPlaylistSelect: handlePlaylistSelect,
|
|
26697
|
+
isShuffleEnabled,
|
|
26698
|
+
onToggleShuffle: toggleShuffle,
|
|
26699
|
+
shuffleQueue: isShuffleEnabled ? getQueueOrder() : void 0,
|
|
26700
|
+
playedIndices: isShuffleEnabled ? getPlayedIndices() : void 0,
|
|
26701
|
+
nowPlayingTitle: videoTitle || "Video Playground",
|
|
26702
|
+
onTabInteract: handleDockTabChange
|
|
26703
|
+
}
|
|
26704
|
+
) }) })
|
|
26705
|
+
]
|
|
26706
|
+
}
|
|
26707
|
+
) }),
|
|
26708
|
+
showTranscript && transcriptData.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
26709
|
+
VideoTranscript2,
|
|
26710
|
+
{
|
|
26711
|
+
transcriptData,
|
|
26712
|
+
currentTime,
|
|
26713
|
+
onSeek: seekToTranscriptPosition
|
|
26714
|
+
}
|
|
26715
|
+
)
|
|
26716
|
+
]
|
|
26717
|
+
}
|
|
26718
|
+
);
|
|
26702
26719
|
}
|
|
26703
26720
|
SimpleVideoPlayer.displayName = "SimpleVideoPlayer";
|
|
26704
26721
|
function SimpleVideoPlayerWithContext(props) {
|
|
26705
26722
|
const config = (0, import_react53.useMemo)(
|
|
26706
26723
|
() => ({
|
|
26707
|
-
defaultUrl: props.hyperstreamUrl || "",
|
|
26724
|
+
defaultUrl: props.url || props.hyperstreamUrl || "",
|
|
26708
26725
|
autoplay: props.autoplay,
|
|
26709
26726
|
muted: props.muted,
|
|
26710
|
-
poster: props.poster,
|
|
26727
|
+
poster: props.thumbnail || props.poster,
|
|
26711
26728
|
watermark: props.watermark,
|
|
26712
|
-
brandColor: props.brandColor,
|
|
26729
|
+
brandColor: props.primaryColor || props.brandColor,
|
|
26713
26730
|
objectFit: props.objectFit
|
|
26714
26731
|
}),
|
|
26715
26732
|
[
|
|
26733
|
+
props.url,
|
|
26716
26734
|
props.hyperstreamUrl,
|
|
26717
26735
|
props.autoplay,
|
|
26718
26736
|
props.muted,
|
|
26737
|
+
props.thumbnail,
|
|
26719
26738
|
props.poster,
|
|
26720
26739
|
props.watermark,
|
|
26740
|
+
props.primaryColor,
|
|
26721
26741
|
props.brandColor,
|
|
26722
26742
|
props.objectFit
|
|
26723
26743
|
]
|