How to use the react-player.default 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 myxvisual / react-uwp / src / MediaPlayer / index.tsx View on Github external
import * as React from "react";
import * as PropTypes from "prop-types";
import { findDOMNode } from "react-dom";

import * as RPlayer from "react-player";

import Control from "./Control";

const ReactPlayer = RPlayer.default as any;

export interface DataProps {
  /**
   * Set MediaPlayer display mode.
   */
  displayMode?: "default" | "minimum" | "reset";
  /**
   * Control show the MediaPlayer controls.
   */
  showControl?: boolean;
  /**
   * The url of a video or song to play.
   */
  url?: string;
  /**
   * Sets the width of the player.

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 8 months ago

Package Health Score

89 / 100
Full package analysis