License Service

The license service is used to issue licenses for playback of content.

Summary: Send telemetry information about the play experience
Authentication: X-Play-Session
                  POST /services/license/play_telemetry
                

Description

Use this API to send playback telemetry about the user’s play experience. If the device was offline the telemetry data will be stored and sent back when the device comes online and offline will be set to true.

Request Parameters

Parameter Type Description
ts string Timestamp in ISO 8601 format.
slug string The slug of the content being watched.
player number Refer to the Player Codes table below.
elapsed number The time, in seconds, since the last telemetry request was sent.
buffered number The amount of time, in seconds, that the player has spent buffering.
bitrate number The current bitrate the player is using, in Kbps. This is unavailable and will be 0 when player=6.
estbitrate number The estimated bitrate of the user’s network connection, in Kbps. This will be 0 if the content was downloaded prior to playback. This is unavailable and will be 0 when player=6.
seeked bool True if the user has seeked, otherwise false.
position number The current position, in seconds, where the user is up to within the content.
length number The duration, in seconds, of the content being played.
droppedFrames number The total number of dropped frames during this playback.
offline bool True if the telemetry data was recorded when the device was offline.
adBlocked bool True if ad Ad Blocker has been detected.

Player Codes

Parameter Description
1 Web DASH - HTML5 player using Widevine, PlayReady or no DRM.
2 Deprecated. Web Flash - Flash player using Widevine Classic DRM.
3 Android App - using Widevine DRM.
4 Chromecast App - using Widevine DRM.
5 iOS App - using Widevine DRM.
6 Web HLS - HTML5 player using Fairplay DRM.
7 React Native iOS/tvOS app - using Fairplay DRM.
8 React Native Android app - using Widevine DRM.
12 Roku app - using DASH and Widevine DRM.

Examples

Telemetry Data

curl -i 'https://store.shift72.com/services/license/play_telemetry' \
  -X POST \
  -H 'x-play-session: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c3IiOjI4NSwiY2lkIjoyLCJtaWQiOjU1LCJnZW8iOiJueiIsImFnZSI6MTAzLCJnaWQiOjIsImV4cCI6MTQ1MDgxMzAwNX0.ANkcYZUhKI0p6rHVHYoHnGfVfQsezd8depxpL1LVyl8' \
  -H 'content-type: application/json' \
  --data-binary '{  
   "ts":"2015-12-21T19:37:01.922Z",
   "slug":"/film/52",
   "player":1,
   "elapsed":0,
   "buffered":2,
   "bitrate":979,
   "estbitrate":15457,
   "adBlocked":false,
   "seeked":false,
   "offline":false,
   "position":0,
   "length":31,
   "droppedFrames":0
 }'

Response: Success

HttpStatus: 200

Response: Unauthorized

HttpStatus: 401