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 The type of player. 1 = Web DASH, 2 = Web Flash, 3 = Android, 4 = Chromecast, 5 = iOS.
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.
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.
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.

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,
   "seeked":false,
   "offline":false,
   "position":0,
   "length":31,
   "droppedFrames":0
 }'

Response: Success

HttpStatus: 200

Response: Unauthorized

HttpStatus: 401