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.

27 lines (26 loc) 717 B
import { default as Player } from '../../Player'; import { default as Plugin } from '../Base'; export type AdOverlayPluginOption = { src: string; } & ({ kind: 'image'; link: string; height?: number; width?: number; } | { kind: 'iframe'; link?: never; height: number; width: number; }); /** * Feature that enables ad overlay on the player. */ export default class AdOverlayPlugin extends Plugin { readonly name = "AdOverlayPlugin"; isAdPlaying: boolean; options: AdOverlayPluginOption; constructor(player: Player, options: AdOverlayPluginOption); setup(): Promise<void>; setOverlay(options: AdOverlayPluginOption): HTMLAnchorElement | HTMLIFrameElement; }