Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bsonntag/react-video

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bsonntag/react-video

A react component that handles video properties and methods by prop.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@bsonntag/react-video

A react component that handles video properties and methods by prop.

Installation

Using npm:

$ npm install --save @bsonntag/react-video

Using yarn:

$ yarn add @bsonntag/react-video

This module uses react's createRef API, so make sure you have at least version 16.3.0 installed.

Example usage

import Video from '@bsonntag/react-video';
import React from 'react';

const App = () => (
  <Video
    play
    src={'https://www.sample-videos.com/video/mp4/480/big_buck_bunny_480p_1mb.mp4'}
    volume={0.5}
  />
);

Props

The Video component supports all video attributes plus the following props:

  • play - A boolean prop that makes the component call video.play() when true, or video.pause() when false.
  • srcObject - Can be used to pass a MediaStream to the video.srcObject property.
  • volume - Sets the value of video.volume. Must be between 0 and 1.

Contributing

Please feel free to submit any issues or pull requests.

License

MIT

Keywords

FAQs

Package last updated on 06 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc