0.1.3 • Published 5 years ago

material-ui-video v0.1.3

Weekly downloads
14
License
MIT
Repository
github
Last release
5 years ago

Usage

npm install material-ui-video # or yarn add material-ui-video
import React from 'react'
import MaterialUIVideo from 'material-ui-video'

// Relative URL - render a video in same origin
<MaterialUIVideo url='/video.mp4' />

// Absolute URL - render a video from external source
<MaterialUIVideo url='http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' />

Props

PropDescriptionDefault
srcThe url of a video to play  Can be a relative or absolute url
forwardSet to true or falsy to show forward buttonundefined
backwardSet to true or falsy to show backward buttonundefined
autoplaySet to true or falsy to set autoplay on videoundefined
loopSet to true or falsy to set loop on videoundefined
widthSet the width of the player100% of parent container
fadeSettingsObject with fadeInTime and fadeOutTime (number, seconds) to fadein and fadeout videoundefined

Callback props

Callback props take a function that gets fired on various player events:

PropDescription
onForwardClickCalled when forward button is clicked
onBackwardClickCalled when backward button is clicked
onEndedCalled when video ended

Please note:

This module works only with React (>=17.0.0) and Material UI (@material-ui/core: >=4.0.0, @material-ui/icons: >=4.0.0). It will not install them as sub-dependencies.

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago