Interacting with the Studio SDK
Changes on the Studio automatically update the window.shotstack.edit
object. This object
can be used to render your videos using the Edit API.
You can set up an event listener to be notified whenever a change is made to the video.
Event Listeners
Register an event listener for the update event to execute a callback function whenever the Edit object is updated:
window.shotstack.on('update', (data) => {
console.log('Clip updated', data);
});
Loading Templates
You can load an Edit JSON object into the Studio
using the load()
method.
This is helpful is you want to load a new template into the editor.
window.shotstack.load('studio', template);
Loading images and videos into the Studio
You can upload images and videos by uploading them using your favourite data store or via the Ingest API.
Add a clip with the new asset to your
Edit object and load this into the Studio using the load()
method.
Native upload functionality is on the roadmap and will be supported in the future.