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