In a template, I want, with the api, to assign different medias (video or images only) to a region with various durations.
For example, I want a region to show an image 2 secondes, then a video of ~10.5 secondes and finish with an other image for 3 secondes.
With the playlistLibraryAssign api call, I can assign the medias in the order wanted to the region playlist but I don’t know how to set specific duration for each. The duration parameter is an integer that will set the same duration to every medias. I want each medias to have his own duration. Is it possible ?
In addition, my images can be used in different layouts with different duration in each so I can’t use the duration parameter of a media.
In this particular call it is not possible, the duration parameter which you can set there would assign the same duration for all media you assign in the call.
As it stands now, you will most likely want to loop through you widgets in that layout and use the edit widget call to adjust the duration of your widgets as required.
The edit widget call has the same path for all widgets, for the parameters for the specific widget please see the relevant POST call, ie let’s say for Image you would look here for the list of parameters https://xibo.org.uk/manual-tempel/api/#/widget/WidgetImageEdit
Obviously the duration is the parameter of interest in this case.