Search...
onEnded( )
Adds an event handler that runs when the playback has ended.
Description
A video ends when the playback reaches the duration
of the video.
If the video is set to play in a loop, this event handler is never triggered.
Syntax
function onEnded(handler: EventHandler): VideoBoxhandler: function EventHandler(event: Event): void
onEnded Parameters
NAME
TYPE
DESCRIPTION
handler
The name of the function or the function expression to run when the video has ended.
EventHandler Parameters
NAME
TYPE
DESCRIPTION
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
Get the ID of the video box whose video has ended
Copy Code
1$w("#myVideoBox").onEnded( (event) => {2 let targetId = event.target.id; // "myVideoBox"3});