Programmatic Control of Video Elements

I know I can control Video elements using CoBlocks, but is there a way to play/pause videos via a coding script.

There doesn’t appear to be a VideoItem class, and the DrawItem interface doesn’t have any play/pause methods.

Hi @Sean_Landis,

There is a VideoItem, but it’s only available in the developer API. @Stefan, is there a reason why the VideoItem isn’t available in the public API?

Many thanks,
Geoff @ TechLeap

Hi @techleapnz,

I’ve talked to our developers and found no issue with making certain VideoItem APIs available for all users. Consider it on our To-Do list for a future release :slight_smile:

That’s great news! For now, is using the CoBlocks to programmatically control the playing/pausing of videos the only option?

Great to hear - thanks Stefan!

Geoff @ TechLeap

That’s correct, Sean. You can use Click events to control the playing mode, and could even overlay some play/pause/stop icons when hovered. See CoSpaces Edu :: Video UI test for a remixable example.

Regards,
Geoff @ TechLeap