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




Onwaiting attribute in html

Learn html - html tutorial - Onwaiting attribute in html - html examples - html programs

  • The onwaiting attribute specifies a script to run though the video stops because it wants to buffer the next frame.
  • This event may also be used on <audio> elements, but it is frequently used for videos.
  • The onwaiting attribute is a section of the Event Attributes.

Syntax for onwaiting attribute in HTML:

<element onwaiting="script">

Differences between HTML 4.01 & HTML5 for onwaiting attribute:

HTML 4.01

  • HTML4 does not support <audio> and <video> tag.

HTML5

  • HTML5 supports <audio> and <video> tag.

Applies to:

Elements Attribute
<audio> onwaiting
<video> onwaiting

Attribute values:

Value Description
Script Script to be run on onwaiting

Sample coding for onwaiting attribute in HTML:

Tryit<!DOCTYPE html>
<html>
    <body>
        <video width="320" height="240" controls onwaiting="onWaiting()">
            <source src="hibiscus.mp4" type="video/mp4">
        </video>
        <script>
            function onWaiting() {
                alert ("Wait! Wikitechy video need to buffer the next frame");
            }
        </script>
    </body>
</html>

Code Explanation for onwaiting attribute in HTML:

onwaiting Attribute Code Explanation

  1. <video> tag is used to defines that video controls should be visible.
  2. The onwaiting attribute specifies the video stops because it wants to buffer the next frame.
  3. <source> tag defines several video resources.
  4. src is an attribute, which describes the URL of the video file.
  5. function Wikitechy () is a JavaScript function (block of code), which is created to perform this alert method.
  6. alert () method shows an alert box with a parameter value and a particular message and an OK button.

Sample Output for onwaiting attribute in HTML:

onwaiting Attribute Output part-1

  1. The video file has been displayed here.
onwaiting Attribute Output part-2 alert box has been displayed

  1. The output shows the running video with seconds.
  2. After changing the seconds in the video, the alert box has been displayed.

Browser Support for onwaiting attribute in HTML:

Yes 9.0 Yes Yes Yes

Related Searches to onwaiting 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 wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×