Skip to content

media-settings-* not available in React package #1037

Answered by luwes
wesbos asked this question in Q&A
Discussion options

You must be logged in to vote

we decided to put them in a separate import since version 3 or 4 because they add some 10-20kB gzip or so.

import {
  MediaSettingsMenu,
  MediaSettingsMenuButton,
  MediaSettingsMenuItem,
  MediaCaptionsMenu,
  MediaPlaybackRateMenu,
} from "media-chrome/dist/react/menu";

(seems something is up with the import path, without the dist it was complaining)

I quickly put together a Codesandbox https://codesandbox.io/p/sandbox/media-chrome-settings-menu-react-ks8cyw?file=%2Fsrc%2FApp.tsx

hope this helps and thanks for the shoutout on Syntax!! ❤

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by luwes
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1036 on December 12, 2024 21:50.