1.1.7 • Published 2 days ago

@impleotv/stanag-player v1.1.7

Weekly downloads
-
License
Proprietary
Repository
-
Last release
2 days ago

Stanag Web Player Component library

STANAG WebRTC player

Stanag2WebRTC 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.

Stanag2WebRtc React Player / Recorder

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.
With its simple integration and customizable features, the Stanag2WebRtc React Player offers a seamless streaming experience.

Features

  • Low Latency WebRTC Playback: Experience real-time streaming with minimal delay, enabling a smooth and responsive playback experience.
  • Optional Recording: Capture and store your streams in MPEG-TS or HLS formats for future reference or analysis.
  • Flexible Configuration: Customize the player's behavior by providing parameters such as server URL, player width, poster image, controls visibility, autoplay, and more.
  • 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.

Installation

npm i @impleotv/stanag-player

Usage Sample

import React from 'react';
import StanagPlayer from '@impleotv/stanag-player';

const App = () => {
  return (
    <div>
      <h1>Your Application</h1>
      <StanagPlayer
        serverUrl="http://your-server-url"
        onConnected={handleConnection} 
        onStateChange={handleStateChange}
        onRecorderStateChange={handleRecorderStateChange}
        onDataReceive={handleDataReceive}
        // Add more event callbacks as needed
      />
    </div>
  );
};

export default App;

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.

Note: Make sure to install the @impleotv/stanag-player package from npm before using it in your project.

For more details on the available props and their descriptions, please refer to the table provided below.

Prop NameTypeDescription
serverUrlstringThe URL of the server.
widthnumberExplicit player width. If not provided, the player width will be determined by its parent element.
posterstringThe URL of the poster image to be shown while the video is loading or until the user hits play.
showColorBarsbooleanSet to true to display color bars as the poster image.
controlsbooleanSet to true to show playback controls.
useStandardControlsbooleanSet to true to use standard WebRTC controls instead of custom controls.
autoplaybooleanSet to true to start playback automatically.
onStateChangefunctionFired when the stream state changes
onRecorderStateChangefunctionFired when the recorder state changes
onServerInfofunctionFired when a recorder event is received
onStreamInfofunctionFired when stream info is detected
onRecorderEventfunctionFired when a recorder event is receivedreceived.
onDataReceivefunctionFired when a data packet is received
onSizeChangefunctionFired when the player size changes
onMessageReceivefunctionFired when a message from the server arrives
onConnectedfunctionFired when the connection state changes
onErrorfunctionFired when an error occurs
1.1.7

2 days ago

1.1.6

3 months ago

1.1.5

3 months ago

1.1.4

11 months ago

1.1.3

11 months ago

1.1.1

12 months ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.1

1 year ago

1.0.17

1 year ago

1.0.0

1 year ago

1.0.16

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.1.2

12 months ago

1.0.3

1 year ago

1.0.22

12 months ago

1.0.21

12 months ago

1.0.20

1 year ago

1.0.26

12 months ago

1.0.25

12 months ago

1.0.24

12 months ago

1.0.23

12 months ago

1.0.28

12 months ago

1.0.27

12 months ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.12

1 year ago

0.1.18

1 year ago

0.1.17

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago