@hyperstream/videoplayer 0.1.5 → 0.1.7

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