How to implement with videojs
st-hieucao opened this issue · comments
Hieu Cao K. commented
- First, i want to thank you for this package, it helped me a lot. I have 1 problem with videojs library, please help me. How to know the type of the video when initializing the player in videojs (Reactjs)
const initPlayer = () => {
const videoPlayer = videojs(videoRef.current, {
controls: true,
muted: true,
sources: [{
src: URL.createObjectURL(mediaSource),
type: 'video/mp4', // type is wrong in videojs
}],
});
playerRef.current = videoPlayer;
}
<video ref={videoRef}></video>