Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

This page summarizes the information that is relevant to client developers wanting to upgrade to our currently supported API versions.

Channels

Currently v3 of our Channel API is in Beta and it is not recommended for clients to upgrade.

Table of Contents

Migrating to the new PlayableStream format endpoints

Using the old endpoint

Currently the client will call our "play" endpoint which returns an JSON object containing the URL where the stream is available and the DRM information required to play it.

Using the new endpoint

Our new endpoint PlayableStream related to Channel (live) returns similar information, but is more detailed.

The chief differences to note are:

  • The startover parameter is renamed to "restart_at_beginning"
  • The following parameters are no longer required or supported:
    • service
    • ajax
    • stream_type
  • The API will return a number of different stream_types and let the client pick which one to display
    • The "suggested_devices" key in the response is non-normative and is just a suggestion


Code Block
languagejs
themeFadeToGreyEclipse
titleResponse structure
linenumberstrue
{
   "data":[
      {
         "id":"{"stream_url":"https://pre-npvr-media-booxmedia.secure.footprint.net","profile_name":"sd_1"}",
         "type":"PlayableStream",
         "attributes":{
            "suggested_devices":[

            ],
            "codec_info":"video/mp4",
            "transport_protocol":"https",
            "streaming_protocols":[
               "hls"
            ],
            "bitrate":2404,
            "stream_url":"https://pre-npvr-media-booxmedia.secure.footprint.net/data/r1/2018/04/06/17/6081372/6081372.ism/playlist.m3u8?startvalidity=20180406115952&endvalidity=20180407120452&nva=20180407120452&ttl=86700&ip=81.157.251.100&token=0f2636a5df2905e026323",
            "protection_types":[
               "cdn_auth_token1"
            ],
            "profile_name":"sd_1",
            "max_resolution":"576",
            "vbr_max_bitrate":2404
         }
      },
      {
         "id":"{"stream_url":"http://mts-pre-vdn-sslsegments.dna.fi","profile_name":"sd_1"}",
         "type":"PlayableStream",
         "attributes":{
            "suggested_devices":[

            ],
            "codec_info":"video/mp4",
            "transport_protocol":"http",
            "streaming_protocols":[
               "hls"
            ],
            "bitrate":2404,
            "stream_url":"http://mts-pre-ew3020-van-1-1.dna.fi:80/session/b66c06bc-3992-11e8-b6e0-00505699e137/7kcjqi/data/r1/2018/04/06/17/6081372/6081372.ism/playlist.m3u8?token=de0f08e0e63b388aae976bb96a8b4aae_1523045092_1523045092",
            "protection_types":[
               "cdn_edge"
            ],
            "profile_name":"sd_1",
            "max_resolution":"576",
            "vbr_max_bitrate":2404
         }
      }
   ]
}