Home > Web Front-end > H5 Tutorial > body text

html5 returns the error attribute of a MediaError object

黄舟
Release: 2017-11-08 14:04:01
Original
4780 people have browsed it

Example

Get the error of VideoStatus:

myVid=document.getElementById("video1");
alert(myVid.error.code);
Copy after login

Definition and usage

error PropertiesReturn a MediaError object.

The code attribute of the MediaError object contains the error status of audio/video.

Browser support

Only Internet Explorer 9 supports the error attribute.

Syntax

audio|video.error.code
Copy after login

Return value

Type Description
Numeric value

The code attribute of the MediaError object returns a numeric value, which represents the error status of the audio/video:

  • 1 = MEDIA_ERR_ABORTED - Retrieval process Aborted by user

  • 2 = MEDIA_ERR_NETWORK - An error occurred while downloading

  • 3 = MEDIA_ERR_DECODE - An error occurred while decoding

  • 4 = MEDIA_ERR_SRC_NOT_SUPPORTED - Audio/Video not supported


##

The above is the detailed content of html5 returns the error attribute of a MediaError object. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!