Type: Object
assetKey
string This is used to determine which stream should be played. The live stream request asset key is an identifier which can be found in the DFP UI.contentSourceId
string Unique identifier for the publisher content, from a CMS. Required for on-demand streams.videoId
string Identifier for the video content source. Required for on-demand streams.snapback
boolean Prevent your viewers from seeking past your mid-roll ads. (optional, defaulttrue
)debug
boolean Loads IMA-DAI SDK in debug mode. (optional, defaultfalse
)adTagParameters
Object You can override a limited set of ad tag parameters on your stream request. Supply targeting parameters to your stream provides more information. You can use the dai-ot and dai-ov parameters for stream variant preference. See Override Stream Variant Parameters for more information.apiKey
string The stream request API key. It's configured through the DFP Admin UI. and provided to the publisher to unlock their content. It verifies the applications that are attempting to access the content.streamActivityMonitorId
string The ID to be used to debug the stream with the stream activity monitor.authToken
string The stream request authorization token. Used in place of the API key for stricter content authorization. The publisher can control individual content streams authorizations based on this token.format
string The stream format to request. (optional) Accepts the following string values - hls, dash (Values must be lowercase.). (optional, default'hls'
)locale
string? Sets the publisher provided locale. The locale specifies the language in which to display UI elements and can be any two-letter {@link https://www.loc.gov/standards/iso639-2/php/English_list.php|ISO 639-1} code.showAdBreakCuePoint
boolean? Whether to show the ad breaks cue points in the ui timeline.adBreakCuePointStyle
Object? Style options for the ad breaks cue points - See the options Here.
plugins: {
imadai: {
assetKey: 'sN_IYUG8STe1ZzhIIE_ksA',
contentSourceId: '2477953',
videoId: 'tears-of-steel'
}
}
Controller for ima dai plugin.
context
ImaDAI The ima dai plugin context.
Skip on an ad.
Returns void
Play an ad on demand.
Returns void
On playback ended handler.
Returns Promise<void> complete promise
Whether this ads controller is active
Type: boolean
Returns boolean is active
Whether this ads controller is done
Type: boolean
Returns boolean is done
The controller name
Type: string
Returns string The name
Engine decorator for ima dai plugin.
engine
IEngine The HTML5 engine.plugin
ImaDAI The ima dai plugin.dispatchEventHandler
Function A dispatch event handler
Load media.
startTime
number Optional time to start the video from.
Returns Promise<Object> The loaded data
Dispatch an event from this object.
event
Event The event to be dispatched from this object.
Returns boolean True if the default action was prevented.
Pause playback.
Returns void
Start/resume playback.
Returns void
Resets the engine decorator.
Returns void
Destroys the engine decorator.
Returns void
Get paused state.
Type: boolean
Returns boolean The paused value of the engine.
Get ended state.
Type: boolean
Returns boolean The ended value of the engine.
Set the current time in seconds.
Type: number
to
number The number to set in seconds.
Returns void
Get the current time in seconds.
Type: number
Returns number The current playback time.
Get the duration in seconds.
Type: number
Returns number The playback duration.
The ima DAI plugin possible states.
Type: Object
Extends BasePlugin
The ima-dai plugin.
name
string The plugin name.player
Player The player instance.config
ImaDAIConfigObject The plugin config.
Gets the engine decorator.
engine
IEngine The engine to decorate.dispatchEventHandler
Function A dispatch event handler
Returns IEngineDecorator The ads api.
Gets the ads controller.
Returns IAdsPluginController The ads api.
Gets the stream URL from ima-dai SDK.
Returns Promise<string> A promise of the URL to play.
Gets the plugin state.
Type: string
Returns string The state.
Skips on an ad.
Returns void
Pausing the ad.
Returns void
Resuming the ad.
Returns void
Returns the stream time with ads for a given content time. Returns the given content time for live streams.
contentTime
number the content time without any ads (in seconds).
Returns number The stream time that corresponds with the given content time once ads are inserted.
Returns the content time without ads for a given stream time. Returns the given stream time for live streams.
streamTime
number the stream time with inserted ads (in seconds).
Returns number The content time that corresponds with the given stream time once ads are removed.
Whether the player is in an ad break.
Returns boolean Is ad break.
Resets the plugin.
Returns void
Destroys the plugin.
Returns void
Whether the ima-dai plugin is valid.
The default configuration of the plugin.
Type: Object