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