html tutorial - onstalled Attribute in HTML - html5 - html code - html form

  • The onstalled attribute specifies a script to run though the browser is trying to get media data, yet data is not available.
  • The events that happens when there is some kind of disturbance to the media loading process, are:
    • onerror
    • onsuspend
    • onabort
    • onemptied
  • The onstalled attribute is a section of the Event Attributes.

Syntax for onstalled attribute in HTML:

<element onstalled ="script">

Difference between HTML 4.01 and HTML 5 for onstalled Attribute:

HTML 4.01


Applies To:

Element Attribute
<audio> onstalled
<video> onstalled

onstalled Attribute Values:

Value Description
script The script to be run on onstalled.

Sample Coding for onstalled Attribute in HTML:

<!DOCTYPE html>
        <title>Wikitechy HTML onstalled Attribute</title>
        <h1>Wikitechy HTML onstalled Attribute</h1>
        <video width="300" height="300" controls onstalled ="onStalled()">
            <source src="Hibiscus.mp4" type="video/mp4">
            function onStalled() 
              alert ("The video is not available in Wikitechy");

Code Explanation for onstalled Attribute in HTML:

onstalled Attribute Code Explanation

  1. <video> tag is used to display the video.
  2. onstalled attribute is used to call onStalled() JavaScript function when the browser unable to get the video.
  3. function onStalled() is a JavaScript function.
  4. alert() method used to display an alert box.

Browser Support for onstalled Attribute in HTML:

Yes Yes Yes Yes Yes

Related Searches to onstalled Attribute in html

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add to your ad blocking whitelist or disable your adblocking software.