import { PlayerContext } from "./context.js"; import { PlayerElementConstructor } from "../store/types.js"; import { PlayerController } from "./controller.js"; import { AnyPlayerFeature, AudioFeatures, AudioPlayerStore, PlayerStore, VideoFeatures, VideoPlayerStore } from "@videojs/core/dom"; //#region src/player/create-player.d.ts interface CreatePlayerConfig { features: Features; } interface CreatePlayerResult { /** Configured player element class that owns the store and attachment lifecycle. */ PlayerElement: PlayerElementConstructor; /** Player controller bound to this player's context. */ PlayerController: PlayerController.ConfiguredConstructor; /** Context that carries the player store to descendant elements. */ playerContext: PlayerContext; } /** * Creates a typed HTML player class and bound controller. * * @example * ```ts * import { createPlayer, UIElement, selectPlayback } from '@videojs/html'; * import { videoFeatures } from '@videojs/html/video'; * * const { PlayerElement: VideoPlayerElement, PlayerController } = createPlayer({ * features: videoFeatures, * }); * * customElements.define('video-player', VideoPlayerElement); * * // Control element with selector * class PlayButton extends UIElement { * #playback = new PlayerController(this, selectPlayback); * } * ```; * * @param config - Player configuration with features. * @label Video */ declare function createPlayer(config: CreatePlayerConfig): CreatePlayerResult; /** * Creates a typed HTML audio player class and bound controller. * * @param config - Player configuration with features. * @label Audio */ declare function createPlayer(config: CreatePlayerConfig): CreatePlayerResult; /** * Creates a typed HTML player class with custom features. * * @param config - Player configuration with features. * @label Generic */ declare function createPlayer(config: CreatePlayerConfig): CreatePlayerResult>; //#endregion export { CreatePlayerConfig, CreatePlayerResult, createPlayer }; //# sourceMappingURL=create-player.d.ts.map