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 just-in-time, delivering higher impressions and an improved viewer experience.
Additionally, you can use SSAI session data to enhance and control your advertising.
Prerequisites
    | Item | Description | 
|---|---|
| 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 formatJWP 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: 
 | 
| 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. | 
| Player embed | Player library embedded on the web page You can use the JWP player or a third-party player. If you are using JWP, learn how to add a cloud-hosted or self-hosted player. | 
| Site ID | Unique identifier of the property or site that owns a media item Follow this step to obtain a site ID: 
 | 
| Media ID | Eight-character, alphanumeric ID that uniquely identifies the media Follow these steps to obtain a media ID: 
 | 
| Ad config ID | Unique identifier of an ad config Follow these steps to obtain an ad config ID: 
 If you have not already, create an ad config. 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. | 
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 using the site_id,media_id, andad_config_idparameters associated with your live stream.
 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/{media-id}/ssai.{manifest_extension}?ad_config_id={config-id}This request returns a 302redirect with aLocationheader pointing to the active JIT manifest.
- 
Make a GETcall to follow the redirect URL and retrieve the JIT manifest.curl --request GET \ --url https://ssai-jit.jwplayer.com/v2/sites/{site-id}/media/{media-id}/ssai_session/{session-id}/jit.m3u8?ad_break_duration={duration}&ad_break_duration_preroll={duration}&cue_points=0.000%2C30.359%2C43.489&drm_policy_id={policy_id}This URL returns the SSAI-enabled manifest. This manifest includes #EXT-X-SESSION-DATAthat contains the relative URI for retrieving SSAI session data.Example HLS URI#EXT-X-SESSION-DATA:DATA-ID="com.jwpc.ssai-session-endpoint",URI="info.json"
- 
Embed the SSAI manifest in your player. 
 Set thefilevalue to the redirect URL that points to the JIT manifest.<div id="live-player"></div> <script> const playerInstance = jwplayer("live-player").setup({ file: "https://ssai-jit.jwplayer.com/v2/sites/{site-id}/media/{media-id}/ssai_session/{session-id}/jit.m3u8?ad_config_id={config-id}", autostart: true }); </script>
After embedding the manifest, your Broadcast Live stream will show server-side ads.
FAQ
Will an ad be requested again if the user scrubs back?
No. Once an ad is stitched into the stream, it behaves like regular video content. If a user scrubs back, the same ad content will replay as part of the stitched video, but a new ad request will not be sent.
This helps maintain session consistency and avoids duplicate ad requests.

