Caching Assets
In this example we will show you how you can use the UI Builder Studio API to manually cache assets on the playout engines.
This can be usefull, for example, if you need to prepare assets for playout from a custom Show or Template UI.
Cache Assets using UI Builder Studio API
We will use the UI Builder Studio API to cache a MediaHub asset on every engine of the current PROGRAM channel.
1 2 | |
The full signature is cache(assets, verify?):
assetsmay be a single path or an array of paths.verifyset totrueforces Erizos Studio to re-verify the file already in the cache instead of trusting it.
1 2 | |
Tip
The pathway to the assets must precisely match the way Erizos Studio caches them. You can locate this pathway in the logs.
Other targets
Api.profile.program is the PROGRAM channel of the active profile. The same call is available on the other targets:
1 2 3 4 5 6 7 8 | |
Info
Every one of these calls is asynchronous and returns a promise.