api:iptv:app:channel_playfromtime
Table of Contents
API : IPTV : App : Channel play from time
Introduction
This request is used by the iOS/Android apps and web clients to get the streaming url for archive streaming of a channel starting from a specified point in time.
This request is used for scrubbing back to a point in time, for timeshift/pause and for playing a program from the archive.
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/playfromtime | ||
|---|---|---|---|
| Method | GET | ||
| Params | CHANNEL_ID | Id of the channel to start streaming. | |
| Query | token | String | Session token. |
| start | Date | Date and time to start playback from. | |
| end | Date | [Optional] date and time to playback until. Defaults to start + 6 hours. |
|
| 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/playfromtime?token=123456780123456780ABCD&start=2017-01-01T00:00:00.000Z https://api.telecomx.dk/iptv/app/channel/12345678901234567890ABCD/playfromtime?token=123456780123456780ABCD&start=2017-01-01T00:00:00.000Z&end=2017-01-01T02:00:00.000Z&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. |
| sdhSubtitleTrack | String | Name of subtitle track for hearing-impaired. |
| 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. |
| streams | Array | List of URL's the stream is available from in the format specified in mode. Not used if mode is 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. |
| epgId | String | Id of the program that will be shown from the start. |
| epgStart | Date | Date and time from which playback will start. |
Example - mode not set
{ "airplay": true, "pause": true, "forward": false, "backwards": true, "position": 300, "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" }, "epgId": "23_56375647", "epgStart": "2020-01-01T00:00:00.000Z", "streams": [ "https://str01.powernet.tv/7/index.m3u8?key=43567823td23tyfdgjiewqghucvbjkdshj&start=2017-01-01T00:00:00.000Z&end=2017-01-01T01:00:00.000Z", "https://str02.powernet.tv/7/index.m3u8?key=43567823td23tyfdgjiewqghucvbjkdshj&start=2017-01-01T00:00:00.000Z&end=2017-01-01T01:00:00.000Z", "https://str03.powernet.tv/7/index.m3u8?key=43567823td23tyfdgjiewqghucvbjkdshj&start=2017-01-01T00:00:00.000Z&end=2017-01-01T01:00:00.000Z" ] }
Example - mode=ALL
{ "airplay": true, "pause": true, "forward": false, "backwards": true, "position": 300, "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" }, "epgId": "23_56375647", "epgStart": "2020-01-01T00:00:00.000Z", "hls": "https://str01.powernet.tv/7/index-125436575-3600.m3u8?key=43567823td23tyfdgjiewqghucvbjkdshj", "dash": 'https://str02.powernet.tv/7/Manifest-125436575-3600.mpd?key=43567823td23tyfdgjiewqghucvbjkdshj" }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | channel | Channel not found |
| 422 | start | Start time is invalid |
| 422 | end | End time is invalid |
| 404 | start | Not in archive |
| 403 | geoblock | The device is outside the region where playback is permitted |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/iptv/app/channel_playfromtime.txt · Last modified: 2022/12/05 12:04 by Joakim Andersen