Latest web development tutorials

onloadeddata event

Event Object Reference Event objects

Examples

Available data in the current frame when executing JavaScript (<video>):

<Video onloadeddata = "myFunction ()">

try it"

Bottom of this article contains more examples.


Definition and Usage

Onloadeddata trigger event in the current frame data loading is complete and there is not enough data to play video / audio (audio / video) of the next frame.

Loading video / audio (audio / video), triggering the sequence of events is as follows:

  1. onloadstart
  2. ondurationchange
  3. onloadedmetadata
  4. onloadeddata
  5. onprogress
  6. oncanplay
  7. oncanplaythrough

Browser Support

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

event
onloadeddata Yes 9.0 Yes Yes Yes


grammar

In HTML:

<Elementonloadeddata = "myScript"> try

In JavaScript:

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

JavaScript, use the addEventListener () method:

object .addEventListener ( "loadeddata", 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

Available data in the current frame when executing JavaScript (<audio>:

<Audio onloadeddata = "myFunction ()">

try it"


Event Object Reference Event objects