This method creates an embed.
const data =
content: '',
caption: 'My embed',
responsive: true
};
const embedInstance = app.embed.insert(data);
This method updates the properties of the selected embed.
const data =
content: 'https://youtu.be/link-to-the-video'
};
const embedInstance = app.embed.update(data);
This method returns the instance of the selected embed.
const embedInstance = app.embed.get();
const embedInstance = app.embed.get();
if (embedInstance) {
console.log(embedInstance.getData());
}
This method removes the selected embed.
app.embed.remove();