2020.0.6 • Published 3 years ago

phenix-video-player v2020.0.6

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
3 years ago

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

2020.0.6

3 years ago

2020.0.5

4 years ago

2020.0.4

4 years ago

2020.0.3

4 years ago

2020.0.2

4 years ago

2020.0.1

4 years ago

2019.0.22

5 years ago

2019.0.21

5 years ago

2019.0.20

5 years ago

2019.0.19

5 years ago

2019.0.18

5 years ago

2019.0.17

5 years ago

2019.0.16

5 years ago

2019.0.15

5 years ago

2019.0.14

5 years ago

2019.0.13

5 years ago

2019.0.12

5 years ago

2019.0.11

5 years ago

2019.0.10

5 years ago

2019.0.9

5 years ago

2019.0.8

5 years ago

2019.0.7

5 years ago

2019.0.6

5 years ago

2019.0.5

5 years ago

2019.0.4

5 years ago

2019.0.3

5 years ago

2019.0.2

5 years ago

2019.0.1

5 years ago

2019.0.0

5 years ago

2018.4.1-alpha.2

5 years ago