Dear community,
I'm currently experimenting with the video widget ( on ODC ), and I was wondering if it was possible to get the status of the video ( it is playing or paused, and/or if it is finished ). Embedded players from Vimeo and Youtube seem to have this, but they have other limitations that make me explore other options. However, the widget does not seem to support this. It this indeed not possible, or did I miss some documentation on this?
Kind regards,
Vincent
Hi Vincent,
the Video Widget does not expose any events. The best option would be to clone the existing widget from OutSystemsUI and create a custom one that registers event listeners for the corresponding video element events. (and destroys them :-) )
Here is a quick and dirty sample without a custom widget
* Add the video widget to a screen
* Add an OnReady event handler to the screen
In the OnReady event handler add a Javascript block with the following code
this registers two event listeners (play and pause) for every video element on the screen. The handler here just writes to the console, but you can modify it to your needs. (e.g.. calling a client action.
From my opinion creating a custom video element is a more reliable option.
Stefan