Bubble.io Player Element
Basic usage
To add a video player to a page of your site, click on the "api.video player" item of the Visual elements list. Then, draw the player on your page using your mouse, like you do we any other Visual component. Once done, double-click on the player to open the window for editing its properties.
You should see something like that:
As you can see, there is a list of specific attributes that you can use to customize your player:
Once you've entered a videoId, you can click on "preview" to see your player in action.
Events
The video player element will trigger events during playback, so you will be able to perform some conditional actions like displaying a custom replay button when playback ends, or incrementing a views counter when playback starts.
Here is the list of all events triggered by the player:
To perform an action when an event occurs, go to the workflow tab, create a new workflow, and as a trigger condition, select "Elements -> A api.video player ..." :
Exposed state
The player element has a single exposed state. This contains the "timeupdate" value, which corresponds to the time of the playback progress in seconds. This value is sent several times per second and allows to follow precisely the progression of the playback.
Actions
The player exposes several actions that can be triggered from a workflow. That makes it fully controllable.
Here is the list of available actions: