@videojs/react 10.0.0-beta.10 → 10.0.0-beta.11
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 +9 -2
- 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/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/dev/index.d.ts +9 -2
- package/dist/dev/index.js +9 -2
- package/dist/dev/player/context.d.ts +11 -1
- package/dist/dev/player/context.d.ts.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 +2 -3
- 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/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 +2 -3
- 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 +2 -3
- 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/attach-media-element.d.ts +9 -0
- package/dist/dev/utils/attach-media-element.d.ts.map +1 -0
- package/dist/dev/utils/media-props.d.ts +307 -0
- package/dist/dev/utils/media-props.d.ts.map +1 -0
- package/dist/dev/utils/use-composed-refs.d.ts +29 -0
- package/dist/dev/utils/use-composed-refs.d.ts.map +1 -0
- package/dist/dev/utils/use-destroy.d.ts +22 -0
- package/dist/dev/utils/use-destroy.d.ts.map +1 -0
- package/dist/dev/utils/use-latest-ref.d.ts +18 -0
- package/dist/dev/utils/use-latest-ref.d.ts.map +1 -0
- package/dist/dev/utils/use-media-instance.d.ts +16 -0
- package/dist/dev/utils/use-media-instance.d.ts.map +1 -0
- package/package.json +9 -9
package/dist/default/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { composeRefs, useComposedRefs } from "./utils/use-composed-refs.js";
|
|
4
|
+
import { Container, useContainer, useContainerAttach, useMedia, useMediaAttach, useOptionalPlayer, usePlayer, usePlayerContext } from "./player/context.js";
|
|
5
|
+
import { useLatestRef } from "./utils/use-latest-ref.js";
|
|
6
|
+
import { useDestroy } from "./utils/use-destroy.js";
|
|
4
7
|
import { createPlayer } from "./player/create-player.js";
|
|
5
8
|
import { useAlertDialogContext } from "./ui/alert-dialog/context.js";
|
|
6
9
|
import { mergeProps } from "./utils/merge-props.js";
|
|
@@ -27,9 +30,13 @@ import { index_parts_exports as index_parts_exports$5 } from "./ui/time-slider/i
|
|
|
27
30
|
import { useTooltipContext } from "./ui/tooltip/context.js";
|
|
28
31
|
import { index_parts_exports as index_parts_exports$6 } from "./ui/tooltip/index.parts.js";
|
|
29
32
|
import { index_parts_exports as index_parts_exports$7 } from "./ui/volume-slider/index.parts.js";
|
|
33
|
+
import { attachMediaElement } from "./utils/attach-media-element.js";
|
|
34
|
+
import { mediaProps } from "./utils/media-props.js";
|
|
35
|
+
import { useMediaInstance } from "./utils/use-media-instance.js";
|
|
36
|
+
import { DelegateMixin } from "@videojs/core";
|
|
30
37
|
import { createSelector, shallowEqual } from "@videojs/store";
|
|
31
38
|
import { useSelector, useStore } from "@videojs/store/react";
|
|
32
39
|
|
|
33
40
|
export * from "@videojs/core/dom"
|
|
34
41
|
|
|
35
|
-
export { index_parts_exports as AlertDialog, BufferingIndicator, CaptionsButton, Container, index_parts_exports$1 as Controls, FullscreenButton, MuteButton, PiPButton, PlayButton, PlaybackRateButton, index_parts_exports$2 as Popover, Poster, SeekButton, index_parts_exports$3 as Slider, Thumbnail, index_parts_exports$4 as Time, index_parts_exports$5 as TimeSlider, index_parts_exports$6 as Tooltip, index_parts_exports$7 as VolumeSlider, createPlayer, createSelector, mergeProps, renderElement, shallowEqual, useAlertDialogContext, useButton, useContainer, useContainerAttach, useMedia, useMediaAttach, usePlayer, usePlayerContext, usePopoverContext, useSelector, useSlider, useStore, useTooltipContext };
|
|
42
|
+
export { index_parts_exports as AlertDialog, BufferingIndicator, CaptionsButton, Container, index_parts_exports$1 as Controls, DelegateMixin, FullscreenButton, MuteButton, PiPButton, PlayButton, PlaybackRateButton, index_parts_exports$2 as Popover, Poster, SeekButton, index_parts_exports$3 as Slider, Thumbnail, index_parts_exports$4 as Time, index_parts_exports$5 as TimeSlider, index_parts_exports$6 as Tooltip, index_parts_exports$7 as VolumeSlider, attachMediaElement, composeRefs, createPlayer, createSelector, mediaProps, mergeProps, renderElement, shallowEqual, useAlertDialogContext, useButton, useComposedRefs, useContainer, useContainerAttach, useDestroy, useLatestRef, useMedia, useMediaAttach, useMediaInstance, useOptionalPlayer, usePlayer, usePlayerContext, usePopoverContext, useSelector, useSlider, useStore, useTooltipContext };
|
|
@@ -4,11 +4,11 @@ import { useLatestRef } from "../../utils/use-latest-ref.js";
|
|
|
4
4
|
import { useDestroy } from "../../utils/use-destroy.js";
|
|
5
5
|
import { AlertDialogContextProvider } from "./context.js";
|
|
6
6
|
import { useSafeId } from "../../utils/use-safe-id.js";
|
|
7
|
+
import { AlertDialogCore, AlertDialogDataAttrs } from "@videojs/core";
|
|
7
8
|
import { createAlertDialog, createTransition } from "@videojs/core/dom";
|
|
8
9
|
import { useSnapshot } from "@videojs/store/react";
|
|
9
10
|
import { useEffect, useState } from "react";
|
|
10
11
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
import { AlertDialogCore, AlertDialogDataAttrs } from "@videojs/core";
|
|
12
12
|
|
|
13
13
|
//#region src/ui/alert-dialog/alert-dialog-root.tsx
|
|
14
14
|
function AlertDialogRoot({ open: controlledOpen, defaultOpen = AlertDialogCore.defaultProps.defaultOpen, onOpenChange: onOpenChangeProp, onOpenChangeComplete: onOpenChangeCompleteProp, children }) {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { usePlayer } from "../../player/context.js";
|
|
4
4
|
import { useDestroy } from "../../utils/use-destroy.js";
|
|
5
5
|
import { renderElement } from "../../utils/use-render.js";
|
|
6
|
+
import { BufferingIndicatorCore, BufferingIndicatorDataAttrs } from "@videojs/core";
|
|
6
7
|
import { selectPlayback } from "@videojs/core/dom";
|
|
7
8
|
import { forwardRef, useState, useSyncExternalStore } from "react";
|
|
8
|
-
import { BufferingIndicatorCore, BufferingIndicatorDataAttrs } from "@videojs/core";
|
|
9
9
|
|
|
10
10
|
//#region src/ui/buffering-indicator/buffering-indicator.tsx
|
|
11
11
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectTextTrack } from "@videojs/core/dom";
|
|
5
4
|
import { CaptionsButtonCore, CaptionsButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectTextTrack } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/captions-button/captions-button.tsx
|
|
8
8
|
/** A button that toggles captions. */
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { usePlayer } from "../../player/context.js";
|
|
4
4
|
import { renderElement } from "../../utils/use-render.js";
|
|
5
5
|
import { ControlsContextProvider } from "./context.js";
|
|
6
|
+
import { ControlsCore, ControlsDataAttrs } from "@videojs/core";
|
|
6
7
|
import { selectControls } from "@videojs/core/dom";
|
|
7
8
|
import { forwardRef, useState } from "react";
|
|
8
9
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
import { ControlsCore, ControlsDataAttrs } from "@videojs/core";
|
|
10
10
|
|
|
11
11
|
//#region src/ui/controls/controls-root.tsx
|
|
12
12
|
/** Root container for player controls state and rendered control content. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectFullscreen } from "@videojs/core/dom";
|
|
5
4
|
import { FullscreenButtonCore, FullscreenButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectFullscreen } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/fullscreen-button/fullscreen-button.tsx
|
|
8
8
|
/** A button that toggles fullscreen. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectVolume } from "@videojs/core/dom";
|
|
5
4
|
import { MuteButtonCore, MuteButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectVolume } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/mute-button/mute-button.tsx
|
|
8
8
|
/** A button that toggles mute state. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectPiP } from "@videojs/core/dom";
|
|
5
4
|
import { PiPButtonCore, PiPButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectPiP } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/pip-button/pip-button.tsx
|
|
8
8
|
/** A button that toggles picture-in-picture. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectPlayback } from "@videojs/core/dom";
|
|
5
4
|
import { PlayButtonCore, PlayButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectPlayback } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/play-button/play-button.tsx
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectPlaybackRate } from "@videojs/core/dom";
|
|
5
4
|
import { PlaybackRateButtonCore, PlaybackRateButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectPlaybackRate } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/playback-rate-button/playback-rate-button.tsx
|
|
8
8
|
/**
|
|
@@ -4,11 +4,11 @@ import { useLatestRef } from "../../utils/use-latest-ref.js";
|
|
|
4
4
|
import { useDestroy } from "../../utils/use-destroy.js";
|
|
5
5
|
import { useSafeId } from "../../utils/use-safe-id.js";
|
|
6
6
|
import { PopoverContextProvider } from "./context.js";
|
|
7
|
+
import { PopoverCore, PopoverDataAttrs } from "@videojs/core";
|
|
7
8
|
import { createPopover, createTransition } from "@videojs/core/dom";
|
|
8
9
|
import { useSnapshot } from "@videojs/store/react";
|
|
9
10
|
import { useEffect, useState } from "react";
|
|
10
11
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
import { PopoverCore, PopoverDataAttrs } from "@videojs/core";
|
|
12
12
|
|
|
13
13
|
//#region src/ui/popover/popover-root.tsx
|
|
14
14
|
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 }) {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { usePlayer } from "../../player/context.js";
|
|
4
4
|
import { renderElement } from "../../utils/use-render.js";
|
|
5
|
+
import { PosterCore, PosterDataAttrs } from "@videojs/core";
|
|
5
6
|
import { selectPlayback } from "@videojs/core/dom";
|
|
6
7
|
import { forwardRef, useState } from "react";
|
|
7
|
-
import { PosterCore, PosterDataAttrs } from "@videojs/core";
|
|
8
8
|
|
|
9
9
|
//#region src/ui/poster/poster.tsx
|
|
10
10
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectTime } from "@videojs/core/dom";
|
|
5
4
|
import { SeekButtonCore, SeekButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectTime } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/seek-button/seek-button.tsx
|
|
8
8
|
/**
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { renderElement } from "../../utils/use-render.js";
|
|
4
4
|
import { useSlider } from "../hooks/use-slider.js";
|
|
5
5
|
import { SliderProvider } from "./context.js";
|
|
6
|
+
import { SliderCore, SliderDataAttrs } from "@videojs/core";
|
|
6
7
|
import { getSliderCSSVars } from "@videojs/core/dom";
|
|
7
8
|
import { forwardRef, useState } from "react";
|
|
8
9
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
import { SliderCore, SliderDataAttrs } from "@videojs/core";
|
|
10
10
|
|
|
11
11
|
//#region src/ui/slider/slider-root.tsx
|
|
12
12
|
const SliderRoot = forwardRef(function SliderRoot(componentProps, forwardedRef) {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { useOptionalPlayer } from "../../player/context.js";
|
|
4
4
|
import { useDestroy } from "../../utils/use-destroy.js";
|
|
5
5
|
import { renderElement } from "../../utils/use-render.js";
|
|
6
|
+
import { ThumbnailCore, ThumbnailDataAttrs, mapCuesToThumbnails } from "@videojs/core";
|
|
6
7
|
import { createThumbnail, selectTextTrack } from "@videojs/core/dom";
|
|
7
8
|
import { forwardRef, useMemo, useRef, useState } from "react";
|
|
8
9
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
import { ThumbnailCore, ThumbnailDataAttrs, mapCuesToThumbnails } from "@videojs/core";
|
|
10
10
|
|
|
11
11
|
//#region src/ui/thumbnail/thumbnail.tsx
|
|
12
12
|
const Thumbnail = forwardRef(function Thumbnail(componentProps, forwardedRef) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { usePlayer } from "../../player/context.js";
|
|
4
4
|
import { renderElement } from "../../utils/use-render.js";
|
|
5
|
+
import { TimeCore, TimeDataAttrs } from "@videojs/core";
|
|
5
6
|
import { selectTime } from "@videojs/core/dom";
|
|
6
7
|
import { forwardRef, useState } from "react";
|
|
7
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { TimeCore, TimeDataAttrs } from "@videojs/core";
|
|
9
9
|
|
|
10
10
|
//#region src/ui/time/time-value.tsx
|
|
11
11
|
/**
|
|
@@ -5,10 +5,10 @@ import { useLatestRef } from "../../utils/use-latest-ref.js";
|
|
|
5
5
|
import { renderElement } from "../../utils/use-render.js";
|
|
6
6
|
import { useSlider } from "../hooks/use-slider.js";
|
|
7
7
|
import { SliderProvider } from "../slider/context.js";
|
|
8
|
+
import { TimeSliderCore, TimeSliderDataAttrs } from "@videojs/core";
|
|
8
9
|
import { getTimeSliderCSSVars, selectBuffer, selectTime } from "@videojs/core/dom";
|
|
9
10
|
import { forwardRef, useState } from "react";
|
|
10
11
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
import { TimeSliderCore, TimeSliderDataAttrs } from "@videojs/core";
|
|
12
12
|
import { formatTime } from "@videojs/utils/time";
|
|
13
13
|
|
|
14
14
|
//#region src/ui/time-slider/time-slider-root.tsx
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { useComposedRefs } from "../../utils/use-composed-refs.js";
|
|
4
4
|
import { renderElement } from "../../utils/use-render.js";
|
|
5
5
|
import { useTooltipContext } from "./context.js";
|
|
6
|
+
import { TooltipCSSVars } from "@videojs/core";
|
|
6
7
|
import { getAnchorPositionStyle, getPopupPositionRect, resolveOffsets } from "@videojs/core/dom";
|
|
7
8
|
import { forwardRef, useCallback, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
8
|
-
import { TooltipCSSVars } from "@videojs/core";
|
|
9
9
|
import { supportsAnchorPositioning } from "@videojs/utils/dom";
|
|
10
10
|
|
|
11
11
|
//#region src/ui/tooltip/tooltip-popup.tsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { TooltipGroupContextProvider } from "./group-context.js";
|
|
4
|
+
import { TooltipGroupCore } from "@videojs/core";
|
|
4
5
|
import { useState } from "react";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { TooltipGroupCore } from "@videojs/core";
|
|
7
7
|
|
|
8
8
|
//#region src/ui/tooltip/tooltip-provider.tsx
|
|
9
9
|
function TooltipProvider({ delay, closeDelay, timeout, children }) {
|
|
@@ -5,11 +5,11 @@ import { useDestroy } from "../../utils/use-destroy.js";
|
|
|
5
5
|
import { useSafeId } from "../../utils/use-safe-id.js";
|
|
6
6
|
import { TooltipContextProvider } from "./context.js";
|
|
7
7
|
import { useTooltipGroup } from "./group-context.js";
|
|
8
|
+
import { TooltipCore, TooltipDataAttrs } from "@videojs/core";
|
|
8
9
|
import { createTooltip, createTransition } from "@videojs/core/dom";
|
|
9
10
|
import { useSnapshot } from "@videojs/store/react";
|
|
10
11
|
import { useEffect, useState } from "react";
|
|
11
12
|
import { jsx } from "react/jsx-runtime";
|
|
12
|
-
import { TooltipCore, TooltipDataAttrs } from "@videojs/core";
|
|
13
13
|
|
|
14
14
|
//#region src/ui/tooltip/tooltip-root.tsx
|
|
15
15
|
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 }) {
|
|
@@ -5,10 +5,10 @@ import { useLatestRef } from "../../utils/use-latest-ref.js";
|
|
|
5
5
|
import { renderElement } from "../../utils/use-render.js";
|
|
6
6
|
import { useSlider } from "../hooks/use-slider.js";
|
|
7
7
|
import { SliderProvider } from "../slider/context.js";
|
|
8
|
+
import { VolumeSliderCore, VolumeSliderDataAttrs } from "@videojs/core";
|
|
8
9
|
import { getSliderCSSVars, selectVolume } from "@videojs/core/dom";
|
|
9
10
|
import { forwardRef, useState } from "react";
|
|
10
11
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
import { VolumeSliderCore, VolumeSliderDataAttrs } from "@videojs/core";
|
|
12
12
|
|
|
13
13
|
//#region src/ui/volume-slider/volume-slider-root.tsx
|
|
14
14
|
const noopVolume = {
|
package/dist/dev/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, ContainerProps, PlayerContextValue, useContainer, useContainerAttach, useMedia, useMediaAttach, usePlayer, usePlayerContext } from "./player/context.js";
|
|
1
|
+
import { Container, ContainerProps, PlayerContextValue, useContainer, useContainerAttach, useMedia, useMediaAttach, useOptionalPlayer, usePlayer, usePlayerContext } from "./player/context.js";
|
|
2
2
|
import { CreatePlayerConfig, CreatePlayerResult, ProviderProps, createPlayer } from "./player/create-player.js";
|
|
3
3
|
import { AlertDialogContextValue, useAlertDialogContext } from "./ui/alert-dialog/context.js";
|
|
4
4
|
import { HTMLProps, RenderFunction, RenderProp, UIComponentProps } from "./utils/types.js";
|
|
@@ -33,9 +33,16 @@ import { index_parts_d_exports as index_parts_d_exports$5 } from "./ui/time-slid
|
|
|
33
33
|
import { TooltipContextValue, useTooltipContext } from "./ui/tooltip/context.js";
|
|
34
34
|
import { index_parts_d_exports as index_parts_d_exports$6 } from "./ui/tooltip/index.parts.js";
|
|
35
35
|
import { index_parts_d_exports as index_parts_d_exports$7 } from "./ui/volume-slider/index.parts.js";
|
|
36
|
+
import { attachMediaElement } from "./utils/attach-media-element.js";
|
|
37
|
+
import { mediaProps } from "./utils/media-props.js";
|
|
36
38
|
import { mergeProps } from "./utils/merge-props.js";
|
|
39
|
+
import { composeRefs, useComposedRefs } from "./utils/use-composed-refs.js";
|
|
40
|
+
import { useDestroy } from "./utils/use-destroy.js";
|
|
41
|
+
import { useLatestRef } from "./utils/use-latest-ref.js";
|
|
42
|
+
import { useMediaInstance } from "./utils/use-media-instance.js";
|
|
37
43
|
import { renderElement } from "./utils/use-render.js";
|
|
44
|
+
import { Delegate, DelegateMixin } from "@videojs/core";
|
|
38
45
|
import { Comparator, Selector, createSelector, shallowEqual } from "@videojs/store";
|
|
39
46
|
import { useSelector, useStore } from "@videojs/store/react";
|
|
40
47
|
export * from "@videojs/core/dom";
|
|
41
|
-
export { index_parts_d_exports as AlertDialog, type AlertDialogContextValue, BufferingIndicator, type BufferingIndicatorProps, CaptionsButton, type CaptionsButtonProps, type Comparator, Container, type ContainerProps, index_parts_d_exports$1 as Controls, type ControlsGroupProps, type ControlsRootProps, type CreatePlayerConfig, type CreatePlayerResult, FullscreenButton, type FullscreenButtonProps, type HTMLProps, MuteButton, type MuteButtonProps, PiPButton, type PiPButtonProps, PlayButton, type PlayButtonProps, PlaybackRateButton, type PlaybackRateButtonProps, type PlayerContextValue, index_parts_d_exports$2 as Popover, type PopoverContextValue, Poster, type PosterProps, type ProviderProps, type RenderFunction, type RenderProp, SeekButton, type SeekButtonProps, type Selector, index_parts_d_exports$3 as Slider, type SliderBufferProps, type SliderFillProps, type SliderRootProps, type SliderThumbProps, type SliderThumbnailProps, type SliderTrackProps, type SliderValueProps, Thumbnail, type ThumbnailProps, index_parts_d_exports$4 as Time, index_parts_d_exports$5 as TimeSlider, index_parts_d_exports$6 as Tooltip, type TooltipContextValue, type UIComponentProps, index_parts_d_exports$7 as VolumeSlider, createPlayer, createSelector, mergeProps, renderElement, shallowEqual, useAlertDialogContext, useButton, useContainer, useContainerAttach, useMedia, useMediaAttach, usePlayer, usePlayerContext, usePopoverContext, useSelector, useSlider, useStore, useTooltipContext };
|
|
48
|
+
export { index_parts_d_exports as AlertDialog, type AlertDialogContextValue, BufferingIndicator, type BufferingIndicatorProps, CaptionsButton, type CaptionsButtonProps, type Comparator, Container, type ContainerProps, index_parts_d_exports$1 as Controls, type ControlsGroupProps, type ControlsRootProps, type CreatePlayerConfig, type CreatePlayerResult, type Delegate, DelegateMixin, FullscreenButton, type FullscreenButtonProps, type HTMLProps, MuteButton, type MuteButtonProps, PiPButton, type PiPButtonProps, PlayButton, type PlayButtonProps, PlaybackRateButton, type PlaybackRateButtonProps, type PlayerContextValue, index_parts_d_exports$2 as Popover, type PopoverContextValue, Poster, type PosterProps, type ProviderProps, type RenderFunction, type RenderProp, SeekButton, type SeekButtonProps, type Selector, index_parts_d_exports$3 as Slider, type SliderBufferProps, type SliderFillProps, type SliderRootProps, type SliderThumbProps, type SliderThumbnailProps, type SliderTrackProps, type SliderValueProps, Thumbnail, type ThumbnailProps, index_parts_d_exports$4 as Time, index_parts_d_exports$5 as TimeSlider, index_parts_d_exports$6 as Tooltip, type TooltipContextValue, type UIComponentProps, index_parts_d_exports$7 as VolumeSlider, attachMediaElement, composeRefs, createPlayer, createSelector, mediaProps, mergeProps, renderElement, shallowEqual, useAlertDialogContext, useButton, useComposedRefs, useContainer, useContainerAttach, useDestroy, useLatestRef, useMedia, useMediaAttach, useMediaInstance, useOptionalPlayer, usePlayer, usePlayerContext, usePopoverContext, useSelector, useSlider, useStore, useTooltipContext };
|
package/dist/dev/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { composeRefs, useComposedRefs } from "./utils/use-composed-refs.js";
|
|
4
|
+
import { Container, useContainer, useContainerAttach, useMedia, useMediaAttach, useOptionalPlayer, usePlayer, usePlayerContext } from "./player/context.js";
|
|
5
|
+
import { useLatestRef } from "./utils/use-latest-ref.js";
|
|
6
|
+
import { useDestroy } from "./utils/use-destroy.js";
|
|
4
7
|
import { createPlayer } from "./player/create-player.js";
|
|
5
8
|
import { useAlertDialogContext } from "./ui/alert-dialog/context.js";
|
|
6
9
|
import { mergeProps } from "./utils/merge-props.js";
|
|
@@ -27,9 +30,13 @@ import { index_parts_exports as index_parts_exports$5 } from "./ui/time-slider/i
|
|
|
27
30
|
import { useTooltipContext } from "./ui/tooltip/context.js";
|
|
28
31
|
import { index_parts_exports as index_parts_exports$6 } from "./ui/tooltip/index.parts.js";
|
|
29
32
|
import { index_parts_exports as index_parts_exports$7 } from "./ui/volume-slider/index.parts.js";
|
|
33
|
+
import { attachMediaElement } from "./utils/attach-media-element.js";
|
|
34
|
+
import { mediaProps } from "./utils/media-props.js";
|
|
35
|
+
import { useMediaInstance } from "./utils/use-media-instance.js";
|
|
36
|
+
import { DelegateMixin } from "@videojs/core";
|
|
30
37
|
import { createSelector, shallowEqual } from "@videojs/store";
|
|
31
38
|
import { useSelector, useStore } from "@videojs/store/react";
|
|
32
39
|
|
|
33
40
|
export * from "@videojs/core/dom"
|
|
34
41
|
|
|
35
|
-
export { index_parts_exports as AlertDialog, BufferingIndicator, CaptionsButton, Container, index_parts_exports$1 as Controls, FullscreenButton, MuteButton, PiPButton, PlayButton, PlaybackRateButton, index_parts_exports$2 as Popover, Poster, SeekButton, index_parts_exports$3 as Slider, Thumbnail, index_parts_exports$4 as Time, index_parts_exports$5 as TimeSlider, index_parts_exports$6 as Tooltip, index_parts_exports$7 as VolumeSlider, createPlayer, createSelector, mergeProps, renderElement, shallowEqual, useAlertDialogContext, useButton, useContainer, useContainerAttach, useMedia, useMediaAttach, usePlayer, usePlayerContext, usePopoverContext, useSelector, useSlider, useStore, useTooltipContext };
|
|
42
|
+
export { index_parts_exports as AlertDialog, BufferingIndicator, CaptionsButton, Container, index_parts_exports$1 as Controls, DelegateMixin, FullscreenButton, MuteButton, PiPButton, PlayButton, PlaybackRateButton, index_parts_exports$2 as Popover, Poster, SeekButton, index_parts_exports$3 as Slider, Thumbnail, index_parts_exports$4 as Time, index_parts_exports$5 as TimeSlider, index_parts_exports$6 as Tooltip, index_parts_exports$7 as VolumeSlider, attachMediaElement, composeRefs, createPlayer, createSelector, mediaProps, mergeProps, renderElement, shallowEqual, useAlertDialogContext, useButton, useComposedRefs, useContainer, useContainerAttach, useDestroy, useLatestRef, useMedia, useMediaAttach, useMediaInstance, useOptionalPlayer, usePlayer, usePlayerContext, usePopoverContext, useSelector, useSlider, useStore, useTooltipContext };
|
|
@@ -26,6 +26,16 @@ declare function usePlayer(): UnknownStore;
|
|
|
26
26
|
* @param selector - Derives a value from the player store state.
|
|
27
27
|
*/
|
|
28
28
|
declare function usePlayer<R>(selector: (state: UnknownState) => R): R;
|
|
29
|
+
/**
|
|
30
|
+
* Access player state when available, but return `undefined` outside Provider.
|
|
31
|
+
*
|
|
32
|
+
* This is useful for components that can operate without player context
|
|
33
|
+
* (e.g. they accept fully explicit props as a fallback).
|
|
34
|
+
*/
|
|
35
|
+
/** @label Without Selector */
|
|
36
|
+
declare function useOptionalPlayer(): UnknownStore | undefined;
|
|
37
|
+
/** @label With Selector */
|
|
38
|
+
declare function useOptionalPlayer<R>(selector: (state: UnknownState) => R): R | undefined;
|
|
29
39
|
/** Access the media element from within a Player Provider. */
|
|
30
40
|
declare function useMedia(): Media | null;
|
|
31
41
|
/** Access the container element from within a Player Provider. */
|
|
@@ -42,5 +52,5 @@ declare namespace Container {
|
|
|
42
52
|
type Props = ContainerProps;
|
|
43
53
|
}
|
|
44
54
|
//#endregion
|
|
45
|
-
export { Container, ContainerProps, PlayerContextValue, useContainer, useContainerAttach, useMedia, useMediaAttach, usePlayer, usePlayerContext };
|
|
55
|
+
export { Container, ContainerProps, PlayerContextValue, useContainer, useContainerAttach, useMedia, useMediaAttach, useOptionalPlayer, usePlayer, usePlayerContext };
|
|
46
56
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","names":[],"sources":["../../../src/player/context.tsx"],"mappings":";;;;;;UAUiB,kBAAA;EACf,KAAA,EAAO,YAAA;EACP,KAAA,EAAO,KAAA;EACP,QAAA,EAAU,QAAA,CAAS,cAAA,CAAe,KAAA;EAClC,SAAA,EAAW,cAAA;EACX,YAAA,EAAc,QAAA,CAAS,cAAA,CAAe,WAAA;AAAA;;iBAqBxB,gBAAA,CAAA,GAAoB,kBAAA;;;;;;iBAWpB,SAAA,CAAA,GAAa,YAAA;;;;;;;iBAOb,SAAA,GAAA,CAAa,QAAA,GAAW,KAAA,EAAO,YAAA,KAAiB,CAAA,GAAI,CAAA;;
|
|
1
|
+
{"version":3,"file":"context.d.ts","names":[],"sources":["../../../src/player/context.tsx"],"mappings":";;;;;;UAUiB,kBAAA;EACf,KAAA,EAAO,YAAA;EACP,KAAA,EAAO,KAAA;EACP,QAAA,EAAU,QAAA,CAAS,cAAA,CAAe,KAAA;EAClC,SAAA,EAAW,cAAA;EACX,YAAA,EAAc,QAAA,CAAS,cAAA,CAAe,WAAA;AAAA;;iBAqBxB,gBAAA,CAAA,GAAoB,kBAAA;;;;;;iBAWpB,SAAA,CAAA,GAAa,YAAA;;;;;;;iBAOb,SAAA,GAAA,CAAa,QAAA,GAAW,KAAA,EAAO,YAAA,KAAiB,CAAA,GAAI,CAAA;;;;;;;;iBAapD,iBAAA,CAAA,GAAqB,YAAA;;iBAErB,iBAAA,GAAA,CAAqB,QAAA,GAAW,KAAA,EAAO,YAAA,KAAiB,CAAA,GAAI,CAAA;;iBAS5D,QAAA,CAAA,GAAY,KAAA;AA/B5B;AAAA,iBAqCgB,YAAA,CAAA,GAAgB,cAAA;;iBAMhB,cAAA,CAAA,GAAkB,QAAA,CAAS,cAAA,CAAe,KAAA;;iBAM1C,kBAAA,CAAA,GAAsB,QAAA,CAAS,cAAA,CAAe,WAAA;AAAA,UAK7C,cAAA,SAAuB,cAAA,CAAe,cAAA;EACrD,QAAA,GAAW,SAAA;AAAA;AAAA,cAGA,SAAA,EAAS,KAAA,CAAA,yBAAA,CAAA,cAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA;AAAA,kBAiBL,SAAA;EAAA,KACH,KAAA,GAAQ,cAAA;AAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import * as react from "react";
|
|
3
2
|
import { AlertDialogCore } from "@videojs/core";
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/alert-dialog/alert-dialog-close.d.ts
|
|
6
6
|
interface AlertDialogCloseProps extends UIComponentProps<'button', AlertDialogCore.State> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import * as react from "react";
|
|
3
2
|
import { AlertDialogCore } from "@videojs/core";
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/alert-dialog/alert-dialog-description.d.ts
|
|
6
6
|
interface AlertDialogDescriptionProps extends UIComponentProps<'p', AlertDialogCore.State> {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import * as react from "react";
|
|
3
2
|
import { AlertDialogCore } from "@videojs/core";
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/alert-dialog/alert-dialog-popup.d.ts
|
|
6
6
|
interface AlertDialogPopupProps extends UIComponentProps<'div', AlertDialogCore.State> {}
|
|
@@ -4,11 +4,11 @@ import { useLatestRef } from "../../utils/use-latest-ref.js";
|
|
|
4
4
|
import { useDestroy } from "../../utils/use-destroy.js";
|
|
5
5
|
import { AlertDialogContextProvider } from "./context.js";
|
|
6
6
|
import { useSafeId } from "../../utils/use-safe-id.js";
|
|
7
|
+
import { AlertDialogCore, AlertDialogDataAttrs } from "@videojs/core";
|
|
7
8
|
import { createAlertDialog, createTransition } from "@videojs/core/dom";
|
|
8
9
|
import { useSnapshot } from "@videojs/store/react";
|
|
9
10
|
import { useEffect, useState } from "react";
|
|
10
11
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
import { AlertDialogCore, AlertDialogDataAttrs } from "@videojs/core";
|
|
12
12
|
|
|
13
13
|
//#region src/ui/alert-dialog/alert-dialog-root.tsx
|
|
14
14
|
function AlertDialogRoot({ open: controlledOpen, defaultOpen = AlertDialogCore.defaultProps.defaultOpen, onOpenChange: onOpenChangeProp, onOpenChangeComplete: onOpenChangeCompleteProp, children }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import * as react from "react";
|
|
3
2
|
import { AlertDialogCore } from "@videojs/core";
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/alert-dialog/alert-dialog-title.d.ts
|
|
6
6
|
interface AlertDialogTitleProps extends UIComponentProps<'h2', AlertDialogCore.State> {}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { AlertDialogCore, StateAttrMap } from "@videojs/core";
|
|
1
2
|
import { AlertDialogApi } from "@videojs/core/dom";
|
|
2
|
-
import { AlertDialogCore, StateAttrMap as StateAttrMap$1 } from "@videojs/core";
|
|
3
|
-
|
|
4
3
|
//#region src/ui/alert-dialog/context.d.ts
|
|
5
4
|
interface AlertDialogContextValue {
|
|
6
5
|
core: AlertDialogCore;
|
|
7
6
|
dialog: AlertDialogApi;
|
|
8
7
|
state: AlertDialogCore.State;
|
|
9
|
-
stateAttrMap: StateAttrMap
|
|
8
|
+
stateAttrMap: StateAttrMap<AlertDialogCore.State>;
|
|
10
9
|
}
|
|
11
10
|
declare function useAlertDialogContext(): AlertDialogContextValue;
|
|
12
11
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","names":[],"sources":["../../../../src/ui/alert-dialog/context.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","names":[],"sources":["../../../../src/ui/alert-dialog/context.tsx"],"mappings":";;;UAMiB,uBAAA;EACf,IAAA,EAAM,eAAA;EACN,MAAA,EAAQ,cAAA;EACR,KAAA,EAAO,eAAA,CAAgB,KAAA;EACvB,YAAA,EAAc,YAAA,CAAa,eAAA,CAAgB,KAAA;AAAA;AAAA,iBAO7B,qBAAA,CAAA,GAAyB,uBAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import * as react from "react";
|
|
3
2
|
import { BufferingIndicatorCore } from "@videojs/core";
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/buffering-indicator/buffering-indicator.d.ts
|
|
6
6
|
interface BufferingIndicatorProps extends UIComponentProps<'div', BufferingIndicatorCore.State>, BufferingIndicatorCore.Props {}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { usePlayer } from "../../player/context.js";
|
|
4
4
|
import { useDestroy } from "../../utils/use-destroy.js";
|
|
5
5
|
import { renderElement } from "../../utils/use-render.js";
|
|
6
|
+
import { BufferingIndicatorCore, BufferingIndicatorDataAttrs } from "@videojs/core";
|
|
6
7
|
import { logMissingFeature, selectPlayback } from "@videojs/core/dom";
|
|
7
8
|
import { forwardRef, useState, useSyncExternalStore } from "react";
|
|
8
|
-
import { BufferingIndicatorCore, BufferingIndicatorDataAttrs } from "@videojs/core";
|
|
9
9
|
|
|
10
10
|
//#region src/ui/buffering-indicator/buffering-indicator.tsx
|
|
11
11
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import * as react from "react";
|
|
3
2
|
import { CaptionsButtonCore } from "@videojs/core";
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/captions-button/captions-button.d.ts
|
|
6
6
|
interface CaptionsButtonProps extends UIComponentProps<'button', CaptionsButtonCore.State>, CaptionsButtonCore.Props {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectTextTrack } from "@videojs/core/dom";
|
|
5
4
|
import { CaptionsButtonCore, CaptionsButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectTextTrack } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/captions-button/captions-button.tsx
|
|
8
8
|
/** A button that toggles captions. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
+
import { ControlsCore } from "@videojs/core";
|
|
2
3
|
import * as react from "react";
|
|
3
4
|
import { ReactNode } from "react";
|
|
4
|
-
import { ControlsCore } from "@videojs/core";
|
|
5
5
|
|
|
6
6
|
//#region src/ui/controls/controls-group.d.ts
|
|
7
7
|
interface ControlsGroupProps extends UIComponentProps<'div', ControlsCore.State> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
+
import { ControlsCore } from "@videojs/core";
|
|
2
3
|
import * as react from "react";
|
|
3
4
|
import { ReactNode } from "react";
|
|
4
|
-
import { ControlsCore } from "@videojs/core";
|
|
5
5
|
|
|
6
6
|
//#region src/ui/controls/controls-root.d.ts
|
|
7
7
|
interface ControlsRootProps extends UIComponentProps<'div', ControlsCore.State> {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { usePlayer } from "../../player/context.js";
|
|
4
4
|
import { renderElement } from "../../utils/use-render.js";
|
|
5
5
|
import { ControlsContextProvider } from "./context.js";
|
|
6
|
+
import { ControlsCore, ControlsDataAttrs } from "@videojs/core";
|
|
6
7
|
import { logMissingFeature, selectControls } from "@videojs/core/dom";
|
|
7
8
|
import { forwardRef, useState } from "react";
|
|
8
9
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
import { ControlsCore, ControlsDataAttrs } from "@videojs/core";
|
|
10
10
|
|
|
11
11
|
//#region src/ui/controls/controls-root.tsx
|
|
12
12
|
/** Root container for player controls state and rendered control content. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import * as react from "react";
|
|
3
2
|
import { FullscreenButtonCore } from "@videojs/core";
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/fullscreen-button/fullscreen-button.d.ts
|
|
6
6
|
interface FullscreenButtonProps extends UIComponentProps<'button', FullscreenButtonCore.State>, FullscreenButtonCore.Props {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectFullscreen } from "@videojs/core/dom";
|
|
5
4
|
import { FullscreenButtonCore, FullscreenButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectFullscreen } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/fullscreen-button/fullscreen-button.tsx
|
|
8
8
|
/** A button that toggles fullscreen. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SliderOptions, SliderRootProps, SliderRootStyle, SliderThumbProps } from "@videojs/core/dom";
|
|
2
1
|
import { SliderInput, SliderState } from "@videojs/core";
|
|
2
|
+
import { SliderOptions, SliderRootProps, SliderRootStyle, SliderThumbProps } from "@videojs/core/dom";
|
|
3
3
|
|
|
4
4
|
//#region src/ui/hooks/use-slider.d.ts
|
|
5
5
|
interface UseSliderOptions<State extends SliderState = SliderState> extends Pick<SliderOptions, 'getPercent' | 'getStepPercent' | 'getLargeStepPercent' | 'commitThrottle' | 'onValueChange' | 'onValueCommit' | 'onDragStart' | 'onDragEnd'> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import * as react from "react";
|
|
3
2
|
import { MuteButtonCore } from "@videojs/core";
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/mute-button/mute-button.d.ts
|
|
6
6
|
interface MuteButtonProps extends UIComponentProps<'button', MuteButtonCore.State>, MuteButtonCore.Props {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectVolume } from "@videojs/core/dom";
|
|
5
4
|
import { MuteButtonCore, MuteButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectVolume } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/mute-button/mute-button.tsx
|
|
8
8
|
/** A button that toggles mute state. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import * as react from "react";
|
|
3
2
|
import { PiPButtonCore } from "@videojs/core";
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/pip-button/pip-button.d.ts
|
|
6
6
|
interface PiPButtonProps extends UIComponentProps<'button', PiPButtonCore.State>, PiPButtonCore.Props {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createMediaButton } from "../create-media-button.js";
|
|
4
|
-
import { selectPiP } from "@videojs/core/dom";
|
|
5
4
|
import { PiPButtonCore, PiPButtonDataAttrs } from "@videojs/core";
|
|
5
|
+
import { selectPiP } from "@videojs/core/dom";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/pip-button/pip-button.tsx
|
|
8
8
|
/** A button that toggles picture-in-picture. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIComponentProps } from "../../utils/types.js";
|
|
2
|
-
import * as react from "react";
|
|
3
2
|
import { PlayButtonCore } from "@videojs/core";
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/play-button/play-button.d.ts
|
|
6
6
|
interface PlayButtonProps extends UIComponentProps<'button', PlayButtonCore.State>, PlayButtonCore.Props {}
|