Stitch server-side ads into Broadcast Live streams
JWP allows you to configure server-side ad insertion (SSAI) for your Broadcast Live content. By integrating SSAI, ads are seamlessly stitched into the live stream, delivering higher impressions and an improved viewer experience.
Additionally, you can use SSAI session data to enhance and control the viewer experience.
Prerequisites
Item | Notes |
---|---|
Stream SCTE-35 markers | SCTE-35 messages within the media stream to signal ad breaks (splice_insert ) and their respective durations (time_signal ) in a binary format
JWP monitors and parses these SCTE-35 messages to determine the precise moments to deliver midroll ads to viewers during the live stream. Preroll ads do not depend upon these messages. JWP supports MediaTailor ad markers. For more information, see MediaTailor’s HLS or DASH documentation. |
Property-level enablement | Toggle turning on the feature for an entitled property
Follow these steps to enable SSAI:
|
Ad config | Configuration defining when to show ads within content and where ads are sourced
At least one ad config must be set up within the property. NOTE: For live streams, the ad config only determines the ad tag URL from which ads are fetched. The default time between ads does not apply. |
Live content | Broadcast Live stream that is hosted on the JW Platform and prepared to stream Learn how to set up a Broadcoast Live stream through the dashboard or Management API. |
Configure SSAI for Broadcast Live
To set up SSAI for Broadcast Live, you must retrieve the SSAI manifest URL and embed it in your player.
Follow these steps to configure server-side ads for Broadcast Live:
- Fetch the SSAI manifest URL.
Each live stream has two manifest URLs, one with SSAI enabled and one without ads. The SSAI-enabled manifest URL should follow the format below.https://cdn.jwplayer.com/v2/sites/{site-id}/media/{stream-id}/ssai.{manifest_extension}?ad_config_id={config-id}
- Embed the SSAI manifest in your player.
Set thefile
value to your SSAI manifest during player setup.SSAI and Broadcast Live are compatible with the JWP player or any standard third-party player.
<div id="live-player"></div> <script> const playerInstance = jwplayer("live-player").setup({ file: "https://cdn.jwplayer.com/v2/sites/{site-id}/media/{stream-id}/ssai.m3u8?ad_config_id={config-id}", autostart: true }); </script>
After embedding the manifest, your Broadcast Live stream will show server-side ads. You can now choose to fetch session data to enhance your advertising.
Retrieve SSAI session data
You can enhance your SSAI-enabled live stream by configuring the player to read SSAI session data. JWP’s session data endpoint returns information on ad breaks, helping you tailor the advertising experience to your viewers.
An SSAI-enabled Broadcast Live stream will play server-side ads even without using session data. Session data only contributes to the advertising experience, playback logic, and UI controls.
Follow these steps to retrieve SSAI session data:
- In your player configuration, add an event listener for
sessiondata
.
At runtime, the player parses the manifest for#EXT-X-SESSION-DATA
and emits asessiondata
event when it detects thejwpc-ssai-session-endpoint
.player.addEventListener('sesiondata', (data) => { if (data.id === 'com.jwpc.ssai-session-endpoint') { logMessage(`session info URL: ${data.uri}`); fetchInfoJson(data.uri); } });
- When
sessiondata
fires during playback, fetch the session data. The endpoint will return a JSON representation of the ad breaks in the session.
With the session data JSON, you can configure the player’s handling logic to address different advertising situations, such as the following:
- Skipping unused filler time
- Preloading ad info before a break
- Managing break countdowns precisely