@slashedcloud/player
Version:
A media player application utilizing Shaka Player for adaptive video streaming, capable of playing HLS, MPD and plain HTTP video streams.
29 lines (28 loc) • 969 B
TypeScript
import { default as Player } from '../../Player';
import { default as Plugin } from '../Base';
import { default as shaka } from 'shaka-player/dist/shaka-player.ui';
export declare const adManagerEventsMap: Map<string, string>;
export interface AdsPluginOption {
adTagUrl?: string;
}
/**
* Represents the AdsFeature class.
*/
export default class AdsPlugin extends Plugin {
#private;
readonly name = "AdsPlugin";
loadIm3: Event | null;
options: AdsPluginOption;
preventDoubleTrigger: string[];
/**
* Creates an instance of AdsFeature.
* @param {Player} player - The player instance.
*/
constructor(player: Player, options: AdsPluginOption);
/**
* Sets up the AdsFeature.
* @throws {Error} - If the Google IMA SDK is not loaded or if the ad manager is not available.
*/
setup(): Promise<void>;
requestClientSideAds(adManager: shaka.extern.IAdManager, adsRequest: google.ima.AdsRequest): void;
}