UNPKG

@slashedcloud/player

Version:

A media player application utilizing Shaka Player for adaptive video streaming, capable of playing HLS, MPD and plain HTTP video streams.

33 lines (32 loc) 831 B
import { default as Plugin } from '../Base'; import { default as Player } from '../../Player'; export type ChapterPluginOptions = { kind: 'chapters'; lang: string; } & ({ src: string; chapters?: never; } | { chapters: Chapter[]; src?: never; }); export interface Chapter { startTime: number; endTime?: number; title: string; } /** * Represents the feature that handles preview thumbnails in the player. */ export default class ChaptersPlugin extends Plugin { #private; readonly name = "ChaptersPlugin"; options: ChapterPluginOptions[]; fallbackLocale: string; /** * Creates an instance of the ChaptersFeature. * @param player The SlashedCloudPlayer instance. */ constructor(player: Player, options: ChapterPluginOptions[]); setup(): Promise<void>; }