New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@falconia/react-flv-player

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@falconia/react-flv-player

A React Component to play flv video

latest
Source
npmnpm
Version
1.0.8-canary.1
Version published
Maintainers
1
Created
Source

react-flv-player

A React component to play flv streaming video.

Installation

npm i react-flv-player

Usage

import React, { Component } from 'react';
import {ReactFlvPlayer} from 'react-flv-player'

class Index extends Component {

  render() {
    return (
      <div>
        <ReactFlvPlayer
          url = "http://xxx/xxx/xxx.flv"
          heigh = "800px"
          width = "800px"
          isMuted={true}
        />
      </div>
    );
  }
}

export default Index;

image

Props

FieldTypeDefaultDescription
typestringflvIndicates media type, 'flv' or 'mp4'
isLive?booleantrueIndicates whether the data source is a live stream
hasAudio?booleantrueIndicates whether the stream has audio track
hasVideo?booleantrueIndicates whether the stream has video track
url?stringurlIndicates media URL, can be starts with 'https(s)' or 'ws(s)' (WebSocket)
enableStashBuffer?booleantrueEnable IO stash buffer. Set to false if you need realtime (minimal latency) for live stream
stashInitialSize?number128 (KB)Indicates IO stash buffer initial size. Default is 384KB. Indicate a suitable size can improve video load/seek time.
height?px or %100%
width?px or %100%
autoPlay?booleanfalse
controls?booleantrue
controlsList?stringundefied
loop?booleanfalse
muted?booleanfalseIndicates audio output when init the video
handleError?function(err)=>{console.log(err)}Handle errors, error type is enum
enableWarning?booleanfalseEnable Warnings in Console
enableError?booleanfalseEnable errors in Console

Errors

<ReactFlvPlayer
  url={videoUrl}
  isMuted
  handleError={(err) => {
  switch (err) {
    case 'NetworkError':
      // todo
      console.log('network error');
    break;
    case 'MediaError':
      console.log('network error');
    break;
    default:
      console.log('other error');
  }
}}
/>
ErrorDescription
NETWORK_ERRORErrors related to the network
MEDIA_ERRORErrors related to the media (format error, decode issue, etc)
OTHER_ERRORAny other unspecified error

Keywords

react

FAQs

Package last updated on 29 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts