JSON format stream information
JSON format stream information
To retrieve this format, request the URL /json_STREAMNAME.js from the
HTTP output (by default port 8080).
The returned data will have an application/json mime type and contain
a JSON object in the following format:
{
  "type": "vod", //vod or live, depending on stream
  "width": 480, //Suggested display width
  "height": 360, //Suggested display height
  "redirected": ["from", "to"], //If fallback or default stream was applied, the original and final stream names used internally
  "meta": { //Summary of the stream's internal metadata
    "tracks": { //full listing of all media tracks in the stream
      "audio_AAC_2ch_22050hz_2": { //unique per-track identifier - do not depend on the formatting of this identifier, may change in the future
        "trackid": 2, //unique track ID within the stream
        "type": "audio", //type of track: audio, video, etc.
        "codec": "AAC", //codec used for this media track
        "firstms": 0, //first timestamp present in track, in milliseconds
        "lastms": 219985, //last timestamp present in track, in milliseconds
        "bps": 642, //average bytes per second for this track
        "init": "\u0013\u0088", //codec private data, as raw binary string
        //The following are only present in audio type tracks
        "channels": 2, //channel count
        "rate": 22050, //sampling rate in Hz
        "size": 16, //sample size in bits
        //The following are only present in video type tracks
        "fpks": 30000, //frames per kilo-second - e.g. 30000 = 30.00 FPS
        "height": 360, //native height of the video
        "width": 480 //native width of the video
      },
      //All tracks in the stream will be represented
    },
    "vod": 1 //only present if the file is a VoD asset
    "live": 1 //only present if the file is a live asset
  },
  "source": [//listing of possible playback methods
    {
      "priority": 9, //quality of the playback method. Higher is better.
      "relurl": "/hls/test/index.m3u8", //relative URL to the media data
      "simul_tracks": 2, //amount of simultaneously playable tracks through this method
      "total_matches": 2, //total count of playable tracks through this method
      "type": "html5/application/vnd.apple.mpegurl", //type of playback method, see explanation below
      "url": "http://localhost:8080/hls/test/index.m3u8" //absolute URL to the media data
    },
    //Each configured method applicable to this stream will be present,
    //ordered by simul_tracks, then total_matches, then priority.
  ]
}
This format is particularly suited to XHR requests.
The type as used in the source array contains a proprietary typing
of each playback method. The general format is maintype/details, and
the only standardized form is the HTML5 variant as shown above. In this
type, the main type is html5 and the details are the HTML5-compatible
mime type.