Latest web development tutorials

onplaying event

Event Object Reference Event objects

Examples

JavaScript execution pauses after the video ready to start playing:

<Video onplaying = "myFunction ()">

try it"

Bottom of this article contains more examples.


Definition and Usage

onplaying event video / audio (audio / video) Pause or after buffering is triggered when ready to start playing again.


Browser Support

Figures in the table represent the first browser to support this version of events.

event
onplaying Yes 9.0 Yes Yes Yes


grammar

In HTML:

<Elementonplaying = "myScript"> try

In JavaScript:

object .onplaying = function () {myScript }; try

JavaScript, use the addEventListener () method:

object .addEventListener ( "playing", myScript ); try

Note: Internet Explorer 8 and earlier versions of IE do not support addEventListener () method.


technical details
Whether to support the bubble: No
It can be canceled: No
Event Type: Event
Supported HTML tags: <Audio>, <video>


Examples

More examples

Examples

After the implementation of JavaScript ready to start playing the audio pause:

<Audio onplaying = "myFunction ()">

try it"


Event Object Reference Event objects