Live - DASH
Last updated
Last updated
The process to request a DASH-Live stream with client-side tracking enabled can be broken down into the following steps (the technical details for every step follow below):
The App performs a request to the endpoint for a channel and retrieves the URL to the DASH manifest (mediaURL) and VAST data (vastURL)
The mediaURL can now be used to initialize the player and start playback. (Note: in the example below we use a Shaka-Player in an HTML5 environment)
Parallel to step 2 the app can perform a request to the vastURL to load the current VAST information for the live-channel
While the player is constantly loading sub-manifests and media-chunks for playback the app has initialized the VAST handling and is waiting for the player to reach an ad
As soon as an ad signaled in the VAST-Tag is starting to playback, compared to the timeline information from the player or timeline-region-enter events the app will send requests to all tracking-URLs (beacons) defined in the VAST-response for the start event. The same logic applies to the events: pause, resume, finish, firstQuartile, midpoint, thirdQuartile, complete
GET Request:
Response body:
The full URL schema is:
HTML
JavaScript
To gather the VAST-related data call the vastURL
gathered in step 1.
GET Request:
Response Body:
The first event id=vast:adId
signals an id under which the whole original VAST response, including all tracking event information for the respective clip, can be obtained from the SSAI-API under the provided vastURL contained in the initial session created response. The following events, id=beacon:start etc. trigger the VAST quartile reporting at the respective points in the clips presentation timeline.
At the time an ad is detected in the DASH-Stream fetch the vast information for this ad from the vastURL
: ${vastBaseUrl}/${adId}.xml
.
Javascript - Shaka-Player:
As soon as the VAST information for the upcoming ad is loaded the client needs to track if the player reaches one of the predefined timeline positions and fire the events accordingly
Javascript - Shaka-Player:
See the below example implementation for a full example of the DASH Vast tracking.
The example implementation handles Impression- and progress (beacon) events based on the DASH event timeline as well as the following tracking events based on HTML5 video element events:
mute/unmute
pause
resume
expand/collapse
The first request to obtain a dash-manifest and VAST tracking information will create a DASH-Live session for the requesting client. The URL to the ad-insertion enabled channel is called outputUrl and can be viewed at or via https://admin.serverside.ai/api/v2/channels/:channelId
API endpoint.
You will find below an example of how to playback a DASH-Live stream in a browser.