> ## Documentation Index
> Fetch the complete documentation index at: https://docs.interactivelayers.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Shaka Player

> Attach graphics to Shaka's interstitial surfaces.

Use the verified Shaka Player 5.3.5 integration. Place the video and the client and server ad containers inside a common positioned stage. With Shaka UI, reuse its ad containers. Import the stylesheet with your bundler or link the distributed stylesheet from HTML.

```js theme={null}
import { attachShaka } from '@interactivelayers/player-sdk';
import '@interactivelayers/player-sdk/player.css';

await player.attach(video);
const sdk = attachShaka({
  player,
  clientContainer,
  serverContainer,
  // eventsUrl: playback.overlayEventsUrl,
  // sessionId: playback.sessionId,
});
await player.load(playback.manifestUrl);

// For a linear break reported by the host:
// sdk.setLinearAd(true);
// sdk.setLinearAd(false);

// On teardown:
await player.unload();
sdk.destroy();
```

The adapter converts InteractiveLayers overlays from the HLS response or session feed into Shaka interstitials. If Shaka uses native HLS playback and cannot see the media playlist, pass the selected playlist text to `sdk.updateManifest(text)` with a verified `programTime` clock or use a session feed and the mapped media clock.

Alternatively, configure Shaka's HLS interstitial support for a variant using native `com.apple.hls.interstitial` ranges. That route uses `X-OVERLAY-ID` and `X-ASSET-URI`. For an L, use `X-DEPTH=-1` and `X-SQUEEZECURRENT=0.75`. Choose one route per cue. Verify origin handling of the session parameters Shaka can add to artwork requests.

Play the fixture and check visibility, the squeezed video rectangle and restoration after the cue. Test in the actual browser and HLS mode you plan to ship. [Cue contract and fixture](https://docs.interactivelayers.com/player-sdk.md) · [Shaka SDK source](https://github.com/InteractiveLayerscom/IL-VideoPlayers-SDK/blob/main/web/README.md#shaka)

With server-side insertion (MediaTailor), create `shakaContentClock({ player, plan })` after `player.attach(video)` and **before** `player.load()`; created later, the clock lacks the variant playlist and nothing is drawn. Until the SDK build of November 24, 2026, Shaka drew nothing over a MediaTailor stream because it could not find the active variant; use that build or a later one. With the audio in a separate rendition, Shaka does not play the stream MediaTailor builds. [Server-side insertion](https://docs.interactivelayers.com/server-side-insertion.md)

If you link `player.css` from HTML instead of importing it, publish `fonts.css` and the `fonts/` folder with it. See Typeface of the product panels in the [Player SDK](https://docs.interactivelayers.com/player-sdk.md) guide.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.