Embeddable Player Script
watch.stream.player_function.retrieve
Returns the JavaScript that drives the Indee embeddable player. Include it on your page with a script tag, then use the two helpers it defines to start playback and react to player events.
Headers
No authorization is required. The script contains no account or playback data of its own.
Endpoint
GET v2/watch/stream/player/init
Response Body
This endpoint returns JavaScript, not JSON, served as application/javascript. Include it directly:
<script src="https://api.indee.tv/v2/watch/stream/player/init"></script>
It defines two global functions.
| Function | Description |
|---|---|
initializeIndeePlayer(iframeId, playbackData, playerHtml, videoKey, config) |
Loads the player into your iframe and starts it. iframeId is the id of your iframe element, playbackData is the response from the playback API, playerHtml is the page returned by the embeddable player component, videoKey identifies the title, and config holds any player options. |
listenIndeePlayerState(state, callback) |
Runs your callback when the player reaches a state. Accepted states are ready, play, pause, complete and access-denied; any other value throws. |
Status Codes
| Indee status code | HTTP Response Code | Description |
|---|---|---|
| — | HTTP 200 | The script is returned as JavaScript |