import type dashjs from "dashjs"; import type { IOmapBinder } from '@ygoto3/omap-core'; import { OmapDashjsBinder } from '@ygoto3/omap-dashjs-binder'; /** * Dash.js binder for OMAP clients. * Use this binder when only a single decoder is available. * ```ts * const player = dashjs.MediaPlayer().create(); * const adDisplayContainer = document.getElementById('ad-display-container') as HTMLDivElement; * const adVideoElement = document.getElementById('ad-video') as HTMLVideoElement; * const adTagUrl = 'https://example.com/vmap.xml'; * const omapClient = new OmapIABClient(adTagUrl); * const omapBinder = new OmapDashjsSDBinder(player, adDisplayContainer); * omapBinder.bind(omapClient); * omapBinder.play() * .then(() => { * player.initialize(videoElement, 'https://example.com/manifest.mpd', true); * }) * .catch(() => { * console.error('adBinder failed to get ready'); * }); * ``` */ export default class OmapDashjsSDBinder extends OmapDashjsBinder implements IOmapBinder { constructor(player: dashjs.MediaPlayerClass, adDisplayContainer: HTMLElement, adVideoElement?: HTMLVideoElement); protected lastPlayheadTime: number; protected onContentPauseRequested(): void; protected onContentResumeRequested(): void; private _manifest; }