I have a simple component that is supposed to play a video. It shows a black screen with controls but the video is not playing. What am I missing here?
import React from 'react';
export default class CustomVideoPlayer extends React.Component {
render() {
return (
<div className="custom-video-player">
<video autoPlay controls width="600" height="400" src="video.mp4">
</video>
</div>
)
}
}
video.mp4
is the in the same folder as CustomVideoPlayer
. I've tried adding autoPlay
, type
attributes but it makes no difference