Interface MKSsaiAdConfig

MKPlayer SsaiAd configuration interface.

interface MKSsaiAdConfig {
    excludePrerollFromVodDuration?: boolean;
    pauseAdEnabled?: boolean;
    pauseAdView?: HTMLDivElement;
}

Properties

excludePrerollFromVodDuration?: boolean

Excludes pre-roll ad duration from VOD Duration.

If enabled with true value then.,

  • getDuration will return the duration of the actual VOD content excluding any preroll ads.
  • getCurrentTime will return the current playback time of the actual VOD content excluding any preroll ads while playing actual VOD content.
  • TimeChanged event's event.time will return the current playback time of the actual VOD content excluding any preroll ads while playing actual VOD content.

Default is false.

pauseAdEnabled?: boolean

Enables SDK rendering of pauseAd overlays.

When false, SDK provides no pauseAd overlay feature.

Note:

  • HLS master manifest must include required #EXT-X-SESSION-DATA tag.
  • PauseAds are shown only for user initiated pauses and are suppressed during CSAI-SSAI ads and Picture-in-Picture modes.
  • Feature is reset or destroyed on source change or playback error.

Default is false. However, when MKPlayerConfig.ui is enabled it is disabled.

pauseAdView?: HTMLDivElement

The container into which SDK renders the pauseAd overlay.

The application owns this element's layout, styling, positioning, dimensions and stacking. It is expected to layer it above video related elements and below playback controls. The SDK never modifies this element or its attributes. Empty container element must be passed with no children in it.

Must be div element attached to the document. If no valid container is available, either at configuration time or during runtime - pauseAd feature will be destroyed.

Example:

<div id="pause-ad-container"></div>