@halibegic/react-video-player 0.0.18 → 0.0.20
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 +5 -11
- package/dist/components/live-player/live-player-event-check.d.ts +1 -1
- package/dist/components/live-player/live-player-provider.d.ts +1 -2
- package/dist/components/live-player.d.ts +1 -3
- package/dist/components/player/ui/player-controls.styles.d.ts +4 -0
- package/dist/react-video-player.es.js +1174 -1114
- package/dist/react-video-player.es.js.map +1 -1
- package/dist/react-video-player.umd.js +27 -14
- package/dist/react-video-player.umd.js.map +1 -1
- package/dist/stores/live-player-store.d.ts +1 -5
- package/dist/utils/date-time.d.ts +2 -1
- package/dist/utils/hls-parser.d.ts +2 -0
- package/package.json +2 -1
- package/dist/components/icons/arrow-right-icon.d.ts +0 -2
- package/dist/components/live-player/live-player-remaining-time.d.ts +0 -2
package/README.md
CHANGED
|
@@ -45,8 +45,6 @@ function App() {
|
|
|
45
45
|
return (
|
|
46
46
|
<LivePlayer
|
|
47
47
|
url="https://example.com/live.m3u8"
|
|
48
|
-
startDate="2025-09-03T00:00:00Z"
|
|
49
|
-
endDate="2025-10-03T23:59:59Z"
|
|
50
48
|
messages={{
|
|
51
49
|
eventNotStarted: "Live stream još nije počeo. Molimo pričekajte.",
|
|
52
50
|
eventFinished: "Live stream je završen.",
|
|
@@ -58,13 +56,11 @@ function App() {
|
|
|
58
56
|
}
|
|
59
57
|
```
|
|
60
58
|
|
|
61
|
-
| Prop
|
|
62
|
-
|
|
|
63
|
-
| `url`
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `onEvent` | `(event: string, data: unknown) => void` | (Optional) Event handler callback for player events | - |
|
|
67
|
-
| `messages` | `{ eventNotStarted: string; eventFinished: string; eventStartingSoon?: string; live?: string; }` | (Optional) Custom messages for event not started, finished, starting soon, and live states | `{ eventNotStarted: "Event has not started yet.", eventFinished: "Event has finished.", eventStartingSoon: "Starting soon...", live: "Live" }` |
|
|
59
|
+
| Prop | Type | Description | Default |
|
|
60
|
+
| ---------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
61
|
+
| `url` | `string` | The live stream URL | - |
|
|
62
|
+
| `onEvent` | `(event: string, data: unknown) => void` | (Optional) Event handler callback for player events | - |
|
|
63
|
+
| `messages` | `{ eventNotStarted: string; eventFinished: string; eventStartingSoon?: string; live?: string; }` | (Optional) Custom messages for event not started, finished, starting soon, and live states | `{ eventNotStarted: "Event has not started yet.", eventFinished: "Event has finished.", eventStartingSoon: "Starting soon...", live: "Live" }` |
|
|
68
64
|
|
|
69
65
|
## Keyboard Shortcuts
|
|
70
66
|
|
|
@@ -168,8 +164,6 @@ function App() {
|
|
|
168
164
|
return (
|
|
169
165
|
<LivePlayer
|
|
170
166
|
url="https://example.com/live.m3u8"
|
|
171
|
-
startDate="2025-09-03T00:00:00Z"
|
|
172
|
-
endDate="2025-10-03T23:59:59Z"
|
|
173
167
|
onEvent={handlePlayerEvent}
|
|
174
168
|
/>
|
|
175
169
|
);
|
|
@@ -4,5 +4,5 @@ type LivePlayerEventCheckProps = PropsWithChildren & {
|
|
|
4
4
|
eventNotStartedMessage?: string;
|
|
5
5
|
eventStartingSoonMessage?: string;
|
|
6
6
|
};
|
|
7
|
-
declare function LivePlayerEventCheck({ children,
|
|
7
|
+
declare function LivePlayerEventCheck({ children, eventNotStartedMessage, eventStartingSoonMessage, }: LivePlayerEventCheckProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export { LivePlayerEventCheck };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
type LivePlayerProviderProps = PropsWithChildren & {
|
|
3
3
|
startDate: Date;
|
|
4
|
-
endDate: Date;
|
|
5
4
|
};
|
|
6
|
-
declare function LivePlayerProvider({ children, startDate
|
|
5
|
+
declare function LivePlayerProvider({ children, startDate }: LivePlayerProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export { LivePlayerProvider };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
type LivePlayerProps = {
|
|
2
2
|
url: string;
|
|
3
|
-
startDate: Date | string;
|
|
4
|
-
endDate: Date | string;
|
|
5
3
|
messages?: {
|
|
6
4
|
eventFinished: string;
|
|
7
5
|
eventNotStarted: string;
|
|
@@ -10,6 +8,6 @@ type LivePlayerProps = {
|
|
|
10
8
|
};
|
|
11
9
|
onEvent?: (event: string, data: unknown) => void;
|
|
12
10
|
};
|
|
13
|
-
declare function LivePlayer({ url,
|
|
11
|
+
declare function LivePlayer({ url, messages, onEvent }: LivePlayerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
12
|
export { LivePlayer };
|
|
15
13
|
export type { LivePlayerProps };
|
|
@@ -2,6 +2,10 @@ export declare const PlayerContainer: import('@emotion/styled').StyledComponent<
|
|
|
2
2
|
theme?: import('@emotion/react').Theme;
|
|
3
3
|
as?: React.ElementType;
|
|
4
4
|
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const TopControls: import('@emotion/styled').StyledComponent<{
|
|
6
|
+
theme?: import('@emotion/react').Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
9
|
export declare const ControlsBottom: import('@emotion/styled').StyledComponent<{
|
|
6
10
|
theme?: import('@emotion/react').Theme;
|
|
7
11
|
as?: React.ElementType;
|