File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,41 @@ adManager.addCustomInterstitial({
113
113
});
114
114
```
115
115
116
+ You can also use this with SCTE-35:
117
+
118
+ ``` js
119
+ const adManager = player .getAdManager ();
120
+ const video = document .getElementById (' video' );
121
+ const ui = video[' ui' ];
122
+ // If you're using a non-UI build, this is the div you'll need to create
123
+ // for your layout. The ad manager will clear this div, when it unloads, so
124
+ // don't pass in a div that contains non-ad elements.
125
+ const container = video .ui .getControls ().getClientSideAdContainer ();
126
+ adManager .initInterstitial (container, player, video);
127
+ player .addEventListener (' timelineregionadded' , (e ) => {
128
+ const event = e .detail ;
129
+ if (event .schemeIdUri != ' urn:scte:scte35:2014:xml+bin' ) {
130
+ return ;
131
+ }
132
+ adManager .addCustomInterstitial ({
133
+ id: event .id ,
134
+ startTime: event .startTime ,
135
+ endTime: event .endTime ,
136
+ uri: ' YOUR_URL' ,
137
+ isSkippable: false ,
138
+ skipOffset: null ,
139
+ skipFor: null ,
140
+ canJump: true ,
141
+ resumeOffset: player .isLive () ? null : 0 ,
142
+ playoutLimit: null ,
143
+ once: false ,
144
+ pre: false ,
145
+ post: false ,
146
+ timelineRange: player .isLive (), // If true, the ad will appear as a range on the timeline.
147
+ });
148
+ });
149
+ ```
150
+
116
151
117
152
##### VAST/VMAP (playback without tracking)
118
153
You can’t perform that action at this time.
0 commit comments