How to use the react-player.addCustomPlayer function in react-player

To help you get started, we’ve selected a few react-player examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bigbluebutton / bigbluebutton / bigbluebutton-html5 / imports / ui / components / external-video-player / component.jsx View on Github external
import React, { Component } from 'react';
import injectWbResizeEvent from '/imports/ui/components/presentation/resize-wrapper/component';
import ReactPlayer from 'react-player';
import { sendMessage, onMessage, removeAllListeners } from './service';
import logger from '/imports/startup/client/logger';

import ArcPlayer from './custom-players/arc-player';


import { styles } from './styles';

const SYNC_INTERVAL_SECONDS = 2;

ReactPlayer.addCustomPlayer(ArcPlayer);

class VideoPlayer extends Component {
  constructor(props) {
    super(props);

    const { isPresenter } = props;

    this.player = null;
    this.syncInterval = null;
    this.state = {
      mutedByEchoTest: false,
      playing: false,
      playbackRate: 1,
    };

    this.opts = {

react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion

MIT
Latest version published 9 months ago

Package Health Score

88 / 100
Full package analysis