HTML DOM Audio error property
Examples
Obtaining audio error status:
var x = document.getElementById("myAudio").error.code;
try it"
Definition and Usage
property returns an error MediaError object.
MediaError object code property contains the error status of audio / video.
Note: This property is read-only attribute.
Browser Support
Currently, only Internet Explorer browser supports error property.
Note: Internet Explorer 8 and earlier versions of IE does not support this property.
grammar
audioObject .error.code
return value
类型 | 描述 |
---|---|
数字值 |
MediaError 对象的 code 属性返回一个数字值,它表示音频的错误状态:
|
Audio Object