I am trying to include videos in my react project for that I am using ReactPlayer by cookpete.
Now the problem is it doesn't correctly parses or make us of, whatever, the url of the video inside the browser's html video
tag where in the src
attribute I can see src(unknown)
is written. The weird thing is it once in a while behaves normally as it is expected to do. When I change the src
attribute's value to the video's URL manually by inspecting
the browsers html it starts getting played and I can do normal stuff with it. Here is the code which I have written.
<ReactPlayer
playing={isPlaying}
url="https://media.w3.org/2010/05/sintel/trailer_hd.mp4"
width="100vw - 69vw"
height="100vh - 65vh"
/>
The isPlaying
stuff is a boolean which is being mantained inside React.useState()
with intial value set to false
.