Constructor
new InterstitialStaticPresentation(interstitial, containernon-null, videonon-null, onEvent, onClick, onEnd)
Parameters:
| Name | Type | Description |
|---|---|---|
interstitial |
shaka.extern.AdInterstitial | |
container |
HTMLElement | The element the assets are drawn in. |
video |
HTMLMediaElement | The primary video. |
onEvent |
function | 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. |
- Implements:
- Source:
Members
container_ :HTMLElement
Type:
- HTMLElement
elements_ :Array<!HTMLElement>
Type:
- Array<!HTMLElement>
eventManager_ :shaka.util.EventManager
Type:
interstitial_ :shaka.extern.AdInterstitial
Type:
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> |
release()
Removes the assets without sending any event.
- Implements:
- Source:
start()
Draws the assets and starts watching for the end of the presentation.