User Tools

Site Tools


api:iptv:app:archive_play

API : IPTV : App : Archive play

Introduction

This request is used by the iOS/Android apps and web clients to get the streaming url for playing a program from the archive.

This is also used by the system to track that the device is now playing the program, so it's important to call Archive stop when playback ends.

Request

URL https://api.telecomx.dk/iptv/app/archive/EPG_ID/play
Method GET
Params EPG_ID Id Id of the program to start 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.
profile ObjectId ID of the user profile to play the recording for, defaults to first user profile.

Query examples

https://api.telecomx.dk/iptv/app/archive/7_46574645324/play?token=123456780123456780ABCD&lat=55.345435&long=23.347656
https://api.telecomx.dk/iptv/app/archive/7_46574645324/play?token=123456780123456780ABCD&lat=55.345435&long=23.347656&profile=1234567890ABCD1234567890
https://api.telecomx.dk/iptv/app/archive/7_46574645324/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.
sdhSubtitleTrack String Name of subtitle track for hearing-impaired.
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.
epgId string Id of the program being played.
epgStart Date Date and time the program starts.
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.

Example - mode not set

{
  "airplay": true,
  "pause": true,
  "forward": false,
  "backwards": true,
  "position": 300,
  "epgId": "7_56748576009",
  "epgStart": "2020-01-01T00:00:00.000Z",
  "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&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,
  "epgId": "7_5657564567",
  "epgStart": "2020-01-01T00:00:00.000Z",
  "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-125436575-3600.m3u8?key=43567823td23tyfdgjiewqghucvbjkdshj",
  "dash": "https://str02.powernet.tv/7/Manifest-125436575-3600.mpd?key=43567823td23tyfdgjiewqghucvbjkdshj"
}

Errors

Error code Message Description
404 program Program not found
403 geoblock The device is outside the region where playback is permitted
403 archive Archive not enabled for customer
403 channel Customer does not have access to the channel
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/iptv/app/archive_play.txt · Last modified: 2023/01/27 13:00 by Joakim Andersen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki