ビデオエラープロパティ
例
ビデオのエラー状態を取得します。
var x = document.getElementById("myVideo").error.code;
定義と使用法
errorプロパティは、MediaErrorオブジェクトを返します。
MediaErrorオブジェクトには、ビデオのエラー状態を含むコードプロパティがあります。
注:このプロパティは読み取り専用です。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
error | Not supported | 9.0 | Not supported | Not supported | Not supported |
構文
videoObject.error.code
戻り値
Type | Description |
---|---|
Number | The code property of the MediaError Object returns a number representing the error state of the video:
|
❮ビデオオブジェクト