API changes for HLS


    Note that the XML-RPC API is a legacy API and is no longer being developed, we recommend using the REST API instead.

    HLS allows cachable adaptive video streaming to both desktop and mobile.

    With HLS there are a few changes to the usage of API calls getMediaContentURL and getMediaStreams.

    Video download links from getMediaContentURL

    Download links could previously be fetched from getMediaContentURL.

    Using getMediaContentURL to get an MP4 will for HLS return the fallback format. Usually this is 360p.

    To get high quality downloads, customers should use the new getMediaDownloadURL API call. Please note that URLs returned from getMediaDownloadURL are unsuitable for general streaming purposes and shall not be used as such!

    Video streaming from getMediaContentURL

    The call getMediaContentURL has some changes in behaviour for HLS content:

    • The option 'procotol': 'rtmp' no longer works.
    • Default usage ('format' not specified) returns the MP4 fallback URL, usually 360p.
    • The option 'protocol': 'hls' returns links for adaptive HLS.
    • The option 'profile' now also accepts HLS profiles '1080p', '720p', '480p' etc for single bitrate HLS streaming.

    The recommended usage is with options={'protocol': 'hls'} to get the master HLS stream automatically providing adaptive switching between different qualities.

    Video streaming from getMediaStreams

    XML-RPC method getMediaStreams now returns MP4 fallback as well as HLS URL.

    Nevertheless this function was tailored more for older mobile formats targeting specific devices, and customers are advised to embed Onyx player instead; or switch to getMediaContentURL, or the REST API.

    Was this article helpful?
    0 out of 0 found this helpful