Skip to content

How to implement with videojs #427

Description

@st-hieucao
  • 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions