phenix-video-player v2020.0.6
Player
Usage:
var VideoPlayer = require('{path-to-module}/phenix-video-player');
...
videoPlayer = new VideoPlayer(elementSelector, {
id: id,
stream: stream,
isSelf: isSelf,
onStreamEnd: onStreamEnd,
defaultAudioEnabled: defaultAudioEnabled,
defaultVideoEnabled: defaultVideoEnabled,
storeLocalStateKey: storeLocalStateKey,
showNativeControls: showVideoControl,
viewConfig: viewConfig,
muted: false,
autoPlay: true
})
Usage With React:
import VideoPlayer from 'phenix-video-player/src/index.js';
...
<VideoPlayer
id={id}
stream={stream}
isSelf={isSelf}
onStreamEnd={onStreamEnd}
defaultAudioEnabled={defaultAudioEnabled}
defaultVideoEnabled={defaultVideoEnabled}
storeLocalStateKey={storeLocalStateKey}
showNativeControls={showVideoControl}
viewConfig={viewConfig}
muted={false}
autoPlay={true}
/>
Usage With Preact:
import VideoPlayer from 'phenix-video-player/dist/phenix-video-player.min';
...
// Same as React
Properties
id
Required property. Unique Id (string type) for the video element. Must be unique across the DOM.
stream
Stream object.
isSelf
Determines whether or not the stream is one that you are publishing and effects mute logic.
onStreamEnd
Function which called when stream is ended.
defaultAudioEnabled
Prop sets default state for audio.
defaultVideoEnabled
Prop sets default state for video.
storeLocalStateKey
Store the state of the audio and the video using local storage if available, else cookies.
playerViewConfig
The object which contains options to adjust which controls are enabled and visible.
Defaults
const defaultViewConfig = {
align: 'center',
playButton: true,
muteAudioButton: true,
muteVideoButton: true,
fullScreenButton: true,
seekBar: false,
rewindButton: false,
overlay: false,
customContextMenu: true,
streamLatency: false,
streamQualities: false
};
muted
Whether or not to start playback with the video muted. Defaults to false except when autoPlay=true and the browser policy forces muted playback.
autoPlay
Whether or not to automatically start playback. Defaults to true
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago