Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement with videojs #427

Open
st-hieucao opened this issue Jan 21, 2023 · 0 comments
Open

How to implement with videojs #427

st-hieucao opened this issue Jan 21, 2023 · 0 comments

Comments

@st-hieucao
Copy link

st-hieucao commented Jan 21, 2023

  • 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>

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant