thomasvantuycom / craft-cloudinary

Cloudinary integration for Craft CMS
MIT License
5 stars 2 forks source link

Support for adaptive streaming #15

Closed owe closed 1 month ago

owe commented 1 month ago

According to Cloudinary documentation this requires one parameter, and also that you specify the preferred streaming format file extension (manifest).

Set the streaming_profile parameter to auto (sp_auto in URLs), and specify an extension of either .m3u8 for HLS or .mpd for DASH.

With a little hack it works great:

{% set params = { streamingProfile: "auto" } %}
{% set video = entry.casesVideo.one().getUrl(params)|trim('.mp4', 'right') ~ ".mpd" %}

But there should be some way of choosing the file format through the plugin, as it seems to be this cannot be achieved using any of Cloudinarys parameters.

thomasvantuycom commented 1 month ago

Normally this should work:

{% set params = {
    streamingProfile: 'auto',
    format: 'mpd'
} %}
owe commented 1 month ago

Sure enough. This works. My bad.