Constructor
new InterstitialConcurrentPresentation(interstitial, videonon-null)
Parameters:
| Name | Type | Description |
|---|---|---|
interstitial |
shaka.extern.AdInterstitial | |
video |
HTMLMediaElement | The primary video. |
- Implements:
- Source:
Members
elements_ :Array<!HTMLElement>
Type:
- Array<!HTMLElement>
eventManager_ :shaka.util.EventManager
Type:
interstitial_ :shaka.extern.AdInterstitial
Type:
onEnd_ :?function()
Type:
- ?function()
onEvent_ :?function(string, Map<string, ?>=)
Type:
- ?function(string, Map<string, ?>=)
timer_ :shaka.util.Timer
Type:
video_ :HTMLMediaElement
Type:
Methods
end_(type, dataopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
type |
string | The event that ends the presentation. | |
data |
Map<string, ?> |
<optional> |
presentAsset(containernon-null, layoutRenderernon-null, onEvent, onClick, onEnd)
Draws the image or the HTML document of the interstitial, and ends the
presentation when its window or its playout limit is over.
Parameters:
| Name | Type | Description |
|---|---|---|
container |
HTMLElement | The element the assets are drawn in. |
layoutRenderer |
shaka.ads.LayoutRenderer | Places the assets. |
onEvent |
function(string, Map<string, ?>=) | Sends an ad event for the interstitial. |
onClick |
function() | Called when an asset is clicked, if the interstitial has a click-through. |
onEnd |
function() | Called once the presentation has ended and its assets have been removed. |
presentMedia(elementnon-null, live, skip)
Keeps the media of the interstitial, which is played and ended by its
owner, at the position of the primary content within the window of the
interstitial, and skips it when the primary content leaves the window.
Parameters:
| Name | Type | Description |
|---|---|---|
element |
HTMLMediaElement | The media element the media of the interstitial is played in. |
live |
boolean | Whether the primary content is live. |
skip |
function() | Ends the media of the interstitial as skipped. |
release()
Removes the assets without sending any event.
- Implements:
- Source:
watchWindow_(onLeave)
Calls the given function when the primary content is seeked out of the
window of the interstitial.
Parameters:
| Name | Type | Description |
|---|---|---|
onLeave |
function() |