npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@impleotv/stanag-player

v1.1.7

Published

Impleotv web player

Downloads

209

Readme

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 Name | Type | Description | |-----------------------|-----------|-----------------------------------------------------------------------------------------------------| | serverUrl | string | The URL of the server. | | width | number | Explicit player width. If not provided, the player width will be determined by its parent element. | | poster | string | The URL of the poster image to be shown while the video is loading or until the user hits play. | | showColorBars | boolean | Set to true to display color bars as the poster image. | | controls | boolean | Set to true to show playback controls. | | useStandardControls | boolean | Set to true to use standard WebRTC controls instead of custom controls. | | autoplay | boolean | Set to true to start playback automatically. | | onStateChange | function | Fired when the stream state changes | | onRecorderStateChange | function | Fired when the recorder state changes | | onServerInfo | function | Fired when a recorder event is received | | onStreamInfo | function | Fired when stream info is detected | | onRecorderEvent | function | Fired when a recorder event is receivedreceived. | | onDataReceive | function | Fired when a data packet is received
| onSizeChange | function | Fired when the player size changes | | onMessageReceive | function | Fired when a message from the server arrives | | onConnected | function | Fired when the connection state changes | | onError | function | Fired when an error occurs |