api:iptv:app:channel_play
Table of Contents
API : IPTV : App : Channel play
Introduction
This request is used by the iOS/Android apps and web clients to get the streaming url for live streaming a channel.
This is also used by the system to track that the device is now showing the channel, so it's important to call Channel stop when playback ends.
Request
| URL | https://api.telecomx.dk/iptv/app/channel/CHANNEL_ID/play | ||
|---|---|---|---|
| Method | GET | ||
| Params | CHANNEL_ID | Id of the channel to start live streaming. | |
| Query | token | String | Session token. |
| lat | Number | GPS Latitude position in decimal format. | |
| long | Number | GPS Longitude position in decimal format. | |
| mode | String | [optional] Specifies type of streams to return: DASH, HLS or ALL for both. |
|
Query examples
https://api.telecomx.dk/iptv/app/channel/12345678901234567890ABCD/play?token=123456780123456780ABCD&lat=55.345435&long=23.347656 https://api.telecomx.dk/iptv/app/channel/12345678901234567890ABCD/play?mode=ALL&token=123456780123456780ABCD&lat=55.345435&long=23.347656
Response
| JSON object | ||
|---|---|---|
| airplay | Boolean | True if device may airplay the video. |
| pause | Boolean | True if the UI may permit pause and resume (timeshift on live). |
| forward | Boolean | True if the UI may permit scrubbing forward in time. |
| backwards | Boolean | True if the UI may permit scrubbing backwards in time. |
| position | Number | During archived or recorded playback, if playback has been stopped this is the position in seconds it was stopped. This used to present the use with the choice of playback from the beginning or resuming from where the user left off. Null if no position exists. |
| sdhSubtitleTrack | String | Name of subtitle track for hearing-impaired. |
| streams | Array | List of URL's the stream is available from in the format specified in mode. Only used when mode is not set. Always use the first, only move on to the next if streaming does not begin. |
| hls | String | HLS stream to playback. Only used if mode is ALL or HLS. |
| dash | String | DASH stream to playback. Only used if mode is ALL or DASH. |
| drm | Object | DRM settings, if channel uses DRM. |
| drm.assetId | String | DRM asset id. |
| drm.fairplayLicenseUrl | String | URL to fetch FairPlay licenses from. |
| drm.fairplayCertificateUrl | String | URL to fetch the FairPlay certificate from. |
| drm.widevineLicenseUrl | String | URL to fetch WideVine licenses from. |
| drm.playreadyLicenseUrl | String | URL to fetch PlayReady licenses from. |
Example - mode not set
{ airplay: true, pause: true, forward: false, backwards: false, position: null, sdhSubtitleTrack: "t1", "drm": { "assetId": "C72E747F-2224-E24B-2899-854665662AB7", "fairplayLicenseUrl": "https://fps.drmprovider.com/api/licenses/ASSETID?streamToken=TOKEN", "widevineLicenseUrl": "https://widevine.drmprovider.com?pX=5678945&streamToken=TOKEN", "playreadyLicenseUrl": "https://playready.drmprovider.com?px?pX=5763579&streamToken=TOKEN", "fairplayCertificateUrl": "https://api.powernet.tv/iptv/playmakerfairplay.cer" }, "streams": [ "https://str01.powernet.tv/7/index.m3u8?key=43567823td23tyfdgjiewqghucvbjkdshj", "https://str02.powernet.tv/7/index.m3u8?key=43567823td23tyfdgjiewqghucvbjkdshj", "https://str03.powernet.tv/7/index.m3u8?key=43567823td23tyfdgjiewqghucvbjkdshj" ] }
Example - mode=ALL
{ airplay: true, pause: true, forward: false, backwards: false, position: null, sdhSubtitleTrack: "t1", "drm": { "assetId": "C72E747F-2224-E24B-2899-854665662AB7", "fairplayLicenseUrl": "https://fps.drmprovider.com/api/licenses/ASSETID?streamToken=TOKEN", "widevineLicenseUrl": "https://widevine.drmprovider.com?pX=5678945&streamToken=TOKEN", "playreadyLicenseUrl": "https://playready.drmprovider.com?px?pX=5763579&streamToken=TOKEN", "fairplayCertificateUrl": "https://api.powernet.tv/iptv/playmakerfairplay.cer" }, hls: 'https://str01.powernet.tv/7/index.m3u8?key=43567823td23tyfdgjiewqghucvbjkdshj', dash:'https://str02.powernet.tv/7/Manifest.mpd?key=43567823td23tyfdgjiewqghucvbjkdshj', }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | channel | Channel not found |
| 403 | geoblock | The device is outside the region where playback is permitted |
| 404 | no_streams | Concurrent streams limit reached |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/iptv/app/channel_play.txt · Last modified: 2022/12/05 12:05 by Joakim Andersen