Skip to content

Passing options to Video.js player doesn't work #45

@hugomendonca98

Description

@hugomendonca98

Hello, I'm trying to pass some options available in Video.js to the player, but it doesn't seem to work. Specifically, I'm setting up the player options including HLS settings, but the player doesn't respond to them as expected. Is there any way to make this work?

<MediaThemeInstaplay
  className="video-js-container min-h-[200px] md:min-h-[480px]"
  style={{
    height: "100%",
    display: "flex",
    flexDirection: "column",
    justifyContent: "center",
    alignContent: "start",
    position: "relative",
  }}
>
  <VideojsVideo
    slot="media"
    src={options.sources[0].src}
    className="video-js-inner"
    playsInline
    style={{ width: "100%", height: "100%" }}
    fluid={true}
    responsive={true}
    autoPlay={options.autoplay}
    muted={options.muted}
    options={{
      fluid: true,
      responsive: true,
      playsinline: true,
      controls: true,
      sources: options.sources,
      hls: {
        limitRenditionByPlayerDimensions: true,
        useDevicePixelRatio: true,
      },
    }}
    hsl={{
      limitRenditionByPlayerDimensions: true,
      useDevicePixelRatio: true,
    }}
    crossOrigin
  />
</MediaThemeInstaplay>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions