@hyperstream/videoplayer 0.1.3 → 0.1.5

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 CHANGED
@@ -38,10 +38,29 @@ interface SimpleVideoPlayerProps {
38
38
  isMobile?: boolean;
39
39
  brandColor?: string;
40
40
  playlist?: PlaylistConfig;
41
+ url?: string;
42
+ primaryColor?: string;
43
+ thumbnail?: string;
44
+ title?: string;
45
+ artist?: string;
41
46
  }
42
- declare function SimpleVideoPlayer({ poster, watermark, hyperstreamUrl, autoplay, muted, controls, objectFit, containerWidth, isMobile, brandColor, playlist, }: SimpleVideoPlayerProps): react_jsx_runtime.JSX.Element;
43
- declare namespace SimpleVideoPlayer {
47
+ /**
48
+ * SimpleVideoPlayerWithContext - Phase 2 State Consolidation Wrapper
49
+ *
50
+ * This wrapper provides the VideoPlayerStateContext for future migration.
51
+ * Currently the context is provided but NOT consumed - existing reducers
52
+ * continue to manage all state.
53
+ *
54
+ * Migration Plan:
55
+ * 1. ✅ Add wrapper with context provider (this step)
56
+ * 2. 🔄 Gradually migrate reducers to context one at a time
57
+ * 3. 🔜 Remove old reducer code after full migration
58
+ *
59
+ * @production-critical - P1 state consolidation
60
+ */
61
+ declare function SimpleVideoPlayerWithContext(props: SimpleVideoPlayerProps): react_jsx_runtime.JSX.Element;
62
+ declare namespace SimpleVideoPlayerWithContext {
44
63
  var displayName: string;
45
64
  }
46
65
 
47
- export { SimpleVideoPlayer as HyperstreamVideoPlayer };
66
+ export { SimpleVideoPlayerWithContext as HyperstreamVideoPlayer };
package/dist/index.d.ts CHANGED
@@ -38,10 +38,29 @@ interface SimpleVideoPlayerProps {
38
38
  isMobile?: boolean;
39
39
  brandColor?: string;
40
40
  playlist?: PlaylistConfig;
41
+ url?: string;
42
+ primaryColor?: string;
43
+ thumbnail?: string;
44
+ title?: string;
45
+ artist?: string;
41
46
  }
42
- declare function SimpleVideoPlayer({ poster, watermark, hyperstreamUrl, autoplay, muted, controls, objectFit, containerWidth, isMobile, brandColor, playlist, }: SimpleVideoPlayerProps): react_jsx_runtime.JSX.Element;
43
- declare namespace SimpleVideoPlayer {
47
+ /**
48
+ * SimpleVideoPlayerWithContext - Phase 2 State Consolidation Wrapper
49
+ *
50
+ * This wrapper provides the VideoPlayerStateContext for future migration.
51
+ * Currently the context is provided but NOT consumed - existing reducers
52
+ * continue to manage all state.
53
+ *
54
+ * Migration Plan:
55
+ * 1. ✅ Add wrapper with context provider (this step)
56
+ * 2. 🔄 Gradually migrate reducers to context one at a time
57
+ * 3. 🔜 Remove old reducer code after full migration
58
+ *
59
+ * @production-critical - P1 state consolidation
60
+ */
61
+ declare function SimpleVideoPlayerWithContext(props: SimpleVideoPlayerProps): react_jsx_runtime.JSX.Element;
62
+ declare namespace SimpleVideoPlayerWithContext {
44
63
  var displayName: string;
45
64
  }
46
65
 
47
- export { SimpleVideoPlayer as HyperstreamVideoPlayer };
66
+ export { SimpleVideoPlayerWithContext as HyperstreamVideoPlayer };
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: () => SimpleVideoPlayer
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 = "#d0d684",
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: [] };
@@ -26704,20 +26713,23 @@ SimpleVideoPlayer.displayName = "SimpleVideoPlayer";
26704
26713
  function SimpleVideoPlayerWithContext(props) {
26705
26714
  const config = (0, import_react53.useMemo)(
26706
26715
  () => ({
26707
- defaultUrl: props.hyperstreamUrl || "",
26716
+ defaultUrl: props.url || props.hyperstreamUrl || "",
26708
26717
  autoplay: props.autoplay,
26709
26718
  muted: props.muted,
26710
- poster: props.poster,
26719
+ poster: props.thumbnail || props.poster,
26711
26720
  watermark: props.watermark,
26712
- brandColor: props.brandColor,
26721
+ brandColor: props.primaryColor || props.brandColor,
26713
26722
  objectFit: props.objectFit
26714
26723
  }),
26715
26724
  [
26725
+ props.url,
26716
26726
  props.hyperstreamUrl,
26717
26727
  props.autoplay,
26718
26728
  props.muted,
26729
+ props.thumbnail,
26719
26730
  props.poster,
26720
26731
  props.watermark,
26732
+ props.primaryColor,
26721
26733
  props.brandColor,
26722
26734
  props.objectFit
26723
26735
  ]