@banou/media-player 0.0.2 → 0.2.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/build/chrome/bottom.d.ts +1 -1
- package/build/chrome/index.d.ts +1 -1
- package/build/chrome/overlay.d.ts +1 -1
- package/build/index.d.ts +3 -3
- package/build/index.js +1789 -1711
- package/build/utils.d.ts +3 -4
- package/package.json +5 -6
- package/src/index.tsx +142 -271
- package/src/main.tsx +10 -56
- package/src/utils.ts +135 -280
package/build/chrome/bottom.d.ts
CHANGED
|
@@ -16,5 +16,5 @@ export type BottomOptions = {
|
|
|
16
16
|
errors: TransmuxError[];
|
|
17
17
|
customControls?: FKNVideoControl[];
|
|
18
18
|
} & Pick<ChromeOptions, 'seek' | 'setVolume' | 'loadedTime' | 'isPlaying' | 'tracks' | 'pictureInPicture'> & HTMLAttributes<HTMLDivElement>;
|
|
19
|
-
declare const _default: ({ duration, currentTime, togglePlay, seek, setVolume, isSubtitleMenuHidden, setIsSubtitleMenuHidden, isErrorMenuHidden, setIsErrorMenuHidden, setCurrentSubtitleTrack, loadedTime, isPlaying, tracks, isFullscreen, toggleFullscreen, subtitleTrack, pictureInPicture, errors, customControls, ...rest }: BottomOptions) => JSX.Element;
|
|
19
|
+
declare const _default: ({ duration, currentTime, togglePlay, seek, setVolume, isSubtitleMenuHidden, setIsSubtitleMenuHidden, isErrorMenuHidden, setIsErrorMenuHidden, setCurrentSubtitleTrack, loadedTime, isPlaying, tracks, isFullscreen, toggleFullscreen, subtitleTrack, pictureInPicture, errors, customControls, ...rest }: BottomOptions) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export default _default;
|
package/build/chrome/index.d.ts
CHANGED
|
@@ -22,5 +22,5 @@ export type ChromeOptions = {
|
|
|
22
22
|
wasmUrl: string;
|
|
23
23
|
needsInitialInteraction?: boolean;
|
|
24
24
|
} & HTMLAttributes<HTMLDivElement>;
|
|
25
|
-
declare const _default: ({ customOverlay, isPlaying, loading, duration, loadedTime, currentTime, pictureInPicture, fullscreen, play, seek, getVolume, setVolume, attachments, tracks, video, errors, customControls, libassWorkerUrl, wasmUrl, needsInitialInteraction, ...rest }: ChromeOptions) => JSX.Element;
|
|
25
|
+
declare const _default: ({ customOverlay, isPlaying, loading, duration, loadedTime, currentTime, pictureInPicture, fullscreen, play, seek, getVolume, setVolume, attachments, tracks, video, errors, customControls, libassWorkerUrl, wasmUrl, needsInitialInteraction, ...rest }: ChromeOptions) => import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export default _default;
|
|
@@ -5,5 +5,5 @@ export type OverlayOptions = {
|
|
|
5
5
|
setCanvasRef: ClassAttributes<HTMLCanvasElement>['ref'];
|
|
6
6
|
needsInitialInteraction?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare const _default: ({ loading, needsInitialInteraction, togglePlay, setCanvasRef }: OverlayOptions) => JSX.Element;
|
|
8
|
+
declare const _default: ({ loading, needsInitialInteraction, togglePlay, setCanvasRef }: OverlayOptions) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default _default;
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode, VideoHTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { makeRemuxer as libavMakeRemuxer } from 'libav-wasm';
|
|
3
3
|
export type TransmuxError = {
|
|
4
4
|
critical: boolean;
|
|
5
5
|
message: string;
|
|
@@ -28,14 +28,14 @@ export type FKNVideoOptions = {
|
|
|
28
28
|
customOverlay?: ReactNode;
|
|
29
29
|
baseBufferSize?: number;
|
|
30
30
|
size?: number;
|
|
31
|
-
fetch: (offset: number, size: number) => Promise<Response>;
|
|
31
|
+
fetch: (offset: number, size: number | undefined) => Promise<Response>;
|
|
32
32
|
customControls?: FKNVideoControl[];
|
|
33
33
|
publicPath: string;
|
|
34
34
|
wasmUrl: string;
|
|
35
35
|
libavWorkerUrl: string;
|
|
36
36
|
libavWorkerOptions?: WorkerOptions;
|
|
37
37
|
libassWorkerUrl: string;
|
|
38
|
-
makeTransmuxer?: typeof
|
|
38
|
+
makeTransmuxer?: typeof libavMakeRemuxer;
|
|
39
39
|
};
|
|
40
40
|
export type HeaderChunk = Chunk & {
|
|
41
41
|
buffer: {
|