@videojs/react 10.0.0-beta.17 → 10.0.0-beta.21
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/default/index.js +1 -2
- package/dist/default/media/dash-video/index.js +2 -2
- package/dist/default/media/dash-video/index.js.map +1 -1
- package/dist/default/media/hls-video/index.js +2 -2
- package/dist/default/media/hls-video/index.js.map +1 -1
- package/dist/default/media/mux-audio/index.js +3 -3
- package/dist/default/media/mux-audio/index.js.map +1 -1
- package/dist/default/media/mux-video/index.js +3 -3
- package/dist/default/media/mux-video/index.js.map +1 -1
- package/dist/default/media/native-hls-video/index.js +2 -2
- package/dist/default/media/native-hls-video/index.js.map +1 -1
- package/dist/default/media/simple-hls-video/index.js +1 -2
- package/dist/default/media/simple-hls-video/index.js.map +1 -1
- package/dist/default/player/context.js.map +1 -1
- package/dist/default/ui/alert-dialog/alert-dialog-root.js +1 -1
- package/dist/default/ui/buffering-indicator/buffering-indicator.js +1 -1
- package/dist/default/ui/captions-button/captions-button.js +1 -1
- package/dist/default/ui/controls/controls-root.js +1 -1
- package/dist/default/ui/error-dialog/error-dialog-root.js +1 -1
- package/dist/default/ui/fullscreen-button/fullscreen-button.js +1 -1
- package/dist/default/ui/mute-button/mute-button.js +1 -1
- package/dist/default/ui/pip-button/pip-button.js +1 -1
- package/dist/default/ui/play-button/play-button.js +1 -1
- package/dist/default/ui/playback-rate-button/playback-rate-button.js +1 -1
- package/dist/default/ui/popover/popover-root.js +1 -1
- package/dist/default/ui/poster/poster.js +1 -1
- package/dist/default/ui/seek-button/seek-button.js +1 -1
- package/dist/default/ui/slider/slider-root.js +1 -1
- package/dist/default/ui/thumbnail/thumbnail.js +1 -1
- package/dist/default/ui/time/time-value.js +1 -1
- package/dist/default/ui/time-slider/time-slider-root.js +1 -1
- package/dist/default/ui/tooltip/tooltip-popup.js +1 -1
- package/dist/default/ui/tooltip/tooltip-provider.js +1 -1
- package/dist/default/ui/tooltip/tooltip-root.js +1 -1
- package/dist/default/ui/volume-slider/volume-slider-root.js +1 -1
- package/dist/default/utils/media-props.js.map +1 -1
- package/dist/default/utils/use-media-instance.js.map +1 -1
- package/dist/dev/index.d.ts +1 -2
- package/dist/dev/index.js +1 -2
- package/dist/dev/media/dash-video/index.d.ts +4 -4
- package/dist/dev/media/dash-video/index.d.ts.map +1 -1
- package/dist/dev/media/dash-video/index.js +2 -2
- package/dist/dev/media/dash-video/index.js.map +1 -1
- package/dist/dev/media/hls-video/index.d.ts +4 -4
- package/dist/dev/media/hls-video/index.d.ts.map +1 -1
- package/dist/dev/media/hls-video/index.js +2 -2
- package/dist/dev/media/hls-video/index.js.map +1 -1
- package/dist/dev/media/mux-audio/index.d.ts +4 -4
- package/dist/dev/media/mux-audio/index.d.ts.map +1 -1
- package/dist/dev/media/mux-audio/index.js +3 -3
- package/dist/dev/media/mux-audio/index.js.map +1 -1
- package/dist/dev/media/mux-video/index.d.ts +4 -4
- package/dist/dev/media/mux-video/index.d.ts.map +1 -1
- package/dist/dev/media/mux-video/index.js +3 -3
- package/dist/dev/media/mux-video/index.js.map +1 -1
- package/dist/dev/media/native-hls-video/index.d.ts +4 -4
- package/dist/dev/media/native-hls-video/index.d.ts.map +1 -1
- package/dist/dev/media/native-hls-video/index.js +2 -2
- package/dist/dev/media/native-hls-video/index.js.map +1 -1
- package/dist/dev/media/simple-hls-video/index.d.ts.map +1 -1
- package/dist/dev/media/simple-hls-video/index.js +1 -2
- package/dist/dev/media/simple-hls-video/index.js.map +1 -1
- package/dist/dev/player/context.d.ts +6 -5
- package/dist/dev/player/context.d.ts.map +1 -1
- package/dist/dev/player/context.js.map +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-close.d.ts +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-description.d.ts +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-popup.d.ts +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-root.d.ts +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-root.js +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-title.d.ts +1 -1
- package/dist/dev/ui/alert-dialog/context.d.ts +3 -2
- package/dist/dev/ui/alert-dialog/context.d.ts.map +1 -1
- package/dist/dev/ui/buffering-indicator/buffering-indicator.d.ts +1 -1
- package/dist/dev/ui/buffering-indicator/buffering-indicator.js +1 -1
- package/dist/dev/ui/captions-button/captions-button.d.ts +1 -1
- package/dist/dev/ui/captions-button/captions-button.js +1 -1
- package/dist/dev/ui/controls/controls-group.d.ts +1 -1
- package/dist/dev/ui/controls/controls-root.d.ts +1 -1
- package/dist/dev/ui/controls/controls-root.js +1 -1
- package/dist/dev/ui/error-dialog/context.d.ts +1 -0
- package/dist/dev/ui/error-dialog/context.d.ts.map +1 -1
- package/dist/dev/ui/error-dialog/error-dialog-description.d.ts +1 -1
- package/dist/dev/ui/error-dialog/error-dialog-root.js +1 -1
- package/dist/dev/ui/fullscreen-button/fullscreen-button.d.ts +1 -1
- package/dist/dev/ui/fullscreen-button/fullscreen-button.js +1 -1
- package/dist/dev/ui/hooks/use-slider.d.ts +1 -1
- package/dist/dev/ui/mute-button/mute-button.d.ts +1 -1
- package/dist/dev/ui/mute-button/mute-button.js +1 -1
- package/dist/dev/ui/pip-button/pip-button.d.ts +1 -1
- package/dist/dev/ui/pip-button/pip-button.js +1 -1
- package/dist/dev/ui/play-button/play-button.d.ts +1 -1
- package/dist/dev/ui/play-button/play-button.js +1 -1
- package/dist/dev/ui/playback-rate-button/playback-rate-button.d.ts +1 -1
- package/dist/dev/ui/playback-rate-button/playback-rate-button.js +1 -1
- package/dist/dev/ui/popover/context.d.ts +3 -2
- package/dist/dev/ui/popover/context.d.ts.map +1 -1
- package/dist/dev/ui/popover/popover-arrow.d.ts +1 -1
- package/dist/dev/ui/popover/popover-popup.d.ts +1 -1
- package/dist/dev/ui/popover/popover-root.d.ts +1 -1
- package/dist/dev/ui/popover/popover-root.js +1 -1
- package/dist/dev/ui/popover/popover-trigger.d.ts +1 -1
- package/dist/dev/ui/poster/poster.d.ts +1 -1
- package/dist/dev/ui/poster/poster.js +1 -1
- package/dist/dev/ui/seek-button/seek-button.d.ts +1 -1
- package/dist/dev/ui/seek-button/seek-button.js +1 -1
- package/dist/dev/ui/slider/slider-buffer.d.ts +1 -1
- package/dist/dev/ui/slider/slider-fill.d.ts +1 -1
- package/dist/dev/ui/slider/slider-preview.d.ts +1 -1
- package/dist/dev/ui/slider/slider-root.d.ts +1 -1
- package/dist/dev/ui/slider/slider-root.js +1 -1
- package/dist/dev/ui/slider/slider-thumb.d.ts +1 -1
- package/dist/dev/ui/slider/slider-thumbnail.d.ts +1 -1
- package/dist/dev/ui/slider/slider-track.d.ts +1 -1
- package/dist/dev/ui/slider/slider-value.d.ts +1 -1
- package/dist/dev/ui/thumbnail/thumbnail.d.ts +1 -1
- package/dist/dev/ui/thumbnail/thumbnail.js +1 -1
- package/dist/dev/ui/time/time-value.d.ts +1 -1
- package/dist/dev/ui/time/time-value.js +1 -1
- package/dist/dev/ui/time-slider/time-slider-root.d.ts +1 -1
- package/dist/dev/ui/time-slider/time-slider-root.js +1 -1
- package/dist/dev/ui/tooltip/context.d.ts +3 -2
- package/dist/dev/ui/tooltip/context.d.ts.map +1 -1
- package/dist/dev/ui/tooltip/tooltip-arrow.d.ts +1 -1
- package/dist/dev/ui/tooltip/tooltip-popup.d.ts +1 -1
- package/dist/dev/ui/tooltip/tooltip-popup.js +1 -1
- package/dist/dev/ui/tooltip/tooltip-provider.d.ts +1 -1
- package/dist/dev/ui/tooltip/tooltip-provider.js +1 -1
- package/dist/dev/ui/tooltip/tooltip-root.d.ts +1 -1
- package/dist/dev/ui/tooltip/tooltip-root.js +1 -1
- package/dist/dev/ui/tooltip/tooltip-trigger.d.ts +1 -1
- package/dist/dev/ui/volume-slider/volume-slider-root.d.ts +1 -1
- package/dist/dev/ui/volume-slider/volume-slider-root.js +1 -1
- package/dist/dev/utils/media-props.d.ts +2 -2
- package/dist/dev/utils/media-props.d.ts.map +1 -1
- package/dist/dev/utils/media-props.js.map +1 -1
- package/dist/dev/utils/use-media-instance.d.ts +1 -1
- package/dist/dev/utils/use-media-instance.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createMediaButton } from "../create-media-button.js";
|
|
3
|
-
import { PlayButtonCore, PlayButtonDataAttrs } from "@videojs/core";
|
|
4
3
|
import { selectPlayback } from "@videojs/core/dom";
|
|
4
|
+
import { PlayButtonCore, PlayButtonDataAttrs } from "@videojs/core";
|
|
5
5
|
//#region src/ui/play-button/play-button.tsx
|
|
6
6
|
/**
|
|
7
7
|
* A button that toggles playback.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { PlaybackRateButtonCore } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { PlaybackRateButtonCore } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/playback-rate-button/playback-rate-button.d.ts
|
|
6
6
|
interface PlaybackRateButtonProps extends UIComponentProps<'button', PlaybackRateButtonCore.State>, PlaybackRateButtonCore.Props {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createMediaButton } from "../create-media-button.js";
|
|
3
|
-
import { PlaybackRateButtonCore, PlaybackRateButtonDataAttrs } from "@videojs/core";
|
|
4
3
|
import { selectPlaybackRate } from "@videojs/core/dom";
|
|
4
|
+
import { PlaybackRateButtonCore, PlaybackRateButtonDataAttrs } from "@videojs/core";
|
|
5
5
|
//#region src/ui/playback-rate-button/playback-rate-button.tsx
|
|
6
6
|
/**
|
|
7
7
|
* A button that cycles through playback rates.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { PopoverCore, StateAttrMap } from "@videojs/core";
|
|
2
1
|
import { PopoverApi } from "@videojs/core/dom";
|
|
2
|
+
import { PopoverCore, StateAttrMap as StateAttrMap$1 } from "@videojs/core";
|
|
3
|
+
|
|
3
4
|
//#region src/ui/popover/context.d.ts
|
|
4
5
|
interface PopoverContextValue {
|
|
5
6
|
core: PopoverCore;
|
|
6
7
|
popover: PopoverApi;
|
|
7
8
|
state: PopoverCore.State;
|
|
8
|
-
stateAttrMap: StateAttrMap<PopoverCore.State>;
|
|
9
|
+
stateAttrMap: StateAttrMap$1<PopoverCore.State>;
|
|
9
10
|
anchorName: string;
|
|
10
11
|
popupId: string;
|
|
11
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","names":[],"sources":["../../../../src/ui/popover/context.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","names":[],"sources":["../../../../src/ui/popover/context.tsx"],"mappings":";;;;UAMiB,mBAAA;EACf,IAAA,EAAM,WAAA;EACN,OAAA,EAAS,UAAA;EACT,KAAA,EAAO,WAAA,CAAY,KAAA;EACnB,YAAA,EAAc,cAAA,CAAa,WAAA,CAAY,KAAA;EACvC,UAAA;EACA,OAAA;AAAA;AAAA,iBAOc,iBAAA,CAAA,GAAqB,mBAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { PopoverState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { PopoverState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/popover/popover-arrow.d.ts
|
|
6
6
|
interface PopoverArrowProps extends UIComponentProps<'div', PopoverState> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { PopoverState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { PopoverState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/popover/popover-popup.d.ts
|
|
6
6
|
interface PopoverPopupProps extends UIComponentProps<'div', PopoverState> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PopoverProps } from "@videojs/core";
|
|
2
1
|
import { PopoverChangeDetails } from "@videojs/core/dom";
|
|
3
2
|
import { ReactNode } from "react";
|
|
3
|
+
import { PopoverProps } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/popover/popover-root.d.ts
|
|
6
6
|
interface PopoverRootProps extends PopoverProps {
|
|
@@ -3,11 +3,11 @@ import { useLatestRef } from "../../utils/use-latest-ref.js";
|
|
|
3
3
|
import { useDestroy } from "../../utils/use-destroy.js";
|
|
4
4
|
import { useSafeId } from "../../utils/use-safe-id.js";
|
|
5
5
|
import { PopoverContextProvider } from "./context.js";
|
|
6
|
-
import { PopoverCore, PopoverDataAttrs } from "@videojs/core";
|
|
7
6
|
import { createPopover, createTransition } from "@videojs/core/dom";
|
|
8
7
|
import { useSnapshot } from "@videojs/store/react";
|
|
9
8
|
import { useEffect, useState } from "react";
|
|
10
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import { PopoverCore, PopoverDataAttrs } from "@videojs/core";
|
|
11
11
|
//#region src/ui/popover/popover-root.tsx
|
|
12
12
|
function PopoverRoot({ open: controlledOpen, defaultOpen = PopoverCore.defaultProps.defaultOpen, onOpenChange: onOpenChangeProp, onOpenChangeComplete: onOpenChangeCompleteProp, openOnHover = PopoverCore.defaultProps.openOnHover, delay = PopoverCore.defaultProps.delay, closeDelay = PopoverCore.defaultProps.closeDelay, children, ...coreProps }) {
|
|
13
13
|
const [core] = useState(() => new PopoverCore(coreProps));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { PopoverState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { PopoverState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/popover/popover-trigger.d.ts
|
|
6
6
|
interface PopoverTriggerProps extends UIComponentProps<'button', PopoverState> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { PosterCore } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { PosterCore } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/poster/poster.d.ts
|
|
6
6
|
interface PosterProps extends UIComponentProps<'img', PosterCore.State> {}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { usePlayer } from "../../player/context.js";
|
|
3
3
|
import { renderElement } from "../../utils/use-render.js";
|
|
4
|
-
import { PosterCore, PosterDataAttrs } from "@videojs/core";
|
|
5
4
|
import { logMissingFeature, selectPlayback } from "@videojs/core/dom";
|
|
6
5
|
import { forwardRef, useState } from "react";
|
|
6
|
+
import { PosterCore, PosterDataAttrs } from "@videojs/core";
|
|
7
7
|
//#region src/ui/poster/poster.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Displays the video poster image. Shows before playback starts, hides after.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { SeekButtonCore } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { SeekButtonCore } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/seek-button/seek-button.d.ts
|
|
6
6
|
interface SeekButtonProps extends UIComponentProps<'button', SeekButtonCore.State>, SeekButtonCore.Props {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createMediaButton } from "../create-media-button.js";
|
|
3
|
-
import { SeekButtonCore, SeekButtonDataAttrs } from "@videojs/core";
|
|
4
3
|
import { selectTime } from "@videojs/core/dom";
|
|
4
|
+
import { SeekButtonCore, SeekButtonDataAttrs } from "@videojs/core";
|
|
5
5
|
//#region src/ui/seek-button/seek-button.tsx
|
|
6
6
|
/**
|
|
7
7
|
* A button that seeks forward or backward by a configurable number of seconds.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { SliderState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { SliderState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/slider/slider-buffer.d.ts
|
|
6
6
|
interface SliderBufferProps extends UIComponentProps<'div', SliderState> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { SliderState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { SliderState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/slider/slider-fill.d.ts
|
|
6
6
|
interface SliderFillProps extends UIComponentProps<'div', SliderState> {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { SliderState } from "@videojs/core";
|
|
3
2
|
import { SliderPreviewOverflow } from "@videojs/core/dom";
|
|
4
3
|
import * as react from "react";
|
|
4
|
+
import { SliderState } from "@videojs/core";
|
|
5
5
|
|
|
6
6
|
//#region src/ui/slider/slider-preview.d.ts
|
|
7
7
|
interface SliderPreviewProps extends UIComponentProps<'div', SliderState> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { SliderCore } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { SliderCore } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/slider/slider-root.d.ts
|
|
6
6
|
interface SliderRootProps extends UIComponentProps<'div', SliderCore.State>, SliderCore.Props {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { renderElement } from "../../utils/use-render.js";
|
|
3
3
|
import { useSlider } from "../hooks/use-slider.js";
|
|
4
4
|
import { SliderProvider } from "./context.js";
|
|
5
|
-
import { SliderCore, SliderDataAttrs } from "@videojs/core";
|
|
6
5
|
import { getSliderCSSVars } from "@videojs/core/dom";
|
|
7
6
|
import { forwardRef, useState } from "react";
|
|
8
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { SliderCore, SliderDataAttrs } from "@videojs/core";
|
|
9
9
|
//#region src/ui/slider/slider-root.tsx
|
|
10
10
|
const SliderRoot = forwardRef(function SliderRoot(componentProps, forwardedRef) {
|
|
11
11
|
const { render, className, style, label, min, max, step, largeStep, orientation, disabled, thumbAlignment, value = 0, onValueChange, onValueCommit, onDragStart, onDragEnd, ...elementProps } = componentProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { SliderState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { SliderState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/slider/slider-thumb.d.ts
|
|
6
6
|
interface SliderThumbProps extends UIComponentProps<'div', SliderState> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThumbnailProps } from "../thumbnail/thumbnail.js";
|
|
2
|
-
import { ThumbnailCore } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { ThumbnailCore } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/slider/slider-thumbnail.d.ts
|
|
6
6
|
interface SliderThumbnailProps extends Omit<ThumbnailProps, 'time'> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { SliderState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { SliderState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/slider/slider-track.d.ts
|
|
6
6
|
interface SliderTrackProps extends UIComponentProps<'div', SliderState> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { SliderState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { SliderState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/slider/slider-value.d.ts
|
|
6
6
|
interface SliderValueProps extends UIComponentProps<'output', SliderState> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { ThumbnailCore, ThumbnailImage } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { ThumbnailCore, ThumbnailImage } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/thumbnail/thumbnail.d.ts
|
|
6
6
|
interface ThumbnailProps extends UIComponentProps<'div', ThumbnailCore.State>, ThumbnailCore.Props {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { useOptionalPlayer } from "../../player/context.js";
|
|
3
3
|
import { useDestroy } from "../../utils/use-destroy.js";
|
|
4
4
|
import { renderElement } from "../../utils/use-render.js";
|
|
5
|
-
import { ThumbnailCore, ThumbnailDataAttrs, mapCuesToThumbnails } from "@videojs/core";
|
|
6
5
|
import { createThumbnail, selectTextTrack } from "@videojs/core/dom";
|
|
7
6
|
import { forwardRef, useMemo, useRef, useState } from "react";
|
|
8
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { ThumbnailCore, ThumbnailDataAttrs, mapCuesToThumbnails } from "@videojs/core";
|
|
9
9
|
//#region src/ui/thumbnail/thumbnail.tsx
|
|
10
10
|
const Thumbnail = forwardRef(function Thumbnail(componentProps, forwardedRef) {
|
|
11
11
|
const { render, className, style, time = 0, thumbnails: externalThumbnails, crossOrigin, loading, fetchPriority, ...elementProps } = componentProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { TimeCore } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { TimeCore } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/time/time-value.d.ts
|
|
6
6
|
interface ValueProps extends Omit<UIComponentProps<'time', TimeCore.State>, 'children'>, TimeCore.Props {}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { usePlayer } from "../../player/context.js";
|
|
3
3
|
import { renderElement } from "../../utils/use-render.js";
|
|
4
|
-
import { TimeCore, TimeDataAttrs } from "@videojs/core";
|
|
5
4
|
import { logMissingFeature, selectTime } from "@videojs/core/dom";
|
|
6
5
|
import { forwardRef, useState } from "react";
|
|
7
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { TimeCore, TimeDataAttrs } from "@videojs/core";
|
|
8
8
|
//#region src/ui/time/time-value.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Displays a formatted time value (current, duration, or remaining).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { TimeSliderCore } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { TimeSliderCore } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/time-slider/time-slider-root.d.ts
|
|
6
6
|
interface TimeSliderRootProps extends UIComponentProps<'div', TimeSliderCore.State>, TimeSliderCore.Props {
|
|
@@ -4,10 +4,10 @@ import { useLatestRef } from "../../utils/use-latest-ref.js";
|
|
|
4
4
|
import { renderElement } from "../../utils/use-render.js";
|
|
5
5
|
import { useSlider } from "../hooks/use-slider.js";
|
|
6
6
|
import { SliderProvider } from "../slider/context.js";
|
|
7
|
-
import { TimeSliderCore, TimeSliderDataAttrs } from "@videojs/core";
|
|
8
7
|
import { getTimeSliderCSSVars, logMissingFeature, selectBuffer, selectTime } from "@videojs/core/dom";
|
|
9
8
|
import { forwardRef, useState } from "react";
|
|
10
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import { TimeSliderCore, TimeSliderDataAttrs } from "@videojs/core";
|
|
11
11
|
import { formatTime } from "@videojs/utils/time";
|
|
12
12
|
//#region src/ui/time-slider/time-slider-root.tsx
|
|
13
13
|
const noopSeek = () => Promise.resolve(0);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { StateAttrMap, TooltipCore } from "@videojs/core";
|
|
2
1
|
import { TooltipApi } from "@videojs/core/dom";
|
|
2
|
+
import { StateAttrMap as StateAttrMap$1, TooltipCore } from "@videojs/core";
|
|
3
|
+
|
|
3
4
|
//#region src/ui/tooltip/context.d.ts
|
|
4
5
|
interface TooltipContextValue {
|
|
5
6
|
core: TooltipCore;
|
|
6
7
|
tooltip: TooltipApi;
|
|
7
8
|
state: TooltipCore.State;
|
|
8
|
-
stateAttrMap: StateAttrMap<TooltipCore.State>;
|
|
9
|
+
stateAttrMap: StateAttrMap$1<TooltipCore.State>;
|
|
9
10
|
anchorName: string;
|
|
10
11
|
popupId: string;
|
|
11
12
|
content: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","names":[],"sources":["../../../../src/ui/tooltip/context.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","names":[],"sources":["../../../../src/ui/tooltip/context.tsx"],"mappings":";;;;UAMiB,mBAAA;EACf,IAAA,EAAM,WAAA;EACN,OAAA,EAAS,UAAA;EACT,KAAA,EAAO,WAAA,CAAY,KAAA;EACnB,YAAA,EAAc,cAAA,CAAa,WAAA,CAAY,KAAA;EACvC,UAAA;EACA,OAAA;EACA,OAAA;EACA,UAAA,GAAa,OAAA;AAAA;AAAA,iBAOC,iBAAA,CAAA,GAAqB,mBAAA;AAAA,iBAMrB,yBAAA,CAAA,GAA6B,mBAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { TooltipState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { TooltipState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/tooltip/tooltip-arrow.d.ts
|
|
6
6
|
interface TooltipArrowProps extends UIComponentProps<'div', TooltipState> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { TooltipState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { TooltipState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/tooltip/tooltip-popup.d.ts
|
|
6
6
|
interface TooltipPopupProps extends UIComponentProps<'div', TooltipState> {}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { useComposedRefs } from "../../utils/use-composed-refs.js";
|
|
3
3
|
import { renderElement } from "../../utils/use-render.js";
|
|
4
4
|
import { useTooltipContext } from "./context.js";
|
|
5
|
-
import { TooltipCSSVars } from "@videojs/core";
|
|
6
5
|
import { getAnchorPositionStyle, getPopupPositionRect, resolveOffsets } from "@videojs/core/dom";
|
|
7
6
|
import { forwardRef, useCallback, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
7
|
+
import { TooltipCSSVars } from "@videojs/core";
|
|
8
8
|
import { supportsAnchorPositioning } from "@videojs/utils/dom";
|
|
9
9
|
//#region src/ui/tooltip/tooltip-popup.tsx
|
|
10
10
|
const POPUP_RESET = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { TooltipGroupContextProvider } from "./group-context.js";
|
|
3
|
-
import { TooltipGroupCore } from "@videojs/core";
|
|
4
3
|
import { useState } from "react";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { TooltipGroupCore } from "@videojs/core";
|
|
6
6
|
//#region src/ui/tooltip/tooltip-provider.tsx
|
|
7
7
|
function TooltipProvider({ delay, closeDelay, timeout, children }) {
|
|
8
8
|
const [group] = useState(() => new TooltipGroupCore({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TooltipProps } from "@videojs/core";
|
|
2
1
|
import { TooltipChangeDetails } from "@videojs/core/dom";
|
|
3
2
|
import { ReactNode } from "react";
|
|
3
|
+
import { TooltipProps } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/tooltip/tooltip-root.d.ts
|
|
6
6
|
interface TooltipRootProps extends TooltipProps {
|
|
@@ -4,11 +4,11 @@ import { useDestroy } from "../../utils/use-destroy.js";
|
|
|
4
4
|
import { useSafeId } from "../../utils/use-safe-id.js";
|
|
5
5
|
import { TooltipContextProvider } from "./context.js";
|
|
6
6
|
import { useTooltipGroup } from "./group-context.js";
|
|
7
|
-
import { TooltipCore, TooltipDataAttrs } from "@videojs/core";
|
|
8
7
|
import { createTooltip, createTransition } from "@videojs/core/dom";
|
|
9
8
|
import { useSnapshot } from "@videojs/store/react";
|
|
10
9
|
import { useEffect, useState } from "react";
|
|
11
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
import { TooltipCore, TooltipDataAttrs } from "@videojs/core";
|
|
12
12
|
//#region src/ui/tooltip/tooltip-root.tsx
|
|
13
13
|
function TooltipRoot({ open: controlledOpen, defaultOpen = TooltipCore.defaultProps.defaultOpen, onOpenChange: onOpenChangeProp, onOpenChangeComplete: onOpenChangeCompleteProp, delay = TooltipCore.defaultProps.delay, closeDelay = TooltipCore.defaultProps.closeDelay, disableHoverablePopup = TooltipCore.defaultProps.disableHoverablePopup, disabled = TooltipCore.defaultProps.disabled, children, ...coreProps }) {
|
|
14
14
|
const [core] = useState(() => new TooltipCore(coreProps));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { TooltipState } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { TooltipState } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/tooltip/tooltip-trigger.d.ts
|
|
6
6
|
interface TooltipTriggerProps extends UIComponentProps<'button', TooltipState> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import { VolumeSliderCore } from "@videojs/core";
|
|
3
2
|
import * as react from "react";
|
|
3
|
+
import { VolumeSliderCore } from "@videojs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/volume-slider/volume-slider-root.d.ts
|
|
6
6
|
interface VolumeSliderRootProps extends UIComponentProps<'div', VolumeSliderCore.State>, VolumeSliderCore.Props {
|
|
@@ -4,10 +4,10 @@ import { useLatestRef } from "../../utils/use-latest-ref.js";
|
|
|
4
4
|
import { renderElement } from "../../utils/use-render.js";
|
|
5
5
|
import { useSlider } from "../hooks/use-slider.js";
|
|
6
6
|
import { SliderProvider } from "../slider/context.js";
|
|
7
|
-
import { VolumeSliderCore, VolumeSliderDataAttrs } from "@videojs/core";
|
|
8
7
|
import { createWheelStep, getSliderCSSVars, logMissingFeature, selectVolume } from "@videojs/core/dom";
|
|
9
8
|
import { forwardRef, useCallback, useRef, useState } from "react";
|
|
10
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import { VolumeSliderCore, VolumeSliderDataAttrs } from "@videojs/core";
|
|
11
11
|
import { listen } from "@videojs/utils/dom";
|
|
12
12
|
//#region src/ui/volume-slider/volume-slider-root.tsx
|
|
13
13
|
const noopVolume = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Media } from "@videojs/core";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/media-props.d.ts
|
|
4
4
|
type AnyClass = abstract new (...args: any[]) => any;
|
|
5
|
-
declare function mediaProps(media:
|
|
5
|
+
declare function mediaProps(media: Media, DelegateClass: AnyClass, props: Record<string, any>): Record<string, any>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { mediaProps };
|
|
8
8
|
//# sourceMappingURL=media-props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-props.d.ts","names":[],"sources":["../../../src/utils/media-props.ts"],"mappings":";;;KAEK,QAAA,oBAA4B,IAAA;AAAA,iBAajB,UAAA,CAAW,KAAA,EAAO,
|
|
1
|
+
{"version":3,"file":"media-props.d.ts","names":[],"sources":["../../../src/utils/media-props.ts"],"mappings":";;;KAEK,QAAA,oBAA4B,IAAA;AAAA,iBAajB,UAAA,CAAW,KAAA,EAAO,KAAA,EAAO,aAAA,EAAe,QAAA,EAAU,KAAA,EAAO,MAAA,gBAAmB,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-props.js","names":[],"sources":["../../../src/utils/media-props.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"media-props.js","names":[],"sources":["../../../src/utils/media-props.ts"],"sourcesContent":["import type { Media } from '@videojs/core';\n\ntype AnyClass = abstract new (...args: any[]) => any;\n\nfunction getSettableProps(DelegateClass: AnyClass): Set<string> {\n const props = new Set<string>();\n for (let proto = DelegateClass.prototype; proto && proto !== Object.prototype; proto = Object.getPrototypeOf(proto)) {\n for (const key of Object.getOwnPropertyNames(proto)) {\n const desc = Object.getOwnPropertyDescriptor(proto, key);\n if (desc?.set) props.add(key);\n }\n }\n return props;\n}\n\nexport function mediaProps(media: Media, DelegateClass: AnyClass, props: Record<string, any>) {\n const delegateKeys = getSettableProps(DelegateClass);\n const rest: Record<string, any> = {};\n\n for (const key of Object.keys(props)) {\n if (delegateKeys.has(key)) {\n const value = props[key];\n if ((media as any)[key] !== value) {\n (media as any)[key] = value;\n }\n } else {\n rest[key] = props[key];\n }\n }\n\n return rest;\n}\n"],"mappings":";AAIA,SAAS,iBAAiB,eAAsC;CAC9D,MAAM,wBAAQ,IAAI,KAAa;AAC/B,MAAK,IAAI,QAAQ,cAAc,WAAW,SAAS,UAAU,OAAO,WAAW,QAAQ,OAAO,eAAe,MAAM,CACjH,MAAK,MAAM,OAAO,OAAO,oBAAoB,MAAM,CAEjD,KADa,OAAO,yBAAyB,OAAO,IAAI,EAC9C,IAAK,OAAM,IAAI,IAAI;AAGjC,QAAO;;AAGT,SAAgB,WAAW,OAAc,eAAyB,OAA4B;CAC5F,MAAM,eAAe,iBAAiB,cAAc;CACpD,MAAM,OAA4B,EAAE;AAEpC,MAAK,MAAM,OAAO,OAAO,KAAK,MAAM,CAClC,KAAI,aAAa,IAAI,IAAI,EAAE;EACzB,MAAM,QAAQ,MAAM;AACpB,MAAK,MAAc,SAAS,MACzB,OAAc,OAAO;OAGxB,MAAK,OAAO,MAAM;AAItB,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-media-instance.js","names":[],"sources":["../../../src/utils/use-media-instance.ts"],"sourcesContent":["'use client';\n\nimport type { Media } from '@videojs/core
|
|
1
|
+
{"version":3,"file":"use-media-instance.js","names":[],"sources":["../../../src/utils/use-media-instance.ts"],"sourcesContent":["'use client';\n\nimport type { Media } from '@videojs/core';\nimport { useState } from 'react';\n\nimport { useMediaAttach } from '../player/context';\nimport { useDestroy } from './use-destroy';\n\n/**\n * Create and manage a media instance lifecycle within a player context.\n *\n * Instantiates the media class once, attaches it to the player on mount,\n * and safely detaches on unmount using a functional updater to avoid race\n * conditions when swapping media components (e.g. DashVideo → HlsVideo).\n */\nexport function useMediaInstance<Instance extends Media & { destroy(): void }>(\n MediaClass: new () => Instance\n): Instance {\n const [instance] = useState(() => new MediaClass());\n const setMedia = useMediaAttach();\n\n useDestroy(\n instance,\n () => setMedia?.(instance),\n () => setMedia?.((prev) => (prev === instance ? null : prev))\n );\n\n return instance;\n}\n"],"mappings":";;;;;;;;;;;;AAeA,SAAgB,iBACd,YACU;CACV,MAAM,CAAC,YAAY,eAAe,IAAI,YAAY,CAAC;CACnD,MAAM,WAAW,gBAAgB;AAEjC,YACE,gBACM,WAAW,SAAS,QACpB,YAAY,SAAU,SAAS,WAAW,OAAO,KAAM,CAC9D;AAED,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@videojs/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "10.0.0-beta.
|
|
4
|
+
"version": "10.0.0-beta.21",
|
|
5
5
|
"description": "React library for building media players",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"react": "^18.0.0 || ^19.0.0"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@videojs/
|
|
69
|
-
"@videojs/
|
|
70
|
-
"@videojs/utils": "10.0.0-beta.
|
|
71
|
-
"@videojs/
|
|
68
|
+
"@videojs/core": "10.0.0-beta.21",
|
|
69
|
+
"@videojs/spf": "10.0.0-beta.21",
|
|
70
|
+
"@videojs/utils": "10.0.0-beta.21",
|
|
71
|
+
"@videojs/store": "10.0.0-beta.21"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@testing-library/react": "^16.3.0",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"tsdown": "^0.21.4",
|
|
80
80
|
"typescript": "^6.0.2",
|
|
81
81
|
"vitest": "^4.1.0",
|
|
82
|
-
"@videojs/
|
|
83
|
-
"@videojs/
|
|
82
|
+
"@videojs/icons": "10.0.0-beta.21",
|
|
83
|
+
"@videojs/skins": "10.0.0-beta.21"
|
|
84
84
|
},
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|