Answers for "react video player"

2

react player disable download

// credit goes to CookPete
<ReactPlayer 
  url={[{src: Video, type: 'video/mp4'}]} // video location
  controls  // gives the front end video controls 
  width='100%' 
  height='100%'
  config={{ file: { 
      attributes: {
        controlsList: 'nodownload'  //<- this is the important bit
      }
  }}}
  onEnded={()=>this.onEnded()}
/>

/* Ez game */
Posted by: Guest on March-24-2020
10

html5 video player

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag. <!-- Text to be shown incase browser doesnt support html5 -->
</video>
Posted by: Guest on March-21-2020
0

react video

/*adding video to HTML*/

<video autoplay loop muted playsinline>
  <source src="my-video.webm" type="video/webm" />
  <source src="my-video.mp4" type="video/mp4" />
</video>
Posted by: Guest on April-08-2021
0

react responsive video player

class ResponsivePlayer extends Component {
  render () {
    return (
      <div className='player-wrapper'>
        <ReactPlayer
          className='react-player'
          url='https://www.youtube.com/watch?v=ysz5S6PUM-U'
          width='100%'
          height='100%'
        />
      </div>
    )
  }
}
Posted by: Guest on January-09-2021
0

import react js video player

import ReactPlayer from 'react-video-js-player';
Posted by: Guest on July-03-2021
0

react video srcObject

playTrack(track) {
    const stream = new MediaStream()
    stream.addTrack(track)
    this.audio.srcObject = stream;
}

render() {
    return (
        <audio ref={audio => {this.audio = audio}} controls volume="true" autoPlay />
    )
}
Posted by: Guest on June-04-2020

Browse Popular Code Answers by Language