When I try to use an input[type=file] to select the video source, I get an net::ERR_UNKNOWN_URL_SCHEME (c:\fakepath\test.mp4) error. I would likely work on support for this if it's not available, but I want to make sure I am not doing something silly.
I've had some success with URL.createObjectURL, which generates a blob string you can use as the url:
const input = document.querySelector('[type=file]')
const url = URL.createObjectURL(input.files[0])
return <ReactPlayer playing url={url} />
Thank you. That worked perfectly.
I'm trying to do the same but I keep getting a can't read null files error, any suggestions.
Most helpful comment
I've had some success with
URL.createObjectURL, which generates ablobstring you can use as theurl: