UNPKG

vidstack

Version:

Build awesome media experiences on the web.

44 lines (43 loc) 1.65 kB
import { Component, ComponentInstance, type HTMLCustomElement } from 'maverick.js/element'; import { getUIComponents } from '../../../register-ui'; import { type MediaContext } from '../../core/api/context'; import { type CommunitySkinTranslations } from './context'; declare global { interface MaverickElements { 'media-community-skin': MediaCommunitySkinElement; } } /** * @docs {@link https://www.vidstack.io/docs/player/core-concepts/skins#community-skin} * @example * ```html * <media-player> * <media-outlet /> * <media-community-skin /> * </media-player> * ``` */ export declare class CommunitySkin extends Component<CommunitySkinAPI> { static el: import("maverick.js/element").CustomElementDefinition<CommunitySkinAPI>; static register: typeof getUIComponents; protected _media: MediaContext; constructor(instance: ComponentInstance<CommunitySkinAPI>); /** We need this to compute and save the layout type to prevent unnecessary re-renders. */ protected _getLayoutType(): "audio" | "video" | "audio:live" | "video:live"; protected onAttach(): void; protected _isAudio(): boolean; protected _isVideo(): boolean; protected _isMobile(): boolean; render(): (() => import("maverick.js").JSX.Element) | null; } export interface CommunitySkinAPI { props: CommunitySkinProps; } export interface CommunitySkinProps { /** * Translation map from english to your desired language for words used throughout the skin. */ translations: CommunitySkinTranslations | null; } export interface MediaCommunitySkinElement extends HTMLCustomElement<CommunitySkin> { }