react-live-player
v0.1.1
Published
Is a live stream media player for webcam and network media
Downloads
6
Readme
Simple ReactJs Live Media Player Component.
Installation
npm install react-live-player --save
The library have multiply components which can be used along the Player view:
DefaultMediaPlayer A default media player for live media stream. Properties
1). mediaPlayback: the mediaplayback that will be used to control the player controls it must be an instead of mediaplayback class.
2). onStop: this is a callback function that will be called when the current media has stoped or stoped by the user.
- onEnded: this callback function that will be if the current media source has ended.
Camera : An Interface class to the user local camera.
It has only one method called "request" which cam be used to request the user camera. The method return a promised object resolve(mediaplayback) and reject with current error message object.
MediaPlayback: A media playback class object interface
Player The media player react component view
IPlayback The interface abstract class for all media player inherits from.]
RecordPlayback: A simple interface to web api recording media playback class.
Uses
var React = require("react"); var Renderer = require("react-dom"); var {DefaultMediaPlayer} = require("react-live-player");
Renderer.render(, document.getElementById("app-id"));