@nikelroot/video-player 0.2.9 → 0.3.0
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/README.md +25 -2
- package/dist/index.cjs +291 -125
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +288 -122
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -32,11 +32,20 @@ interface VideoPlayerPlaybackError {
|
|
|
32
32
|
message: string;
|
|
33
33
|
details: string[];
|
|
34
34
|
}
|
|
35
|
+
interface AudioRange {
|
|
36
|
+
start: number;
|
|
37
|
+
end: number;
|
|
38
|
+
}
|
|
35
39
|
interface VideoPlayerProps extends Omit<React.VideoHTMLAttributes<HTMLVideoElement>, 'src' | 'controls' | 'autoPlay' | 'muted' | 'title' | 'onError' | 'onTimeUpdate' | 'onDurationChange' | 'onPlay' | 'onPause'> {
|
|
36
40
|
videoSrc: string;
|
|
41
|
+
/** Video-only HLS on the same presentation timeline as videoSrc. */
|
|
42
|
+
videoOnlySrc?: string;
|
|
43
|
+
/** Undefined means unknown; an empty array means no recorded audio. */
|
|
44
|
+
audioRanges?: readonly AudioRange[];
|
|
45
|
+
onAudioFallbackChange?: (videoOnly: boolean) => void;
|
|
37
46
|
sourceType?: 'auto' | 'hls' | 'native';
|
|
38
47
|
type?: string;
|
|
39
|
-
controlsVariant
|
|
48
|
+
controlsVariant?: ControlsVariant;
|
|
40
49
|
active?: boolean;
|
|
41
50
|
autoPlay?: boolean;
|
|
42
51
|
preload?: '' | 'none' | 'auto' | 'metadata';
|
|
@@ -85,4 +94,4 @@ interface VideoPlayerProps extends Omit<React.VideoHTMLAttributes<HTMLVideoEleme
|
|
|
85
94
|
declare function hasNativeHlsSupport(): boolean;
|
|
86
95
|
declare const VideoPlayer: React.NamedExoticComponent<VideoPlayerProps & React.RefAttributes<VideoPlayerHandle>>;
|
|
87
96
|
|
|
88
|
-
export { type ControlsVariant, VideoPlayer, type VideoPlayerActiveChangePayload, type VideoPlayerHandle, type VideoPlayerMessages, type VideoPlayerPlaybackError, type VideoPlayerProps, VideoPlayer as default, hasNativeHlsSupport };
|
|
97
|
+
export { type AudioRange, type ControlsVariant, VideoPlayer, type VideoPlayerActiveChangePayload, type VideoPlayerHandle, type VideoPlayerMessages, type VideoPlayerPlaybackError, type VideoPlayerProps, VideoPlayer as default, hasNativeHlsSupport };
|
package/dist/index.d.ts
CHANGED
|
@@ -32,11 +32,20 @@ interface VideoPlayerPlaybackError {
|
|
|
32
32
|
message: string;
|
|
33
33
|
details: string[];
|
|
34
34
|
}
|
|
35
|
+
interface AudioRange {
|
|
36
|
+
start: number;
|
|
37
|
+
end: number;
|
|
38
|
+
}
|
|
35
39
|
interface VideoPlayerProps extends Omit<React.VideoHTMLAttributes<HTMLVideoElement>, 'src' | 'controls' | 'autoPlay' | 'muted' | 'title' | 'onError' | 'onTimeUpdate' | 'onDurationChange' | 'onPlay' | 'onPause'> {
|
|
36
40
|
videoSrc: string;
|
|
41
|
+
/** Video-only HLS on the same presentation timeline as videoSrc. */
|
|
42
|
+
videoOnlySrc?: string;
|
|
43
|
+
/** Undefined means unknown; an empty array means no recorded audio. */
|
|
44
|
+
audioRanges?: readonly AudioRange[];
|
|
45
|
+
onAudioFallbackChange?: (videoOnly: boolean) => void;
|
|
37
46
|
sourceType?: 'auto' | 'hls' | 'native';
|
|
38
47
|
type?: string;
|
|
39
|
-
controlsVariant
|
|
48
|
+
controlsVariant?: ControlsVariant;
|
|
40
49
|
active?: boolean;
|
|
41
50
|
autoPlay?: boolean;
|
|
42
51
|
preload?: '' | 'none' | 'auto' | 'metadata';
|
|
@@ -85,4 +94,4 @@ interface VideoPlayerProps extends Omit<React.VideoHTMLAttributes<HTMLVideoEleme
|
|
|
85
94
|
declare function hasNativeHlsSupport(): boolean;
|
|
86
95
|
declare const VideoPlayer: React.NamedExoticComponent<VideoPlayerProps & React.RefAttributes<VideoPlayerHandle>>;
|
|
87
96
|
|
|
88
|
-
export { type ControlsVariant, VideoPlayer, type VideoPlayerActiveChangePayload, type VideoPlayerHandle, type VideoPlayerMessages, type VideoPlayerPlaybackError, type VideoPlayerProps, VideoPlayer as default, hasNativeHlsSupport };
|
|
97
|
+
export { type AudioRange, type ControlsVariant, VideoPlayer, type VideoPlayerActiveChangePayload, type VideoPlayerHandle, type VideoPlayerMessages, type VideoPlayerPlaybackError, type VideoPlayerProps, VideoPlayer as default, hasNativeHlsSupport };
|