@impleotv/stanag-player 1.0.15 → 1.0.16

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.
Files changed (2) hide show
  1. package/README.md +75 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,78 @@
1
1
  # Stanag Web Player Component library
2
2
 
3
- ![STANAG WebRTC player](https://impleotv.com/content/stanag2webrtc/help/images/uavscreen-sm.jpg)
3
+ ![STANAG WebRTC player](https://impleotv.com/content/stanag2webrtc/help/images/recorder-control-lables.png)
4
4
 
5
- [Stanag2WebRTC](https://impleotv.com/content/stanag2webrtc/help/index.html) allows easy integration of live udp STANAG 4609 streams into web-based applications.
6
- **Stanag Web Player Component library** provides some front-end components that can be used with the **Stanag2WebRTC** server.
5
+
6
+ [Stanag2WebRTC](https://impleotv.com/content/stanag2webrtc/help/index.html) enables easy integration of live multicast UDP STANAG 4609 streams into web-based applications. The Stanag Web Player Component library provides several front-end components that can be used with the Stanag2WebRTC server backend.
7
+
8
+
9
+
10
+ # Stanag2WebRtc React Player / Recorder
11
+
12
+ The Stanag2WebRtc React Player is a versatile React component that allows seamless integration into your applications. This powerful component provides low-latency WebRTC playback and optional recording (server side) in MPEG-TS or HLS formats.
13
+ With its simple integration and customizable features, the Stanag2WebRtc React Player offers a seamless streaming experience.
14
+
15
+ ## Features
16
+
17
+ - **Low Latency WebRTC Playback:** Experience real-time streaming with minimal delay, enabling a smooth and responsive playback experience.
18
+ - **Optional Recording:** Capture and store your streams in MPEG-TS or HLS formats for future reference or analysis.
19
+ - **Flexible Configuration:** Customize the player's behavior by providing parameters such as server URL, player width, poster image, controls visibility, autoplay, and more.
20
+ - **Event-driven API:** Utilize various event callbacks to handle state changes, recorder events, data packet reception, stream and server info detection, player size changes, message reception, connection state changes, and error handling.
21
+
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ npm i @impleotv/stanag-player
27
+ ```
28
+
29
+ ## Usage Sample
30
+
31
+ ```jsx
32
+ import React from 'react';
33
+ import StanagPlayer from '@impleotv/stanag-player';
34
+
35
+ const App = () => {
36
+ return (
37
+ <div>
38
+ <h1>Your Application</h1>
39
+ <StanagPlayer
40
+ serverUrl="http://your-server-url"
41
+ onConnected={handleConnection}
42
+ onStateChange={handleStateChange}
43
+ onRecorderStateChange={handleRecorderStateChange}
44
+ onDataReceive={handleDataReceive}
45
+ // Add more event callbacks as needed
46
+ />
47
+ </div>
48
+ );
49
+ };
50
+
51
+ export default App;
52
+ ```
53
+
54
+ In the above example, the StanagPlayer component is integrated into a React application. It is configured with a server URL and various event callbacks to handle different aspects of the player's functionality.
55
+
56
+ Note: Make sure to install the **@impleotv/stanag-player** package from npm before using it in your project.
57
+
58
+ For more details on the available props and their descriptions, please refer to the table provided below.
59
+
60
+ | Prop Name | Type | Description |
61
+ |-----------------------|-----------|-----------------------------------------------------------------------------------------------------|
62
+ | serverUrl | string | The URL of the server. |
63
+ | width | number | Explicit player width. If not provided, the player width will be determined by its parent element. |
64
+ | poster | string | The URL of the poster image to be shown while the video is loading or until the user hits play. |
65
+ | showColorBars | boolean | Set to true to display color bars as the poster image. |
66
+ | controls | boolean | Set to true to show playback controls. |
67
+ | useStandardControls | boolean | Set to true to use standard WebRTC controls instead of custom controls. |
68
+ | autoplay | boolean | Set to true to start playback automatically. |
69
+ | onStateChange | function | Fired when the stream state changes |
70
+ | onRecorderStateChange | function | Fired when the recorder state changes |
71
+ | onServerInfo | function | Fired when a recorder event is received |
72
+ | onStreamInfo | function | Fired when stream info is detected |
73
+ | onRecorderEvent | function | Fired when a recorder event is receivedreceived. |
74
+ | onDataReceive | function | Fired when a data packet is received
75
+ | onSizeChange | function | Fired when the player size changes |
76
+ | onMessageReceive | function | Fired when a message from the server arrives |
77
+ | onConnected | function | Fired when the connection state changes |
78
+ | onError | function | Fired when an error occurs |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@impleotv/stanag-player",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Impleotv web player",
5
5
  "private": false,
6
6
  "scripts": {},