The Blue Billywig Online Video Platform is often used for embedding videos within a website – either via a javascript embedcode or an iframe. /sapi/embedcode can be used to programmatically retrieve the correct embedcode for a certain Online Video Platform content object (a video, a project, a placement, a channel).
In the example use case below, the typical Media Clip embed scenario is given as an example. It’s also possible to specify project, cliplist or channel rather than Media Clip.
1.0 | Object structure
Depends on the requested embed code format.
2.0 | GET /sapi/embedcode mediaclipid/playout/format
Example:
/sapi/embedcode/12345/default/javascript
Delivers the (JSON wrapped) javascript formatted embed code for Media Clip 12345 and playout “default”. Example response:
{ type: "embedcode", usetype: "javascript", body: "<script type="text/javascript" src="//my-beautiful-publication.bbvms.com/p/default/c/12345.js" ></script>" }
Format can be either javascript or iframe.