@theoplayer/react-ui 1.7.1 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"THEOplayerReactUI.mjs","sources":["../src/context.ts","../src/util.ts","../src/slotted.tsx","../src/UIContainer.tsx","../src/DefaultUI.tsx","../src/components/ControlBar.tsx","../src/components/Button.tsx","../src/components/LinkButton.tsx","../src/components/PlayButton.tsx","../src/components/MuteButton.tsx","../src/components/SeekButton.tsx","../src/components/TimeDisplay.tsx","../src/components/DurationDisplay.tsx","../src/components/RadioGroup.tsx","../src/components/RadioButton.tsx","../src/components/Menu.tsx","../src/components/MenuGroup.tsx","../src/components/MenuButton.tsx","../src/components/CloseMenuButton.tsx","../src/components/MediaTrackRadioButton.tsx","../src/components/TrackRadioGroup.tsx","../src/components/TextTrackRadioButton.tsx","../src/components/TextTrackOffRadioButton.tsx","../src/components/LanguageMenu.tsx","../src/components/LanguageMenuButton.tsx","../src/components/PlaybackRateRadioGroup.tsx","../src/components/PlaybackRateMenuButton.tsx","../src/components/PlaybackRateMenu.tsx","../src/components/PlaybackRateDisplay.tsx","../src/components/ActiveQualityDisplay.tsx","../src/components/QualityRadioButton.tsx","../src/components/QualityRadioGroup.tsx","../src/components/TextTrackStyleRadioGroup.tsx","../src/components/TextTrackStyleResetButton.tsx","../src/components/TextTrackStyleDisplay.tsx","../src/components/TextTrackStyleMenu.tsx","../src/components/SettingsMenu.tsx","../src/components/SettingsMenuButton.tsx","../src/components/FullscreenButton.tsx","../src/components/Range.ts","../src/components/TimeRange.tsx","../src/components/VolumeRange.tsx","../src/components/ErrorDisplay.tsx","../src/components/CastButton.tsx","../src/components/ChromecastButton.tsx","../src/components/ChromecastDisplay.tsx","../src/components/AirPlayButton.tsx","../src/components/LoadingIndicator.tsx","../src/components/GestureReceiver.tsx","../src/components/PreviewTimeDisplay.tsx","../src/components/PreviewThumbnail.tsx","../src/components/LiveButton.tsx","../src/components/ads/AdDisplay.tsx","../src/components/ads/AdCountdown.tsx","../src/components/ads/AdClickThroughButton.tsx","../src/components/ads/AdSkipButton.tsx","../src/hooks/useCurrentTime.ts","../src/hooks/useDuration.ts","../src/hooks/useMuted.ts","../src/hooks/usePaused.ts","../src/hooks/useSeeking.ts","../src/hooks/useSource.ts","../src/hooks/useVolume.ts","../src/version.ts"],"sourcesContent":["import { createContext } from 'react';\nimport type { ChromelessPlayer } from 'theoplayer/chromeless';\n\n/**\n * The {@link theoplayer!ChromelessPlayer | ChromelessPlayer} instance of the parent {@link DefaultUI} or {@link UIContainer}.\n *\n * This can be used to access the backing player's state and add event listeners from within a custom React component.\n * The component *must* be a child of {@link DefaultUI} or {@link UIContainer} in order to receive the context.\n * ```jsx\n * import { useCallback, useContext, useSyncExternalStore } from 'react';\n * import { PlayerContext } from '@theoplayer/react-ui';\n *\n * const MyCustomComponent = () => {\n * // Retrieve the backing player from the context\n * const player = useContext(PlayerContext);\n *\n * // Track the paused state of the player\n * const subscribe = useCallback(\n * (callback) => {\n * player?.addEventListener(['play', 'pause'], callback);\n * return () => {\n * player?.removeEventListener(['play', 'pause'], callback);\n * };\n * },\n * [player]\n * );\n * const paused = useSyncExternalStore(\n * subscribe,\n * () => player?.paused ?? true,\n * () => true\n * );\n *\n * // Alternatively, you can use the built-in hook:\n * // import { usePaused } from '@theoplayer/react-ui';\n * // const paused = usePaused();\n *\n * // Show the paused state in your UI\n * return <p>Player is {paused ? \"paused\" : \"playing\"}</p>\n * };\n * ```\n */\nexport const PlayerContext = createContext<ChromelessPlayer | undefined>(undefined);\n","import { useCallback, useEffect, useSyncExternalStore } from 'react';\nimport type { ChromelessPlayer } from 'theoplayer/chromeless';\nimport type { DefaultUI as DefaultUIElement, UIContainer as UIContainerElement } from '@theoplayer/web-ui';\n\nexport function usePlayer(\n ui: DefaultUIElement | UIContainerElement | null,\n onReady?: (player: ChromelessPlayer) => void\n): ChromelessPlayer | undefined {\n // Update player when UI is created, or when 'theoplayerready' event fires.\n const subscribeReady = useCallback(\n (callback: () => void) => {\n ui?.addEventListener('theoplayerready', callback);\n return () => ui?.removeEventListener('theoplayerready', callback);\n },\n [ui]\n );\n const player = useSyncExternalStore<ChromelessPlayer | undefined>(\n subscribeReady,\n () => ui?.player,\n () => undefined\n );\n\n // Call onReady once player is available.\n useEffect(() => {\n if (!player) return;\n onReady?.(player);\n }, [player, onReady]);\n\n return player;\n}\n","import * as React from 'react';\nimport { Children, cloneElement, Fragment, isValidElement, type ReactNode } from 'react';\n\nexport interface SlottedProps {\n slot: string;\n children?: ReactNode;\n}\n\n/**\n * A component that puts its children inside a specific slot of a custom element.\n */\nexport const Slotted = ({ slot, children }: SlottedProps) => {\n if (!children) {\n return null;\n }\n return (\n // https://lit.dev/docs/frameworks/react/#using-slots\n <div slot={slot} style={{ display: 'contents' }} children={children} />\n );\n};\n\n/**\n * A component that puts its children inside a specific slot of a custom element,\n * by adding a `slot` property directly to each child.\n *\n * This should be used with caution! If a component is wrapped in another component that doesn't forward all props\n * (such as a `<Context.Consumer>`), then the slot property might not end up at the desired child.\n */\nexport const SlottedInPlace = ({ slot, children }: SlottedProps): ReactNode => {\n if (!children) {\n return null;\n }\n return Children.map(children, (child) => cloneWithSlot(slot, child));\n};\n\nfunction cloneWithSlot<T extends ReactNode>(slot: string, child: T): ReactNode {\n if (isValidElement(child)) {\n if (child.type === Fragment) {\n return cloneElement(child, undefined, <SlottedInPlace slot={slot} children={child.props.children} />);\n } else {\n return cloneElement(child, { slot });\n }\n } else {\n return <Slotted slot={slot} children={child} />;\n }\n}\n","import * as React from 'react';\nimport { type PropsWithoutRef, type ReactNode, useState } from 'react';\nimport { UIContainer as UIContainerElement } from '@theoplayer/web-ui';\nimport type { ChromelessPlayer } from 'theoplayer/chromeless';\nimport { createComponent, type WebComponentProps } from '@lit/react';\nimport { usePlayer } from './util';\nimport { PlayerContext } from './context';\nimport { Slotted, SlottedInPlace } from './slotted';\nimport type { ChromecastButton, ErrorDisplay, Menu, PlayButton, TimeRange } from './components';\n\nconst RawUIContainer = createComponent({\n tagName: 'theoplayer-ui',\n displayName: 'UIContainer',\n elementClass: UIContainerElement,\n react: React,\n events: {\n onReady: 'theoplayerready'\n } as const\n});\n\nexport interface UIContainerProps extends PropsWithoutRef<WebComponentProps<UIContainerElement>> {\n /**\n * A slot for controls at the top of the player.\n *\n * Can be used to display the stream's title, or for a cast button ({@link ChromecastButton}).\n */\n topChrome?: ReactNode;\n /**\n * A slot for controls in the middle of the player (between the top and bottom chrome).\n */\n middleChrome?: ReactNode;\n /**\n * A slot for controls at the bottom of the player.\n *\n * Can be used for controls such as a play button ({@link PlayButton}) or a seek bar ({@link TimeRange}).\n */\n bottomChrome?: ReactNode;\n /**\n * A slot for controls centered on the player, on top of other controls.\n */\n centeredChrome?: ReactNode;\n /**\n * A slot for a loading indicator centered on the player, on top of other controls but behind the centered chrome.\n */\n centeredLoading?: ReactNode;\n /**\n * A slot for extra menus (see {@link Menu}).\n */\n menu?: ReactNode;\n /**\n * A slot for an error display, to show when the player encounters a fatal error (see {@link ErrorDisplay}).\n */\n error?: ReactNode;\n /**\n * Use a named slot instead, such as:\n * - {@link topChrome}\n * - {@link middleChrome}\n * - {@link bottomChrome}\n * - {@link centeredChrome}\n * - {@link centeredLoading}\n * - {@link menu}\n * - {@link error}\n */\n children?: never;\n /**\n * Called when the backing player is created.\n *\n * @param player\n */\n onReady?: (player: ChromelessPlayer) => void;\n}\n\n/**\n * The container component for a THEOplayer UI.\n *\n * This component provides a basic layout structure for a general player UI, and handles the creation and management\n * of a {@link theoplayer!ChromelessPlayer | THEOplayer player instance} for this UI.\n *\n * ## Usage\n *\n * 1. Create a `<UIContainer>` component, passing a valid player configuration as its `configuration` property\n * and a valid stream source as its `source` property.\n * Additionally, place your UI components into one of the slots of the `<UIContainer>`, such as\n * ```jsx\n * <UIContainer\n * configuration={{\n * license: 'your_license_goes_here',\n * libraryLocation: '/path/to/node_modules/theoplayer/'\n * }}\n * source={{\n * sources: [{ src: 'https://example.com/my_stream.m3u8', type: 'application/x-mpegurl' }]\n * }}\n * // ...\n * />\n * ```\n * 2. Place your UI components into one of the slots of the `<UIContainer>`, such as {@link UIContainerProps.bottomChrome}\n * or {@link UIContainerProps.centeredChrome}. You can use the provided THEOplayer UI components\n * (such as {@link PlayButton} or {@link TimeRange}), or use any of your own components.\n * ```jsx\n * <UIContainer\n * // ...\n * topChrome={<span class=\"title\">My awesome video</span>}\n * centeredChrome={<PlayButton />}\n * bottomChrome={\n * <>\n * <ControlBar>\n * <TimeRange />\n * </ControlBar>\n * <ControlBar>\n * <PlayButton />\n * <MuteButton />\n * <TimeDisplay />\n * <FullscreenButton />\n * </ControlBar>\n * </>\n * }\n * />\n * ```\n *\n * ## Customization\n *\n * This component does not provide any UI components by default, you need to add all components as children of\n * one of the `<UIContainer>` slots. If you're looking for a simple out-of-the-box player experience instead,\n * see {@link DefaultUI}.\n *\n * See {@link @theoplayer/web-ui!UIContainer | UIContainer in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const UIContainer = (props: UIContainerProps) => {\n const { topChrome, middleChrome, bottomChrome, centeredChrome, centeredLoading, menu, error, onReady, ...otherProps } = props;\n const [ui, setUi] = useState<UIContainerElement | null>(null);\n const player = usePlayer(ui, onReady);\n return (\n <RawUIContainer {...otherProps} ref={setUi}>\n <PlayerContext.Provider value={player}>\n <Slotted slot=\"top-chrome\">{topChrome}</Slotted>\n <Slotted slot=\"middle-chrome\">{middleChrome}</Slotted>\n <Slotted slot=\"centered-chrome\">{centeredChrome}</Slotted>\n <Slotted slot=\"centered-loading\">{centeredLoading}</Slotted>\n {bottomChrome}\n <SlottedInPlace slot=\"menu\">{menu}</SlottedInPlace>\n <Slotted slot=\"error\">{error}</Slotted>\n </PlayerContext.Provider>\n </RawUIContainer>\n );\n};\n","import * as React from 'react';\nimport { type PropsWithoutRef, type ReactNode, useState } from 'react';\nimport { DefaultUI as DefaultUIElement } from '@theoplayer/web-ui';\nimport type { ChromelessPlayer } from 'theoplayer/chromeless';\nimport { createComponent, type WebComponentProps } from '@lit/react';\nimport { usePlayer } from './util';\nimport { PlayerContext } from './context';\nimport { Slotted, SlottedInPlace } from './slotted';\nimport type { Menu } from './components';\n\nconst RawDefaultUI = createComponent({\n tagName: 'theoplayer-default-ui',\n displayName: 'DefaultUI',\n elementClass: DefaultUIElement,\n react: React,\n events: {\n onReady: 'theoplayerready'\n } as const\n});\n\nexport interface DefaultUIProps extends PropsWithoutRef<Omit<WebComponentProps<DefaultUIElement>, 'title'>> {\n /**\n * A slot for the stream's title in the top control bar.\n */\n title?: ReactNode;\n /**\n * A slot for extra UI controls in the top control bar.\n */\n topControlBar?: ReactNode;\n /**\n * A slot for extra UI controls in the bottom control bar.\n */\n bottomControlBar?: ReactNode;\n /**\n * A slot for extra menus (see {@link Menu}).\n */\n menu?: ReactNode;\n /**\n * Use a named slot instead, such as:\n * - {@link title}\n * - {@link topControlBar}\n * - {@link bottomControlBar}\n * - {@link menu}\n */\n children?: never;\n /**\n * Called when the backing player is created.\n *\n * @param player\n */\n onReady?: (player: ChromelessPlayer) => void;\n}\n\n/**\n * A default UI for THEOplayer.\n *\n * This default UI provides a great player experience out-of-the-box, that works well on all types of devices\n * and for all types of streams. It provides all the common playback controls for playing, seeking,\n * changing languages and qualities. It also supports advertisements and casting.\n *\n * ## Usage\n *\n * 1. Create a `<DefaultUI>` component, passing a valid player configuration as its `configuration` property\n * and a valid stream source as its `source` property.\n * ```jsx\n * <DefaultUI\n * configuration={{\n * license: 'your_license_goes_here',\n * libraryLocation: '/path/to/node_modules/theoplayer/'\n * }}\n * source={{\n * sources: [{ src: 'https://example.com/my_stream.m3u8', type: 'application/x-mpegurl' }]\n * }}\n * />\n * ```\n * 2. Optionally, customize the player using CSS custom properties and/or extra controls.\n *\n * ## Customization\n *\n * The styling can be controlled using CSS custom properties (see {@link UIContainer}).\n * Additional controls can be added to the {@link DefaultUIProps.topControlBar}\n * and {@link DefaultUIProps.bottomControlBar} slots.\n * For more extensive customizations, we recommend defining your own custom UI using a {@link UIContainer}.\n *\n * See {@link @theoplayer/web-ui!DefaultUI | DefaultUI in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const DefaultUI = (props: DefaultUIProps) => {\n const { title, topControlBar, bottomControlBar, menu, onReady, ...otherProps } = props;\n const [ui, setUi] = useState<DefaultUIElement | null>(null);\n const player = usePlayer(ui, onReady);\n return (\n <RawDefaultUI {...otherProps} ref={setUi}>\n <PlayerContext.Provider value={player}>\n <Slotted slot=\"title\">{title}</Slotted>\n <Slotted slot=\"top-control-bar\">{topControlBar}</Slotted>\n <Slotted slot=\"bottom-control-bar\">{bottomControlBar}</Slotted>\n <SlottedInPlace slot=\"menu\">{menu}</SlottedInPlace>\n </PlayerContext.Provider>\n </RawDefaultUI>\n );\n};\n","import { createComponent } from '@lit/react';\nimport { ControlBar as ControlBarElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!ControlBar | ControlBar in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const ControlBar = createComponent({\n tagName: 'theoplayer-control-bar',\n displayName: 'ControlBar',\n elementClass: ControlBarElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { Button as ButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\nexport const ButtonEvents = {\n onClick: 'click'\n} as const;\n\n/**\n * See {@link @theoplayer/web-ui!Button | Button in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const Button = createComponent({\n tagName: 'theoplayer-button',\n displayName: 'Button',\n elementClass: ButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { LinkButton as LinkButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!LinkButton | LinkButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const LinkButton = createComponent({\n tagName: 'theoplayer-link-button',\n displayName: 'LinkButton',\n elementClass: LinkButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { PlayButton as PlayButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!PlayButton | PlayButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PlayButton = createComponent({\n tagName: 'theoplayer-play-button',\n displayName: 'PlayButton',\n elementClass: PlayButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { MuteButton as MuteButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!MuteButton | MuteButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const MuteButton = createComponent({\n tagName: 'theoplayer-mute-button',\n displayName: 'MuteButton',\n elementClass: MuteButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { SeekButton as SeekButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!SeekButton | SeekButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const SeekButton = createComponent({\n tagName: 'theoplayer-seek-button',\n displayName: 'SeekButton',\n elementClass: SeekButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TimeDisplay as TimeDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!TimeDisplay | TimeDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TimeDisplay = createComponent({\n tagName: 'theoplayer-time-display',\n displayName: 'TimeDisplay',\n elementClass: TimeDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { DurationDisplay as DurationDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!DurationDisplay | DurationDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const DurationDisplay = createComponent({\n tagName: 'theoplayer-duration-display',\n displayName: 'DurationDisplay',\n elementClass: DurationDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { RadioGroup as RadioGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\nexport const RadioGroupEvents = {\n onChange: 'change'\n} as const;\n\n/**\n * See {@link @theoplayer/web-ui!RadioGroup | RadioGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const RadioGroup = createComponent({\n tagName: 'theoplayer-radio-group',\n displayName: 'RadioGroup',\n elementClass: RadioGroupElement,\n react: React,\n events: RadioGroupEvents\n});\n","import { createComponent } from '@lit/react';\nimport { RadioButton as RadioButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\nexport const RadioButtonEvents = {\n ...ButtonEvents,\n onChange: 'change',\n onInput: 'input'\n} as const;\n\n/**\n * See {@link @theoplayer/web-ui!RadioButton | RadioButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const RadioButton = createComponent({\n tagName: 'theoplayer-radio-button',\n displayName: 'RadioButton',\n elementClass: RadioButtonElement,\n react: React,\n events: RadioButtonEvents\n});\n","import { createComponent, type WebComponentProps } from '@lit/react';\nimport { Menu as MenuElement } from '@theoplayer/web-ui';\nimport type { PropsWithoutRef, ReactNode } from 'react';\nimport * as React from 'react';\nimport { Slotted } from '../slotted';\n\nconst RawMenu = createComponent({\n tagName: 'theoplayer-menu',\n displayName: 'Menu',\n elementClass: MenuElement,\n react: React\n});\n\nexport interface CommonMenuProps {\n /**\n * A slot for the menu's heading.\n */\n heading?: ReactNode;\n /**\n * The menu's contents.\n */\n children?: ReactNode;\n}\n\nexport interface MenuProps extends CommonMenuProps, PropsWithoutRef<WebComponentProps<MenuElement>> {}\n\n/**\n * See {@link @theoplayer/web-ui!Menu | Menu in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const Menu = (props: MenuProps) => {\n const { heading, children, ...otherProps } = props;\n return (\n <RawMenu {...otherProps}>\n <Slotted slot=\"heading\">{heading}</Slotted>\n {children}\n </RawMenu>\n );\n};\n","import { createComponent } from '@lit/react';\nimport { MenuGroup as MenuGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!MenuGroup | MenuGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const MenuGroup = createComponent({\n tagName: 'theoplayer-menu-group',\n displayName: 'MenuGroup',\n elementClass: MenuGroupElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { MenuButton as MenuButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!MenuButton | MenuButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const MenuButton = createComponent({\n tagName: 'theoplayer-menu-button',\n displayName: 'MenuButton',\n elementClass: MenuButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { CloseMenuButton as CloseMenuButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!CloseMenuButton | CloseMenuButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const CloseMenuButton = createComponent({\n tagName: 'theoplayer-close-menu-button',\n displayName: 'CloseMenuButton',\n elementClass: CloseMenuButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { MediaTrackRadioButton as MediaTrackRadioButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioButtonEvents } from './RadioButton';\n\n/**\n * See {@link @theoplayer/web-ui!MediaTrackRadioButton | MediaTrackRadioButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const MediaTrackRadioButton = createComponent({\n tagName: 'theoplayer-media-track-radio-button',\n displayName: 'MediaTrackRadioButton',\n elementClass: MediaTrackRadioButtonElement,\n react: React,\n events: RadioButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TrackRadioGroup as TrackRadioGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioGroupEvents } from './RadioGroup';\n\n/**\n * See {@link @theoplayer/web-ui!TrackRadioGroup | TrackRadioGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TrackRadioGroup = createComponent({\n tagName: 'theoplayer-track-radio-group',\n displayName: 'TrackRadioGroup',\n elementClass: TrackRadioGroupElement,\n react: React,\n events: RadioGroupEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TextTrackRadioButton as TextTrackRadioButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioButtonEvents } from './RadioButton';\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackRadioButton | TextTrackRadioButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackRadioButton = createComponent({\n tagName: 'theoplayer-text-track-radio-button',\n displayName: 'TextTrackRadioButton',\n elementClass: TextTrackRadioButtonElement,\n react: React,\n events: RadioButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TextTrackOffRadioButton as TextTrackOffRadioButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioButtonEvents } from './RadioButton';\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackOffRadioButton | TextTrackOffRadioButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackOffRadioButton = createComponent({\n tagName: 'theoplayer-text-track-off-radio-button',\n displayName: 'TextTrackOffRadioButton',\n elementClass: TextTrackOffRadioButtonElement,\n react: React,\n events: RadioButtonEvents\n});\n","import { createComponent, type WebComponentProps } from '@lit/react';\nimport { LanguageMenu as LanguageMenuElement } from '@theoplayer/web-ui';\nimport type { PropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport { Slotted } from '../slotted';\nimport type { CommonMenuProps } from './Menu';\n\nconst RawLanguageMenu = createComponent({\n tagName: 'theoplayer-language-menu',\n displayName: 'LanguageMenu',\n elementClass: LanguageMenuElement,\n react: React\n});\n\nexport interface LanguageMenuProps extends CommonMenuProps, PropsWithoutRef<WebComponentProps<LanguageMenuElement>> {}\n\n/**\n * See {@link @theoplayer/web-ui!LanguageMenu | LanguageMenu in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const LanguageMenu = (props: LanguageMenuProps) => {\n const { heading, children, ...otherProps } = props;\n return (\n <RawLanguageMenu {...otherProps}>\n <Slotted slot=\"heading\">{heading}</Slotted>\n {children}\n </RawLanguageMenu>\n );\n};\n","import { createComponent } from '@lit/react';\nimport { LanguageMenuButton as LanguageMenuButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!LanguageMenuButton | LanguageMenuButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const LanguageMenuButton = createComponent({\n tagName: 'theoplayer-language-menu-button',\n displayName: 'LanguageMenuButton',\n elementClass: LanguageMenuButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { PlaybackRateRadioGroup as PlaybackRateRadioGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioGroupEvents } from './RadioGroup';\n\n/**\n * See {@link @theoplayer/web-ui!PlaybackRateRadioGroup | PlaybackRateRadioGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PlaybackRateRadioGroup = createComponent({\n tagName: 'theoplayer-playback-rate-radio-group',\n displayName: 'PlaybackRateRadioGroup',\n elementClass: PlaybackRateRadioGroupElement,\n react: React,\n events: RadioGroupEvents\n});\n","import { createComponent } from '@lit/react';\nimport { PlaybackRateMenuButton as PlaybackRateMenuButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!PlaybackRateMenuButton | PlaybackRateMenuButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PlaybackRateMenuButton = createComponent({\n tagName: 'theoplayer-playback-rate-menu-button',\n displayName: 'PlaybackRateMenuButton',\n elementClass: PlaybackRateMenuButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent, type WebComponentProps } from '@lit/react';\nimport { PlaybackRateMenu as PlaybackRateMenuElement } from '@theoplayer/web-ui';\nimport type { PropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport { Slotted } from '../slotted';\nimport type { CommonMenuProps } from './Menu';\n\nconst RawPlaybackRateMenu = createComponent({\n tagName: 'theoplayer-playback-rate-menu',\n displayName: 'PlaybackRateMenu',\n elementClass: PlaybackRateMenuElement,\n react: React\n});\n\nexport interface PlaybackRateMenuProps extends CommonMenuProps, PropsWithoutRef<WebComponentProps<PlaybackRateMenuElement>> {}\n\n/**\n * See {@link @theoplayer/web-ui!PlaybackRateMenu | PlaybackRateMenu in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PlaybackRateMenu = (props: PlaybackRateMenuProps) => {\n const { heading, children, ...otherProps } = props;\n return (\n <RawPlaybackRateMenu {...otherProps}>\n <Slotted slot=\"heading\">{heading}</Slotted>\n {children}\n </RawPlaybackRateMenu>\n );\n};\n","import { createComponent } from '@lit/react';\nimport { PlaybackRateDisplay as PlaybackRateDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!PlaybackRateDisplay | PlaybackRateDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PlaybackRateDisplay = createComponent({\n tagName: 'theoplayer-playback-rate-display',\n displayName: 'PlaybackRateDisplay',\n elementClass: PlaybackRateDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { ActiveQualityDisplay as ActiveQualityDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!ActiveQualityDisplay | ActiveQualityDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const ActiveQualityDisplay = createComponent({\n tagName: 'theoplayer-active-quality-display',\n displayName: 'ActiveQualityDisplay',\n elementClass: ActiveQualityDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { QualityRadioButton as QualityRadioButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioButtonEvents } from './RadioButton';\n\n/**\n * See {@link @theoplayer/web-ui!QualityRadioButton | QualityRadioButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const QualityRadioButton = createComponent({\n tagName: 'theoplayer-quality-radio-button',\n displayName: 'QualityRadioButton',\n elementClass: QualityRadioButtonElement,\n react: React,\n events: RadioButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { QualityRadioGroup as QualityRadioGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioGroupEvents } from './RadioGroup';\n\n/**\n * See {@link @theoplayer/web-ui!QualityRadioGroup | QualityRadioGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const QualityRadioGroup = createComponent({\n tagName: 'theoplayer-quality-radio-group',\n displayName: 'QualityRadioGroup',\n elementClass: QualityRadioGroupElement,\n react: React,\n events: RadioGroupEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TextTrackStyleRadioGroup as TextTrackStyleRadioGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioGroupEvents } from './RadioGroup';\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackStyleRadioGroup | TextTrackStyleRadioGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackStyleRadioGroup = createComponent({\n tagName: 'theoplayer-text-track-style-radio-group',\n displayName: 'TextTrackStyleRadioGroup',\n elementClass: TextTrackStyleRadioGroupElement,\n react: React,\n events: RadioGroupEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TextTrackStyleResetButton as TextTrackStyleResetButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackStyleResetButton | TextTrackStyleResetButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackStyleResetButton = createComponent({\n tagName: 'theoplayer-text-track-style-reset-button',\n displayName: 'TextTrackStyleResetButton',\n elementClass: TextTrackStyleResetButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TextTrackStyleDisplay as TextTrackStyleDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackStyleDisplay | TextTrackStyleDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackStyleDisplay = createComponent({\n tagName: 'theoplayer-text-track-style-display',\n displayName: 'TextTrackStyleDisplay',\n elementClass: TextTrackStyleDisplayElement,\n react: React\n});\n","import { createComponent, type WebComponentProps } from '@lit/react';\nimport { TextTrackStyleMenu as TextTrackStyleMenuElement } from '@theoplayer/web-ui';\nimport type { PropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport { Slotted } from '../slotted';\nimport type { CommonMenuProps } from './Menu';\n\nconst RawTextTrackStyleMenu = createComponent({\n tagName: 'theoplayer-text-track-style-menu',\n displayName: 'TextTrackStyleMenu',\n elementClass: TextTrackStyleMenuElement,\n react: React\n});\n\nexport interface TextTrackStyleMenuProps extends CommonMenuProps, PropsWithoutRef<WebComponentProps<TextTrackStyleMenuElement>> {}\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackStyleMenu | TextTrackStyleMenu in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackStyleMenu = (props: TextTrackStyleMenuProps) => {\n const { heading, children, ...otherProps } = props;\n return (\n <RawTextTrackStyleMenu {...otherProps}>\n <Slotted slot=\"heading\">{heading}</Slotted>\n {children}\n </RawTextTrackStyleMenu>\n );\n};\n","import { createComponent, type WebComponentProps } from '@lit/react';\nimport { SettingsMenu as SettingsMenuElement } from '@theoplayer/web-ui';\nimport type { PropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport { Slotted } from '../slotted';\nimport type { CommonMenuProps } from './Menu';\n\nconst RawSettingsMenu = createComponent({\n tagName: 'theoplayer-settings-menu',\n displayName: 'SettingsMenu',\n elementClass: SettingsMenuElement,\n react: React\n});\n\nexport interface SettingsMenuProps extends CommonMenuProps, PropsWithoutRef<WebComponentProps<SettingsMenuElement>> {}\n\n/**\n * See {@link @theoplayer/web-ui!SettingsMenu | SettingsMenu in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const SettingsMenu = (props: SettingsMenuProps) => {\n const { heading, children, ...otherProps } = props;\n return (\n <RawSettingsMenu {...otherProps}>\n <Slotted slot=\"heading\">{heading}</Slotted>\n {children}\n </RawSettingsMenu>\n );\n};\n","import { createComponent } from '@lit/react';\nimport { SettingsMenuButton as SettingsMenuButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!SettingsMenuButton | SettingsMenuButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const SettingsMenuButton = createComponent({\n tagName: 'theoplayer-settings-menu-button',\n displayName: 'SettingsMenuButton',\n elementClass: SettingsMenuButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { FullscreenButton as FullscreenButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!FullscreenButton | FullscreenButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const FullscreenButton = createComponent({\n tagName: 'theoplayer-fullscreen-button',\n displayName: 'FullscreenButton',\n elementClass: FullscreenButtonElement,\n react: React,\n events: ButtonEvents\n});\n","export const RangeEvents = {\n onChange: 'change',\n onInput: 'input'\n} as const;\n","import { createComponent } from '@lit/react';\nimport { TimeRange as TimeRangeElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RangeEvents } from './Range';\n\n/**\n * See {@link @theoplayer/web-ui!TimeRange | TimeRange in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TimeRange = createComponent({\n tagName: 'theoplayer-time-range',\n displayName: 'TimeRange',\n elementClass: TimeRangeElement,\n react: React,\n events: RangeEvents\n});\n","import { createComponent } from '@lit/react';\nimport { VolumeRange as VolumeRangeElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RangeEvents } from './Range';\n\n/**\n * See {@link @theoplayer/web-ui!VolumeRange | VolumeRange in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const VolumeRange = createComponent({\n tagName: 'theoplayer-volume-range',\n displayName: 'VolumeRange',\n elementClass: VolumeRangeElement,\n react: React,\n events: RangeEvents\n});\n","import { createComponent } from '@lit/react';\nimport { ErrorDisplay as ErrorDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!ErrorDisplay | ErrorDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const ErrorDisplay = createComponent({\n tagName: 'theoplayer-error-display',\n displayName: 'ErrorDisplay',\n elementClass: ErrorDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { CastButton as CastButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!CastButton | CastButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const CastButton = createComponent({\n tagName: 'theoplayer-cast-button',\n displayName: 'CastButton',\n elementClass: CastButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { ChromecastButton as ChromecastButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!ChromecastButton | ChromecastButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const ChromecastButton = createComponent({\n tagName: 'theoplayer-chromecast-button',\n displayName: 'ChromecastButton',\n elementClass: ChromecastButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { ChromecastDisplay as ChromecastDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!ChromecastDisplay | ChromecastDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const ChromecastDisplay = createComponent({\n tagName: 'theoplayer-chromecast-display',\n displayName: 'ChromecastDisplay',\n elementClass: ChromecastDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { AirPlayButton as AirPlayButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!AirPlayButton | AirPlayButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const AirPlayButton = createComponent({\n tagName: 'theoplayer-airplay-button',\n displayName: 'AirPlayButton',\n elementClass: AirPlayButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { LoadingIndicator as LoadingIndicatorElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!LoadingIndicator | LoadingIndicator in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const LoadingIndicator = createComponent({\n tagName: 'theoplayer-loading-indicator',\n displayName: 'LoadingIndicator',\n elementClass: LoadingIndicatorElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { GestureReceiver as GestureReceiverElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!GestureReceiver | GestureReceiver in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const GestureReceiver = createComponent({\n tagName: 'theoplayer-gesture-receiver',\n displayName: 'GestureReceiver',\n elementClass: GestureReceiverElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { PreviewTimeDisplay as PreviewTimeDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!PreviewTimeDisplay | PreviewTimeDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PreviewTimeDisplay = createComponent({\n tagName: 'theoplayer-preview-time-display',\n displayName: 'PreviewTimeDisplay',\n elementClass: PreviewTimeDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { PreviewThumbnail as PreviewThumbnailElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!PreviewThumbnail | PreviewThumbnail in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PreviewThumbnail = createComponent({\n tagName: 'theoplayer-preview-thumbnail',\n displayName: 'PreviewThumbnail',\n elementClass: PreviewThumbnailElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { LiveButton as LiveButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!LiveButton | LiveButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const LiveButton = createComponent({\n tagName: 'theoplayer-live-button',\n displayName: 'LiveButton',\n elementClass: LiveButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { AdDisplay as AdDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!AdDisplay | AdDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const AdDisplay = createComponent({\n tagName: 'theoplayer-ad-display',\n displayName: 'AdDisplay',\n elementClass: AdDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { AdCountdown as AdCountdownElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!AdCountdown | AdCountdown in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const AdCountdown = createComponent({\n tagName: 'theoplayer-ad-countdown',\n displayName: 'AdCountdown',\n elementClass: AdCountdownElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { AdClickThroughButton as AdClickThroughButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from '../Button';\n\n/**\n * See {@link @theoplayer/web-ui!AdClickThroughButton | AdClickThroughButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const AdClickThroughButton = createComponent({\n tagName: 'theoplayer-ad-clickthrough-button',\n displayName: 'AdClickThroughButton',\n elementClass: AdClickThroughButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { AdSkipButton as AdSkipButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from '../Button';\n\n/**\n * See {@link @theoplayer/web-ui!AdSkipButton | AdSkipButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const AdSkipButton = createComponent({\n tagName: 'theoplayer-ad-skip-button',\n displayName: 'AdSkipButton',\n elementClass: AdSkipButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\nimport type { PlayerEventMap } from 'theoplayer';\n\nconst TIME_CHANGE_EVENTS = ['timeupdate', 'seeking', 'seeked', 'emptied'] satisfies ReadonlyArray<keyof PlayerEventMap>;\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.currentTime | the player's current time}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useCurrentTime(): number {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener(TIME_CHANGE_EVENTS, callback);\n return () => player?.removeEventListener(TIME_CHANGE_EVENTS, callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.currentTime : 0),\n () => 0\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\nimport type { PlayerEventMap } from 'theoplayer';\n\nconst DURATION_CHANGE_EVENTS = ['durationchange', 'emptied'] satisfies ReadonlyArray<keyof PlayerEventMap>;\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.duration | the player's duration}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useDuration(): number {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener(DURATION_CHANGE_EVENTS, callback);\n return () => player?.removeEventListener(DURATION_CHANGE_EVENTS, callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.duration : NaN),\n () => NaN\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.muted | the player's muted state}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useMuted(): boolean {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener('volumechange', callback);\n return () => player?.removeEventListener('volumechange', callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.muted : false),\n () => false\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\nimport type { PlayerEventMap } from 'theoplayer';\n\nconst PAUSED_CHANGE_EVENTS = ['play', 'pause'] satisfies ReadonlyArray<keyof PlayerEventMap>;\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.paused | the player's paused state}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function usePaused(): boolean {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener(PAUSED_CHANGE_EVENTS, callback);\n return () => player?.removeEventListener(PAUSED_CHANGE_EVENTS, callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.paused : true),\n () => true\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\nimport type { PlayerEventMap } from 'theoplayer';\n\nconst SEEKING_CHANGE_EVENTS = ['seeking', 'seeked', 'emptied'] satisfies ReadonlyArray<keyof PlayerEventMap>;\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.seeking | the player's seeking state}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useSeeking(): boolean {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener(SEEKING_CHANGE_EVENTS, callback);\n return () => player?.removeEventListener(SEEKING_CHANGE_EVENTS, callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.seeking : false),\n () => false\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\nimport type { SourceDescription } from 'theoplayer';\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.source | the player's source}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useSource(): SourceDescription | undefined {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener('sourcechange', callback);\n return () => player?.removeEventListener('sourcechange', callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => player?.source,\n () => undefined\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.volume | the player's volume}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useVolume(): number {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener('volumechange', callback);\n return () => player?.removeEventListener('volumechange', callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.volume : 1),\n () => 1\n );\n}\n","import { version as packageVersion } from '../package.json';\n\n/**\n * The version of Open Video UI for React.\n */\nexport const version: string = packageVersion;\n"],"names":["PlayerContext","createContext","undefined","usePlayer","ui","onReady","subscribeReady","useCallback","callback","addEventListener","removeEventListener","player","useSyncExternalStore","useEffect","Slotted","param","slot","children","React","div","style","display","SlottedInPlace","Children","map","child","isValidElement","type","Fragment","cloneElement","props","RawUIContainer","createComponent","tagName","displayName","elementClass","UIContainerElement","react","events","UIContainer","topChrome","middleChrome","bottomChrome","centeredChrome","centeredLoading","menu","error","otherProps","setUi","useState","ref","createElement","Provider","value","RawDefaultUI","DefaultUIElement","DefaultUI","title","topControlBar","bottomControlBar","ControlBar","ControlBarElement","ButtonEvents","onClick","Button","ButtonElement","LinkButton","LinkButtonElement","PlayButton","PlayButtonElement","MuteButton","MuteButtonElement","SeekButton","SeekButtonElement","TimeDisplay","TimeDisplayElement","DurationDisplay","DurationDisplayElement","RadioGroupEvents","onChange","RadioGroup","RadioGroupElement","RadioButtonEvents","onInput","RadioButton","RadioButtonElement","RawMenu","MenuElement","Menu","heading","MenuGroup","MenuGroupElement","MenuButton","MenuButtonElement","CloseMenuButton","CloseMenuButtonElement","MediaTrackRadioButton","MediaTrackRadioButtonElement","TrackRadioGroup","TrackRadioGroupElement","TextTrackRadioButton","TextTrackRadioButtonElement","TextTrackOffRadioButton","TextTrackOffRadioButtonElement","RawLanguageMenu","LanguageMenuElement","LanguageMenu","LanguageMenuButton","LanguageMenuButtonElement","PlaybackRateRadioGroup","PlaybackRateRadioGroupElement","PlaybackRateMenuButton","PlaybackRateMenuButtonElement","RawPlaybackRateMenu","PlaybackRateMenuElement","PlaybackRateMenu","PlaybackRateDisplay","PlaybackRateDisplayElement","ActiveQualityDisplay","ActiveQualityDisplayElement","QualityRadioButton","QualityRadioButtonElement","QualityRadioGroup","QualityRadioGroupElement","TextTrackStyleRadioGroup","TextTrackStyleRadioGroupElement","TextTrackStyleResetButton","TextTrackStyleResetButtonElement","TextTrackStyleDisplay","TextTrackStyleDisplayElement","RawTextTrackStyleMenu","TextTrackStyleMenuElement","TextTrackStyleMenu","RawSettingsMenu","SettingsMenuElement","SettingsMenu","SettingsMenuButton","SettingsMenuButtonElement","FullscreenButton","FullscreenButtonElement","RangeEvents","TimeRange","TimeRangeElement","VolumeRange","VolumeRangeElement","ErrorDisplay","ErrorDisplayElement","CastButton","CastButtonElement","ChromecastButton","ChromecastButtonElement","ChromecastDisplay","ChromecastDisplayElement","AirPlayButton","AirPlayButtonElement","LoadingIndicator","LoadingIndicatorElement","GestureReceiver","GestureReceiverElement","PreviewTimeDisplay","PreviewTimeDisplayElement","PreviewThumbnail","PreviewThumbnailElement","LiveButton","LiveButtonElement","AdDisplay","AdDisplayElement","AdCountdown","AdCountdownElement","AdClickThroughButton","AdClickThroughButtonElement","AdSkipButton","AdSkipButtonElement","TIME_CHANGE_EVENTS","useCurrentTime","useContext","subscribe","currentTime","DURATION_CHANGE_EVENTS","useDuration","duration","NaN","useMuted","muted","PAUSED_CHANGE_EVENTS","usePaused","paused","SEEKING_CHANGE_EVENTS","useSeeking","seeking","useSource","source","useVolume","volume","version"],"mappings":"w1CAyCO,IAAMA,GAAgBC,EAA4CC,KAAAA,GCrClE,SAASC,GACZC,CAAgD,CAChDC,CAA4C,EAG5C,IAAMC,EA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L,EAAYzK,EACd,AAACC,IACGG,AAAAA,MAAAA,GAAAA,EAAQF,gBAAgB,CAAC,eAAgBD,GAClC,IAAMG,AAAAA,MAAAA,EAAAA,KAAAA,EAAAA,EAAQD,mBAAmB,CAAC,eAAgBF,IAE7D,CAACG,EAAO,EAEZ,OAAOC,EACHoK,EACA,IAAOrK,EAASA,EAAOsL,MAAM,CAAG,EAChC,IAAM,EAEd,CCpBaC,IAAAA"}
1
+ {"version":3,"file":"THEOplayerReactUI.mjs","sources":["../src/context.ts","../src/util.ts","../src/components/ControlBar.tsx","../src/components/Button.tsx","../src/components/LinkButton.tsx","../src/components/PlayButton.tsx","../src/components/MuteButton.tsx","../src/components/SeekButton.tsx","../src/components/TimeDisplay.tsx","../src/components/DurationDisplay.tsx","../src/components/RadioGroup.tsx","../src/components/RadioButton.tsx","../src/slotted.tsx","../src/components/Menu.tsx","../src/components/MenuGroup.tsx","../src/components/MenuButton.tsx","../src/components/CloseMenuButton.tsx","../src/components/MediaTrackRadioButton.tsx","../src/components/TrackRadioGroup.tsx","../src/components/TextTrackRadioButton.tsx","../src/components/TextTrackOffRadioButton.tsx","../src/components/LanguageMenu.tsx","../src/components/LanguageMenuButton.tsx","../src/components/PlaybackRateRadioGroup.tsx","../src/components/PlaybackRateMenuButton.tsx","../src/components/PlaybackRateMenu.tsx","../src/components/PlaybackRateDisplay.tsx","../src/components/ActiveQualityDisplay.tsx","../src/components/QualityRadioButton.tsx","../src/components/QualityRadioGroup.tsx","../src/components/TextTrackStyleRadioGroup.tsx","../src/components/TextTrackStyleResetButton.tsx","../src/components/TextTrackStyleDisplay.tsx","../src/components/TextTrackStyleMenu.tsx","../src/components/SettingsMenu.tsx","../src/components/SettingsMenuButton.tsx","../src/components/FullscreenButton.tsx","../src/components/Range.ts","../src/components/TimeRange.tsx","../src/components/VolumeRange.tsx","../src/components/ErrorDisplay.tsx","../src/components/CastButton.tsx","../src/components/ChromecastButton.tsx","../src/components/ChromecastDisplay.tsx","../src/components/AirPlayButton.tsx","../src/components/LoadingIndicator.tsx","../src/components/GestureReceiver.tsx","../src/components/PreviewTimeDisplay.tsx","../src/components/PreviewThumbnail.tsx","../src/components/LiveButton.tsx","../src/components/SlotContainer.tsx","../src/components/ads/AdDisplay.tsx","../src/components/ads/AdCountdown.tsx","../src/components/ads/AdClickThroughButton.tsx","../src/components/ads/AdSkipButton.tsx","../src/UIContainer.tsx","../src/DefaultUI.tsx","../src/THEOliveDefaultUI.tsx","../src/hooks/useCurrentTime.ts","../src/hooks/useDuration.ts","../src/hooks/useMuted.ts","../src/hooks/usePaused.ts","../src/hooks/useSeeking.ts","../src/hooks/useSource.ts","../src/hooks/useVolume.ts","../src/version.ts"],"sourcesContent":["import { createContext } from 'react';\nimport type { ChromelessPlayer } from 'theoplayer/chromeless';\n\n/**\n * The {@link theoplayer!ChromelessPlayer | ChromelessPlayer} instance of the parent {@link DefaultUI} or {@link UIContainer}.\n *\n * This can be used to access the backing player's state and add event listeners from within a custom React component.\n * The component *must* be a child of {@link DefaultUI} or {@link UIContainer} in order to receive the context.\n * ```jsx\n * import { useCallback, useContext, useSyncExternalStore } from 'react';\n * import { PlayerContext } from '@theoplayer/react-ui';\n *\n * const MyCustomComponent = () => {\n * // Retrieve the backing player from the context\n * const player = useContext(PlayerContext);\n *\n * // Track the paused state of the player\n * const subscribe = useCallback(\n * (callback) => {\n * player?.addEventListener(['play', 'pause'], callback);\n * return () => {\n * player?.removeEventListener(['play', 'pause'], callback);\n * };\n * },\n * [player]\n * );\n * const paused = useSyncExternalStore(\n * subscribe,\n * () => player?.paused ?? true,\n * () => true\n * );\n *\n * // Alternatively, you can use the built-in hook:\n * // import { usePaused } from '@theoplayer/react-ui';\n * // const paused = usePaused();\n *\n * // Show the paused state in your UI\n * return <p>Player is {paused ? \"paused\" : \"playing\"}</p>\n * };\n * ```\n */\nexport const PlayerContext = createContext<ChromelessPlayer | undefined>(undefined);\n","import { useCallback, useEffect, useSyncExternalStore } from 'react';\nimport type { ChromelessPlayer } from 'theoplayer/chromeless';\nimport type { DefaultUI as DefaultUIElement, UIContainer as UIContainerElement } from '@theoplayer/web-ui';\n\nexport function usePlayer(\n ui: DefaultUIElement | UIContainerElement | null,\n onReady?: (player: ChromelessPlayer) => void\n): ChromelessPlayer | undefined {\n // Update player when UI is created, or when 'theoplayerready' event fires.\n const subscribeReady = useCallback(\n (callback: () => void) => {\n ui?.addEventListener('theoplayerready', callback);\n return () => ui?.removeEventListener('theoplayerready', callback);\n },\n [ui]\n );\n const player = useSyncExternalStore<ChromelessPlayer | undefined>(\n subscribeReady,\n () => ui?.player,\n () => undefined\n );\n\n // Call onReady once player is available.\n useEffect(() => {\n if (!player) return;\n onReady?.(player);\n }, [player, onReady]);\n\n return player;\n}\n","import { createComponent } from '@lit/react';\nimport { ControlBar as ControlBarElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!ControlBar | ControlBar in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const ControlBar = createComponent({\n tagName: 'theoplayer-control-bar',\n displayName: 'ControlBar',\n elementClass: ControlBarElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { Button as ButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\nexport const ButtonEvents = {\n onClick: 'click'\n} as const;\n\n/**\n * See {@link @theoplayer/web-ui!Button | Button in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const Button = createComponent({\n tagName: 'theoplayer-button',\n displayName: 'Button',\n elementClass: ButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { LinkButton as LinkButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!LinkButton | LinkButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const LinkButton = createComponent({\n tagName: 'theoplayer-link-button',\n displayName: 'LinkButton',\n elementClass: LinkButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { PlayButton as PlayButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!PlayButton | PlayButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PlayButton = createComponent({\n tagName: 'theoplayer-play-button',\n displayName: 'PlayButton',\n elementClass: PlayButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { MuteButton as MuteButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!MuteButton | MuteButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const MuteButton = createComponent({\n tagName: 'theoplayer-mute-button',\n displayName: 'MuteButton',\n elementClass: MuteButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { SeekButton as SeekButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!SeekButton | SeekButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const SeekButton = createComponent({\n tagName: 'theoplayer-seek-button',\n displayName: 'SeekButton',\n elementClass: SeekButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TimeDisplay as TimeDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!TimeDisplay | TimeDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TimeDisplay = createComponent({\n tagName: 'theoplayer-time-display',\n displayName: 'TimeDisplay',\n elementClass: TimeDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { DurationDisplay as DurationDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!DurationDisplay | DurationDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const DurationDisplay = createComponent({\n tagName: 'theoplayer-duration-display',\n displayName: 'DurationDisplay',\n elementClass: DurationDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { RadioGroup as RadioGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\nexport const RadioGroupEvents = {\n onChange: 'change'\n} as const;\n\n/**\n * See {@link @theoplayer/web-ui!RadioGroup | RadioGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const RadioGroup = createComponent({\n tagName: 'theoplayer-radio-group',\n displayName: 'RadioGroup',\n elementClass: RadioGroupElement,\n react: React,\n events: RadioGroupEvents\n});\n","import { createComponent } from '@lit/react';\nimport { RadioButton as RadioButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\nexport const RadioButtonEvents = {\n ...ButtonEvents,\n onChange: 'change',\n onInput: 'input'\n} as const;\n\n/**\n * See {@link @theoplayer/web-ui!RadioButton | RadioButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const RadioButton = createComponent({\n tagName: 'theoplayer-radio-button',\n displayName: 'RadioButton',\n elementClass: RadioButtonElement,\n react: React,\n events: RadioButtonEvents\n});\n","import * as React from 'react';\nimport { type ReactNode } from 'react';\n\nexport interface SlottedProps {\n slot: string;\n children?: ReactNode;\n}\n/**\n * A component that puts its children inside a specific slot of a custom element.\n */\nexport const Slotted = ({ slot, children }: SlottedProps) => {\n if (!children) {\n return null;\n }\n return (\n // https://lit.dev/docs/frameworks/react/#using-slots\n <div slot={slot} style={{ display: 'contents' }} children={children} />\n );\n};\n","import { createComponent, type WebComponentProps } from '@lit/react';\nimport { Menu as MenuElement } from '@theoplayer/web-ui';\nimport type { PropsWithoutRef, ReactNode } from 'react';\nimport * as React from 'react';\nimport { Slotted } from '../slotted';\n\nconst RawMenu = createComponent({\n tagName: 'theoplayer-menu',\n displayName: 'Menu',\n elementClass: MenuElement,\n react: React\n});\n\nexport interface CommonMenuProps {\n /**\n * A slot for the menu's heading.\n */\n heading?: ReactNode;\n /**\n * The menu's contents.\n */\n children?: ReactNode;\n}\n\nexport interface MenuProps extends CommonMenuProps, PropsWithoutRef<WebComponentProps<MenuElement>> {}\n\n/**\n * See {@link @theoplayer/web-ui!Menu | Menu in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const Menu = (props: MenuProps) => {\n const { heading, children, ...otherProps } = props;\n return (\n <RawMenu {...otherProps}>\n <Slotted slot=\"heading\">{heading}</Slotted>\n {children}\n </RawMenu>\n );\n};\n","import { createComponent } from '@lit/react';\nimport { MenuGroup as MenuGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!MenuGroup | MenuGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const MenuGroup = createComponent({\n tagName: 'theoplayer-menu-group',\n displayName: 'MenuGroup',\n elementClass: MenuGroupElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { MenuButton as MenuButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!MenuButton | MenuButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const MenuButton = createComponent({\n tagName: 'theoplayer-menu-button',\n displayName: 'MenuButton',\n elementClass: MenuButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { CloseMenuButton as CloseMenuButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!CloseMenuButton | CloseMenuButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const CloseMenuButton = createComponent({\n tagName: 'theoplayer-close-menu-button',\n displayName: 'CloseMenuButton',\n elementClass: CloseMenuButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { MediaTrackRadioButton as MediaTrackRadioButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioButtonEvents } from './RadioButton';\n\n/**\n * See {@link @theoplayer/web-ui!MediaTrackRadioButton | MediaTrackRadioButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const MediaTrackRadioButton = createComponent({\n tagName: 'theoplayer-media-track-radio-button',\n displayName: 'MediaTrackRadioButton',\n elementClass: MediaTrackRadioButtonElement,\n react: React,\n events: RadioButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TrackRadioGroup as TrackRadioGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioGroupEvents } from './RadioGroup';\n\n/**\n * See {@link @theoplayer/web-ui!TrackRadioGroup | TrackRadioGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TrackRadioGroup = createComponent({\n tagName: 'theoplayer-track-radio-group',\n displayName: 'TrackRadioGroup',\n elementClass: TrackRadioGroupElement,\n react: React,\n events: RadioGroupEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TextTrackRadioButton as TextTrackRadioButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioButtonEvents } from './RadioButton';\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackRadioButton | TextTrackRadioButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackRadioButton = createComponent({\n tagName: 'theoplayer-text-track-radio-button',\n displayName: 'TextTrackRadioButton',\n elementClass: TextTrackRadioButtonElement,\n react: React,\n events: RadioButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TextTrackOffRadioButton as TextTrackOffRadioButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioButtonEvents } from './RadioButton';\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackOffRadioButton | TextTrackOffRadioButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackOffRadioButton = createComponent({\n tagName: 'theoplayer-text-track-off-radio-button',\n displayName: 'TextTrackOffRadioButton',\n elementClass: TextTrackOffRadioButtonElement,\n react: React,\n events: RadioButtonEvents\n});\n","import { createComponent, type WebComponentProps } from '@lit/react';\nimport { LanguageMenu as LanguageMenuElement } from '@theoplayer/web-ui';\nimport type { PropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport { Slotted } from '../slotted';\nimport type { CommonMenuProps } from './Menu';\n\nconst RawLanguageMenu = createComponent({\n tagName: 'theoplayer-language-menu',\n displayName: 'LanguageMenu',\n elementClass: LanguageMenuElement,\n react: React\n});\n\nexport interface LanguageMenuProps extends CommonMenuProps, PropsWithoutRef<WebComponentProps<LanguageMenuElement>> {}\n\n/**\n * See {@link @theoplayer/web-ui!LanguageMenu | LanguageMenu in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const LanguageMenu = (props: LanguageMenuProps) => {\n const { heading, children, ...otherProps } = props;\n return (\n <RawLanguageMenu {...otherProps}>\n <Slotted slot=\"heading\">{heading}</Slotted>\n {children}\n </RawLanguageMenu>\n );\n};\n","import { createComponent } from '@lit/react';\nimport { LanguageMenuButton as LanguageMenuButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!LanguageMenuButton | LanguageMenuButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const LanguageMenuButton = createComponent({\n tagName: 'theoplayer-language-menu-button',\n displayName: 'LanguageMenuButton',\n elementClass: LanguageMenuButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { PlaybackRateRadioGroup as PlaybackRateRadioGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioGroupEvents } from './RadioGroup';\n\n/**\n * See {@link @theoplayer/web-ui!PlaybackRateRadioGroup | PlaybackRateRadioGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PlaybackRateRadioGroup = createComponent({\n tagName: 'theoplayer-playback-rate-radio-group',\n displayName: 'PlaybackRateRadioGroup',\n elementClass: PlaybackRateRadioGroupElement,\n react: React,\n events: RadioGroupEvents\n});\n","import { createComponent } from '@lit/react';\nimport { PlaybackRateMenuButton as PlaybackRateMenuButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!PlaybackRateMenuButton | PlaybackRateMenuButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PlaybackRateMenuButton = createComponent({\n tagName: 'theoplayer-playback-rate-menu-button',\n displayName: 'PlaybackRateMenuButton',\n elementClass: PlaybackRateMenuButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent, type WebComponentProps } from '@lit/react';\nimport { PlaybackRateMenu as PlaybackRateMenuElement } from '@theoplayer/web-ui';\nimport type { PropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport { Slotted } from '../slotted';\nimport type { CommonMenuProps } from './Menu';\n\nconst RawPlaybackRateMenu = createComponent({\n tagName: 'theoplayer-playback-rate-menu',\n displayName: 'PlaybackRateMenu',\n elementClass: PlaybackRateMenuElement,\n react: React\n});\n\nexport interface PlaybackRateMenuProps extends CommonMenuProps, PropsWithoutRef<WebComponentProps<PlaybackRateMenuElement>> {}\n\n/**\n * See {@link @theoplayer/web-ui!PlaybackRateMenu | PlaybackRateMenu in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PlaybackRateMenu = (props: PlaybackRateMenuProps) => {\n const { heading, children, ...otherProps } = props;\n return (\n <RawPlaybackRateMenu {...otherProps}>\n <Slotted slot=\"heading\">{heading}</Slotted>\n {children}\n </RawPlaybackRateMenu>\n );\n};\n","import { createComponent } from '@lit/react';\nimport { PlaybackRateDisplay as PlaybackRateDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!PlaybackRateDisplay | PlaybackRateDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PlaybackRateDisplay = createComponent({\n tagName: 'theoplayer-playback-rate-display',\n displayName: 'PlaybackRateDisplay',\n elementClass: PlaybackRateDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { ActiveQualityDisplay as ActiveQualityDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!ActiveQualityDisplay | ActiveQualityDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const ActiveQualityDisplay = createComponent({\n tagName: 'theoplayer-active-quality-display',\n displayName: 'ActiveQualityDisplay',\n elementClass: ActiveQualityDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { QualityRadioButton as QualityRadioButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioButtonEvents } from './RadioButton';\n\n/**\n * See {@link @theoplayer/web-ui!QualityRadioButton | QualityRadioButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const QualityRadioButton = createComponent({\n tagName: 'theoplayer-quality-radio-button',\n displayName: 'QualityRadioButton',\n elementClass: QualityRadioButtonElement,\n react: React,\n events: RadioButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { QualityRadioGroup as QualityRadioGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioGroupEvents } from './RadioGroup';\n\n/**\n * See {@link @theoplayer/web-ui!QualityRadioGroup | QualityRadioGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const QualityRadioGroup = createComponent({\n tagName: 'theoplayer-quality-radio-group',\n displayName: 'QualityRadioGroup',\n elementClass: QualityRadioGroupElement,\n react: React,\n events: RadioGroupEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TextTrackStyleRadioGroup as TextTrackStyleRadioGroupElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RadioGroupEvents } from './RadioGroup';\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackStyleRadioGroup | TextTrackStyleRadioGroup in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackStyleRadioGroup = createComponent({\n tagName: 'theoplayer-text-track-style-radio-group',\n displayName: 'TextTrackStyleRadioGroup',\n elementClass: TextTrackStyleRadioGroupElement,\n react: React,\n events: RadioGroupEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TextTrackStyleResetButton as TextTrackStyleResetButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackStyleResetButton | TextTrackStyleResetButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackStyleResetButton = createComponent({\n tagName: 'theoplayer-text-track-style-reset-button',\n displayName: 'TextTrackStyleResetButton',\n elementClass: TextTrackStyleResetButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { TextTrackStyleDisplay as TextTrackStyleDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackStyleDisplay | TextTrackStyleDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackStyleDisplay = createComponent({\n tagName: 'theoplayer-text-track-style-display',\n displayName: 'TextTrackStyleDisplay',\n elementClass: TextTrackStyleDisplayElement,\n react: React\n});\n","import { createComponent, type WebComponentProps } from '@lit/react';\nimport { TextTrackStyleMenu as TextTrackStyleMenuElement } from '@theoplayer/web-ui';\nimport type { PropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport { Slotted } from '../slotted';\nimport type { CommonMenuProps } from './Menu';\n\nconst RawTextTrackStyleMenu = createComponent({\n tagName: 'theoplayer-text-track-style-menu',\n displayName: 'TextTrackStyleMenu',\n elementClass: TextTrackStyleMenuElement,\n react: React\n});\n\nexport interface TextTrackStyleMenuProps extends CommonMenuProps, PropsWithoutRef<WebComponentProps<TextTrackStyleMenuElement>> {}\n\n/**\n * See {@link @theoplayer/web-ui!TextTrackStyleMenu | TextTrackStyleMenu in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TextTrackStyleMenu = (props: TextTrackStyleMenuProps) => {\n const { heading, children, ...otherProps } = props;\n return (\n <RawTextTrackStyleMenu {...otherProps}>\n <Slotted slot=\"heading\">{heading}</Slotted>\n {children}\n </RawTextTrackStyleMenu>\n );\n};\n","import { createComponent, type WebComponentProps } from '@lit/react';\nimport { SettingsMenu as SettingsMenuElement } from '@theoplayer/web-ui';\nimport type { PropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport { Slotted } from '../slotted';\nimport type { CommonMenuProps } from './Menu';\n\nconst RawSettingsMenu = createComponent({\n tagName: 'theoplayer-settings-menu',\n displayName: 'SettingsMenu',\n elementClass: SettingsMenuElement,\n react: React\n});\n\nexport interface SettingsMenuProps extends CommonMenuProps, PropsWithoutRef<WebComponentProps<SettingsMenuElement>> {}\n\n/**\n * See {@link @theoplayer/web-ui!SettingsMenu | SettingsMenu in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const SettingsMenu = (props: SettingsMenuProps) => {\n const { heading, children, ...otherProps } = props;\n return (\n <RawSettingsMenu {...otherProps}>\n <Slotted slot=\"heading\">{heading}</Slotted>\n {children}\n </RawSettingsMenu>\n );\n};\n","import { createComponent } from '@lit/react';\nimport { SettingsMenuButton as SettingsMenuButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!SettingsMenuButton | SettingsMenuButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const SettingsMenuButton = createComponent({\n tagName: 'theoplayer-settings-menu-button',\n displayName: 'SettingsMenuButton',\n elementClass: SettingsMenuButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { FullscreenButton as FullscreenButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!FullscreenButton | FullscreenButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const FullscreenButton = createComponent({\n tagName: 'theoplayer-fullscreen-button',\n displayName: 'FullscreenButton',\n elementClass: FullscreenButtonElement,\n react: React,\n events: ButtonEvents\n});\n","export const RangeEvents = {\n onChange: 'change',\n onInput: 'input'\n} as const;\n","import { createComponent } from '@lit/react';\nimport { TimeRange as TimeRangeElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RangeEvents } from './Range';\n\n/**\n * See {@link @theoplayer/web-ui!TimeRange | TimeRange in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const TimeRange = createComponent({\n tagName: 'theoplayer-time-range',\n displayName: 'TimeRange',\n elementClass: TimeRangeElement,\n react: React,\n events: RangeEvents\n});\n","import { createComponent } from '@lit/react';\nimport { VolumeRange as VolumeRangeElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { RangeEvents } from './Range';\n\n/**\n * See {@link @theoplayer/web-ui!VolumeRange | VolumeRange in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const VolumeRange = createComponent({\n tagName: 'theoplayer-volume-range',\n displayName: 'VolumeRange',\n elementClass: VolumeRangeElement,\n react: React,\n events: RangeEvents\n});\n","import { createComponent } from '@lit/react';\nimport { ErrorDisplay as ErrorDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!ErrorDisplay | ErrorDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const ErrorDisplay = createComponent({\n tagName: 'theoplayer-error-display',\n displayName: 'ErrorDisplay',\n elementClass: ErrorDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { CastButton as CastButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!CastButton | CastButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const CastButton = createComponent({\n tagName: 'theoplayer-cast-button',\n displayName: 'CastButton',\n elementClass: CastButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { ChromecastButton as ChromecastButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!ChromecastButton | ChromecastButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const ChromecastButton = createComponent({\n tagName: 'theoplayer-chromecast-button',\n displayName: 'ChromecastButton',\n elementClass: ChromecastButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { ChromecastDisplay as ChromecastDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!ChromecastDisplay | ChromecastDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const ChromecastDisplay = createComponent({\n tagName: 'theoplayer-chromecast-display',\n displayName: 'ChromecastDisplay',\n elementClass: ChromecastDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { AirPlayButton as AirPlayButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!AirPlayButton | AirPlayButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const AirPlayButton = createComponent({\n tagName: 'theoplayer-airplay-button',\n displayName: 'AirPlayButton',\n elementClass: AirPlayButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { LoadingIndicator as LoadingIndicatorElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!LoadingIndicator | LoadingIndicator in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const LoadingIndicator = createComponent({\n tagName: 'theoplayer-loading-indicator',\n displayName: 'LoadingIndicator',\n elementClass: LoadingIndicatorElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { GestureReceiver as GestureReceiverElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!GestureReceiver | GestureReceiver in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const GestureReceiver = createComponent({\n tagName: 'theoplayer-gesture-receiver',\n displayName: 'GestureReceiver',\n elementClass: GestureReceiverElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { PreviewTimeDisplay as PreviewTimeDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!PreviewTimeDisplay | PreviewTimeDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PreviewTimeDisplay = createComponent({\n tagName: 'theoplayer-preview-time-display',\n displayName: 'PreviewTimeDisplay',\n elementClass: PreviewTimeDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { PreviewThumbnail as PreviewThumbnailElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!PreviewThumbnail | PreviewThumbnail in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const PreviewThumbnail = createComponent({\n tagName: 'theoplayer-preview-thumbnail',\n displayName: 'PreviewThumbnail',\n elementClass: PreviewThumbnailElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { LiveButton as LiveButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from './Button';\n\n/**\n * See {@link @theoplayer/web-ui!LiveButton | LiveButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const LiveButton = createComponent({\n tagName: 'theoplayer-live-button',\n displayName: 'LiveButton',\n elementClass: LiveButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { SlotContainer as SlotContainerElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!SlotContainer | SlotContainer in @theoplayer/web-ui}.\n *\n * @group Components\n * @internal\n */\nexport const SlotContainer = createComponent({\n tagName: 'theoplayer-slot-container',\n displayName: 'SlotContainer',\n elementClass: SlotContainerElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { AdDisplay as AdDisplayElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!AdDisplay | AdDisplay in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const AdDisplay = createComponent({\n tagName: 'theoplayer-ad-display',\n displayName: 'AdDisplay',\n elementClass: AdDisplayElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { AdCountdown as AdCountdownElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\n\n/**\n * See {@link @theoplayer/web-ui!AdCountdown | AdCountdown in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const AdCountdown = createComponent({\n tagName: 'theoplayer-ad-countdown',\n displayName: 'AdCountdown',\n elementClass: AdCountdownElement,\n react: React\n});\n","import { createComponent } from '@lit/react';\nimport { AdClickThroughButton as AdClickThroughButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from '../Button';\n\n/**\n * See {@link @theoplayer/web-ui!AdClickThroughButton | AdClickThroughButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const AdClickThroughButton = createComponent({\n tagName: 'theoplayer-ad-clickthrough-button',\n displayName: 'AdClickThroughButton',\n elementClass: AdClickThroughButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import { createComponent } from '@lit/react';\nimport { AdSkipButton as AdSkipButtonElement } from '@theoplayer/web-ui';\nimport * as React from 'react';\nimport { ButtonEvents } from '../Button';\n\n/**\n * See {@link @theoplayer/web-ui!AdSkipButton | AdSkipButton in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const AdSkipButton = createComponent({\n tagName: 'theoplayer-ad-skip-button',\n displayName: 'AdSkipButton',\n elementClass: AdSkipButtonElement,\n react: React,\n events: ButtonEvents\n});\n","import * as React from 'react';\nimport { type PropsWithoutRef, type ReactNode, useState } from 'react';\nimport { UIContainer as UIContainerElement } from '@theoplayer/web-ui';\nimport type { ChromelessPlayer } from 'theoplayer/chromeless';\nimport { createComponent, type WebComponentProps } from '@lit/react';\nimport { usePlayer } from './util';\nimport { PlayerContext } from './context';\nimport { type ChromecastButton, type ErrorDisplay, type Menu, type PlayButton, SlotContainer, type TimeRange } from './components';\n\nconst RawUIContainer = createComponent({\n tagName: 'theoplayer-ui',\n displayName: 'UIContainer',\n elementClass: UIContainerElement,\n react: React,\n events: {\n onReady: 'theoplayerready'\n } as const\n});\n\nexport interface UIContainerProps extends PropsWithoutRef<WebComponentProps<UIContainerElement>> {\n /**\n * A slot for controls at the top of the player.\n *\n * Can be used to display the stream's title, or for a cast button ({@link ChromecastButton}).\n */\n topChrome?: ReactNode;\n /**\n * A slot for controls in the middle of the player (between the top and bottom chrome).\n */\n middleChrome?: ReactNode;\n /**\n * A slot for controls at the bottom of the player.\n *\n * Can be used for controls such as a play button ({@link PlayButton}) or a seek bar ({@link TimeRange}).\n */\n bottomChrome?: ReactNode;\n /**\n * A slot for controls centered on the player, on top of other controls.\n */\n centeredChrome?: ReactNode;\n /**\n * A slot for a loading indicator centered on the player, on top of other controls but behind the centered chrome.\n */\n centeredLoading?: ReactNode;\n /**\n * A slot for extra menus (see {@link Menu}).\n */\n menu?: ReactNode;\n /**\n * A slot for an error display, to show when the player encounters a fatal error (see {@link ErrorDisplay}).\n */\n error?: ReactNode;\n /**\n * Use a named slot instead, such as:\n * - {@link topChrome}\n * - {@link middleChrome}\n * - {@link bottomChrome}\n * - {@link centeredChrome}\n * - {@link centeredLoading}\n * - {@link menu}\n * - {@link error}\n */\n children?: never;\n /**\n * Called when the backing player is created.\n *\n * @param player\n */\n onReady?: (player: ChromelessPlayer) => void;\n}\n\n/**\n * The container component for a THEOplayer UI.\n *\n * This component provides a basic layout structure for a general player UI, and handles the creation and management\n * of a {@link theoplayer!ChromelessPlayer | THEOplayer player instance} for this UI.\n *\n * ## Usage\n *\n * 1. Create a `<UIContainer>` component, passing a valid player configuration as its `configuration` property\n * and a valid stream source as its `source` property.\n * Additionally, place your UI components into one of the slots of the `<UIContainer>`, such as\n * ```jsx\n * <UIContainer\n * configuration={{\n * license: 'your_license_goes_here',\n * libraryLocation: '/path/to/node_modules/theoplayer/'\n * }}\n * source={{\n * sources: [{ src: 'https://example.com/my_stream.m3u8', type: 'application/x-mpegurl' }]\n * }}\n * // ...\n * />\n * ```\n * 2. Place your UI components into one of the slots of the `<UIContainer>`, such as {@link UIContainerProps.bottomChrome}\n * or {@link UIContainerProps.centeredChrome}. You can use the provided THEOplayer UI components\n * (such as {@link PlayButton} or {@link TimeRange}), or use any of your own components.\n * ```jsx\n * <UIContainer\n * // ...\n * topChrome={<span class=\"title\">My awesome video</span>}\n * centeredChrome={<PlayButton />}\n * bottomChrome={\n * <>\n * <ControlBar>\n * <TimeRange />\n * </ControlBar>\n * <ControlBar>\n * <PlayButton />\n * <MuteButton />\n * <TimeDisplay />\n * <FullscreenButton />\n * </ControlBar>\n * </>\n * }\n * />\n * ```\n *\n * ## Customization\n *\n * This component does not provide any UI components by default, you need to add all components as children of\n * one of the `<UIContainer>` slots. If you're looking for a simple out-of-the-box player experience instead,\n * see {@link DefaultUI}.\n *\n * See {@link @theoplayer/web-ui!UIContainer | UIContainer in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const UIContainer = (props: UIContainerProps) => {\n const { topChrome, middleChrome, bottomChrome, centeredChrome, centeredLoading, menu, error, onReady, ...otherProps } = props;\n const [ui, setUi] = useState<UIContainerElement | null>(null);\n const player = usePlayer(ui, onReady);\n return (\n <RawUIContainer {...otherProps} ref={setUi}>\n <PlayerContext.Provider value={player}>\n {topChrome && <SlotContainer slot=\"top-chrome\">{topChrome}</SlotContainer>}\n {middleChrome && <SlotContainer slot=\"middle-chrome\">{middleChrome}</SlotContainer>}\n {centeredChrome && <SlotContainer slot=\"centered-chrome\">{centeredChrome}</SlotContainer>}\n {centeredLoading && <SlotContainer slot=\"centered-loading\">{centeredLoading}</SlotContainer>}\n {bottomChrome}\n {menu && <SlotContainer slot=\"menu\">{menu}</SlotContainer>}\n {error && <SlotContainer slot=\"error\">{error}</SlotContainer>}\n </PlayerContext.Provider>\n </RawUIContainer>\n );\n};\n","import * as React from 'react';\nimport { type PropsWithoutRef, type ReactNode, useState } from 'react';\nimport { DefaultUI as DefaultUIElement } from '@theoplayer/web-ui';\nimport type { ChromelessPlayer } from 'theoplayer/chromeless';\nimport { createComponent, type WebComponentProps } from '@lit/react';\nimport { usePlayer } from './util';\nimport { PlayerContext } from './context';\nimport { type Menu, SlotContainer } from './components';\n\nconst RawDefaultUI = createComponent({\n tagName: 'theoplayer-default-ui',\n displayName: 'DefaultUI',\n elementClass: DefaultUIElement,\n react: React,\n events: {\n onReady: 'theoplayerready'\n } as const\n});\n\nexport interface DefaultUIProps extends PropsWithoutRef<Omit<WebComponentProps<DefaultUIElement>, 'title'>> {\n /**\n * A slot for the stream's title in the top control bar.\n */\n title?: ReactNode;\n /**\n * A slot for extra UI controls in the top control bar.\n */\n topControlBar?: ReactNode;\n /**\n * A slot for extra UI controls in the bottom control bar.\n */\n bottomControlBar?: ReactNode;\n /**\n * A slot for extra menus (see {@link Menu}).\n */\n menu?: ReactNode;\n /**\n * Use a named slot instead, such as:\n * - {@link title}\n * - {@link topControlBar}\n * - {@link bottomControlBar}\n * - {@link menu}\n */\n children?: never;\n /**\n * Called when the backing player is created.\n *\n * @param player\n */\n onReady?: (player: ChromelessPlayer) => void;\n}\n\n/**\n * A default UI for THEOplayer.\n *\n * This default UI provides a great player experience out-of-the-box, that works well on all types of devices\n * and for all types of streams. It provides all the common playback controls for playing, seeking,\n * changing languages and qualities. It also supports advertisements and casting.\n *\n * ## Usage\n *\n * 1. Create a `<DefaultUI>` component, passing a valid player configuration as its `configuration` property\n * and a valid stream source as its `source` property.\n * ```jsx\n * <DefaultUI\n * configuration={{\n * license: 'your_license_goes_here',\n * libraryLocation: '/path/to/node_modules/theoplayer/'\n * }}\n * source={{\n * sources: [{ src: 'https://example.com/my_stream.m3u8', type: 'application/x-mpegurl' }]\n * }}\n * />\n * ```\n * 2. Optionally, customize the player using CSS custom properties and/or extra controls.\n *\n * ## Customization\n *\n * The styling can be controlled using CSS custom properties (see {@link UIContainer}).\n * Additional controls can be added to the {@link DefaultUIProps.topControlBar}\n * and {@link DefaultUIProps.bottomControlBar} slots.\n * For more extensive customizations, we recommend defining your own custom UI using a {@link UIContainer}.\n *\n * See {@link @theoplayer/web-ui!DefaultUI | DefaultUI in @theoplayer/web-ui}.\n *\n * @group Components\n */\nexport const DefaultUI = (props: DefaultUIProps) => {\n const { title, topControlBar, bottomControlBar, menu, onReady, ...otherProps } = props;\n const [ui, setUi] = useState<DefaultUIElement | null>(null);\n const player = usePlayer(ui, onReady);\n return (\n <RawDefaultUI {...otherProps} ref={setUi}>\n <PlayerContext.Provider value={player}>\n {title && <SlotContainer slot=\"title\">{title}</SlotContainer>}\n {topControlBar && <SlotContainer slot=\"top-control-bar\">{topControlBar}</SlotContainer>}\n {bottomControlBar && <SlotContainer slot=\"bottom-control-bar\">{bottomControlBar}</SlotContainer>}\n {menu && <SlotContainer slot=\"menu\">{menu}</SlotContainer>}\n </PlayerContext.Provider>\n </RawDefaultUI>\n );\n};\n","import * as React from 'react';\nimport { type PropsWithoutRef, type ReactNode, useState } from 'react';\nimport { THEOliveDefaultUI as THEOliveDefaultUIElement } from '@theoplayer/web-ui';\nimport type { ChromelessPlayer } from 'theoplayer/chromeless';\nimport { createComponent, type WebComponentProps } from '@lit/react';\nimport { usePlayer } from './util';\nimport { PlayerContext } from './context';\nimport { SlotContainer } from './components';\n\nconst RawTHEOliveDefaultUI = createComponent({\n tagName: 'theolive-default-ui',\n displayName: 'THEOliveDefaultUI',\n elementClass: THEOliveDefaultUIElement,\n react: React,\n events: {\n onReady: 'theoplayerready'\n } as const\n});\n\nexport interface THEOliveDefaultUIProps extends PropsWithoutRef<WebComponentProps<THEOliveDefaultUIElement>> {\n /**\n * A slot for the loading announcement, shown before the publication is loaded.\n */\n loadingAnnouncement?: ReactNode;\n /**\n * A slot for the offline announcement, shown when all publications are offline.\n */\n offlineAnnouncement?: ReactNode;\n /**\n * Use a named slot instead, such as:\n * - {@link loadingAnnouncement}\n * - {@link offlineAnnouncement}\n */\n children?: never;\n /**\n * Called when the backing player is created.\n *\n * @param player\n */\n onReady?: (player: ChromelessPlayer) => void;\n}\n\n/**\n * A default UI for THEOlive.\n *\n * @group Components\n */\nexport const THEOliveDefaultUI = (props: THEOliveDefaultUIProps) => {\n const { loadingAnnouncement, offlineAnnouncement, onReady, ...otherProps } = props;\n const [ui, setUi] = useState<THEOliveDefaultUIElement | null>(null);\n const player = usePlayer(ui, onReady);\n return (\n <RawTHEOliveDefaultUI {...otherProps} ref={setUi}>\n <PlayerContext.Provider value={player}>\n {loadingAnnouncement && <SlotContainer slot=\"loading-announcement\">{loadingAnnouncement}</SlotContainer>}\n {offlineAnnouncement && <SlotContainer slot=\"offline-announcement\">{offlineAnnouncement}</SlotContainer>}\n </PlayerContext.Provider>\n </RawTHEOliveDefaultUI>\n );\n};\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\nimport type { PlayerEventMap } from 'theoplayer';\n\nconst TIME_CHANGE_EVENTS = ['timeupdate', 'seeking', 'seeked', 'emptied'] satisfies ReadonlyArray<keyof PlayerEventMap>;\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.currentTime | the player's current time}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useCurrentTime(): number {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener(TIME_CHANGE_EVENTS, callback);\n return () => player?.removeEventListener(TIME_CHANGE_EVENTS, callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.currentTime : 0),\n () => 0\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\nimport type { PlayerEventMap } from 'theoplayer';\n\nconst DURATION_CHANGE_EVENTS = ['durationchange', 'emptied'] satisfies ReadonlyArray<keyof PlayerEventMap>;\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.duration | the player's duration}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useDuration(): number {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener(DURATION_CHANGE_EVENTS, callback);\n return () => player?.removeEventListener(DURATION_CHANGE_EVENTS, callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.duration : NaN),\n () => NaN\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.muted | the player's muted state}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useMuted(): boolean {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener('volumechange', callback);\n return () => player?.removeEventListener('volumechange', callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.muted : false),\n () => false\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\nimport type { PlayerEventMap } from 'theoplayer';\n\nconst PAUSED_CHANGE_EVENTS = ['play', 'pause'] satisfies ReadonlyArray<keyof PlayerEventMap>;\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.paused | the player's paused state}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function usePaused(): boolean {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener(PAUSED_CHANGE_EVENTS, callback);\n return () => player?.removeEventListener(PAUSED_CHANGE_EVENTS, callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.paused : true),\n () => true\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\nimport type { PlayerEventMap } from 'theoplayer';\n\nconst SEEKING_CHANGE_EVENTS = ['seeking', 'seeked', 'emptied'] satisfies ReadonlyArray<keyof PlayerEventMap>;\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.seeking | the player's seeking state}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useSeeking(): boolean {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener(SEEKING_CHANGE_EVENTS, callback);\n return () => player?.removeEventListener(SEEKING_CHANGE_EVENTS, callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.seeking : false),\n () => false\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\nimport type { SourceDescription } from 'theoplayer';\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.source | the player's source}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useSource(): SourceDescription | undefined {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener('sourcechange', callback);\n return () => player?.removeEventListener('sourcechange', callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => player?.source,\n () => undefined\n );\n}\n","import { useCallback, useContext, useSyncExternalStore } from 'react';\nimport { PlayerContext } from '../context';\n\n/**\n * Returns {@link theoplayer!ChromelessPlayer.volume | the player's volume}, automatically updating whenever it changes.\n *\n * This hook must only be used in a component mounted inside a {@link DefaultUI} or {@link UIContainer},\n * or alternatively any other component that provides a {@link PlayerContext}.\n *\n * @group Hooks\n */\nexport function useVolume(): number {\n const player = useContext(PlayerContext);\n const subscribe = useCallback(\n (callback: () => void) => {\n player?.addEventListener('volumechange', callback);\n return () => player?.removeEventListener('volumechange', callback);\n },\n [player]\n );\n return useSyncExternalStore(\n subscribe,\n () => (player ? player.volume : 1),\n () => 1\n );\n}\n","import { version as packageVersion } from '../package.json';\n\n/**\n * The version of Open Video UI for React.\n */\nexport const version: string = packageVersion;\n"],"names":["PlayerContext","createContext","undefined","usePlayer","ui","onReady","subscribeReady","useCallback","callback","addEventListener","removeEventListener","player","useSyncExternalStore","useEffect","ControlBar","createComponent","tagName","displayName","elementClass","ControlBarElement","react","React","ButtonEvents","onClick","Button","ButtonElement","events","LinkButton","LinkButtonElement","PlayButton","PlayButtonElement","MuteButton","MuteButtonElement","SeekButton","SeekButtonElement","TimeDisplay","TimeDisplayElement","DurationDisplay","DurationDisplayElement","RadioGroupEvents","onChange","RadioGroup","RadioGroupElement","RadioButtonEvents","onInput","RadioButton","RadioButtonElement","Slotted","param","slot","children","div","style","display","RawMenu","MenuElement","Menu","props","heading","otherProps","createElement","MenuGroup","MenuGroupElement","MenuButton","MenuButtonElement","CloseMenuButton","CloseMenuButtonElement","MediaTrackRadioButton","MediaTrackRadioButtonElement","TrackRadioGroup","TrackRadioGroupElement","TextTrackRadioButton","TextTrackRadioButtonElement","TextTrackOffRadioButton","TextTrackOffRadioButtonElement","RawLanguageMenu","LanguageMenuElement","LanguageMenu","LanguageMenuButton","LanguageMenuButtonElement","PlaybackRateRadioGroup","PlaybackRateRadioGroupElement","PlaybackRateMenuButton","PlaybackRateMenuButtonElement","RawPlaybackRateMenu","PlaybackRateMenuElement","PlaybackRateMenu","PlaybackRateDisplay","PlaybackRateDisplayElement","ActiveQualityDisplay","ActiveQualityDisplayElement","QualityRadioButton","QualityRadioButtonElement","QualityRadioGroup","QualityRadioGroupElement","TextTrackStyleRadioGroup","TextTrackStyleRadioGroupElement","TextTrackStyleResetButton","TextTrackStyleResetButtonElement","TextTrackStyleDisplay","TextTrackStyleDisplayElement","RawTextTrackStyleMenu","TextTrackStyleMenuElement","TextTrackStyleMenu","RawSettingsMenu","SettingsMenuElement","SettingsMenu","SettingsMenuButton","SettingsMenuButtonElement","FullscreenButton","FullscreenButtonElement","RangeEvents","TimeRange","TimeRangeElement","VolumeRange","VolumeRangeElement","ErrorDisplay","ErrorDisplayElement","CastButton","CastButtonElement","ChromecastButton","ChromecastButtonElement","ChromecastDisplay","ChromecastDisplayElement","AirPlayButton","AirPlayButtonElement","LoadingIndicator","LoadingIndicatorElement","GestureReceiver","GestureReceiverElement","PreviewTimeDisplay","PreviewTimeDisplayElement","PreviewThumbnail","PreviewThumbnailElement","LiveButton","LiveButtonElement","SlotContainer","SlotContainerElement","AdDisplay","AdDisplayElement","AdCountdown","AdCountdownElement","AdClickThroughButton","AdClickThroughButtonElement","AdSkipButton","AdSkipButtonElement","RawUIContainer","UIContainerElement","UIContainer","topChrome","middleChrome","bottomChrome","centeredChrome","centeredLoading","menu","error","setUi","useState","ref","Provider","value","RawDefaultUI","DefaultUIElement","DefaultUI","title","topControlBar","bottomControlBar","RawTHEOliveDefaultUI","THEOliveDefaultUIElement","THEOliveDefaultUI","loadingAnnouncement","offlineAnnouncement","TIME_CHANGE_EVENTS","useCurrentTime","useContext","subscribe","currentTime","DURATION_CHANGE_EVENTS","useDuration","duration","NaN","useMuted","muted","PAUSED_CHANGE_EVENTS","usePaused","paused","SEEKING_CHANGE_EVENTS","useSeeking","seeking","useSource","source","useVolume","volume","version"],"mappings":"8zCAyCO,IAAMA,GAAgBC,EAA4CC,KAAAA,GCrClE,SAASC,GACZC,CAAgD,CAChDC,CAA4C,EAG5C,IAAM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AAC,eAAgBD,GAClC,IAAMG,AAAAA,MAAAA,EAAAA,KAAAA,EAAAA,EAAQD,mBAAmB,CAAC,eAAgBF,IAE7D,CAACG,EAAO,EAEZ,OAAOC,EACHmK,EACA,IAAMpK,MAAAA,SAAAA,EAAQmL,MAAM,CACpB,IAAM5L,KAAAA,EAEd,CCfO,SAAS6L,KACZ,IAAMpL,EAASmK,EAAW9K,IACpB+K,EAAYxK,EACd,AAACC,IACGG,AAAAA,MAAAA,GAAAA,EAAQF,gBAAgB,CAAC,eAAgBD,GAClC,IAAMG,AAAAA,MAAAA,EAAAA,KAAAA,EAAAA,EAAQD,mBAAmB,CAAC,eAAgBF,IAE7D,CAACG,EAAO,EAEZ,OAAOC,EACHmK,EACA,IAAOpK,EAASA,EAAOqL,MAAM,CAAG,EAChC,IAAM,EAEd,CCpBaC,IAAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theoplayer/react-ui",
3
- "version": "1.7.1",
3
+ "version": "1.8.0",
4
4
  "description": "React component library for the THEOplayer Web SDK",
5
5
  "main": "dist/THEOplayerReactUI.js",
6
6
  "module": "dist/THEOplayerReactUI.mjs",
@@ -52,12 +52,12 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@lit/react": "^1.0.3",
55
- "@theoplayer/web-ui": "^1.7.1"
55
+ "@theoplayer/web-ui": "^1.8.0"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@types/react": "^16.3.0 || ^17 || ^18",
59
59
  "react": "^16.3.0 || ^17 || ^18",
60
- "theoplayer": "^6"
60
+ "theoplayer": "^7"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@rollup/plugin-json": "^6.1.0",
@@ -72,7 +72,7 @@
72
72
  "rollup": "^3.29.3",
73
73
  "rollup-plugin-dts": "^5.3.1",
74
74
  "rollup-plugin-swc3": "^0.8.2",
75
- "theoplayer": "^6.0.0",
75
+ "theoplayer": "^7.0.0",
76
76
  "tslib": "^2.6.2",
77
77
  "typedoc": "^0.25.8",
78
78
  "typedoc-plugin-external-resolver": "^1.0.3",