UNPKG

video-ad-sdk

Version:

VAST/VPAID SDK that allows video ads to be played on top of any player

22 lines (19 loc) 650 B
import {VideoAdContainer} from './VideoAdContainer' /** * VideoAdContainer factory method. Returns a VideoAdContainer instance that will contain the video ad. * * @ignore * @param placeholder Placeholder element that will contain the video ad. * @param videoElement Optional videoElement that will be used to play the ad. * * @returns Returns a `VideoAdContainer` instance. */ export const createVideoAdContainer = ( placeholder: HTMLElement, videoElement?: HTMLVideoElement ): VideoAdContainer => { if (!placeholder) { throw new TypeError('placeholder is required') } return new VideoAdContainer(placeholder, videoElement) }