--- title: nsIDOMHTMLMediaElement slug: orphaned/NsIDOMHTMLMediaElement original_slug: NsIDOMHTMLMediaElement ---
nsIDOMHTMLMediaElement
インターフェースは HTML 5 における audio
および video
要素の実装に用いられています。
cue ranges
機能の仕様は現在流動的な状況にあり、 HTML 5 標準においては大幅に改訂が加えられるか、置き換えられてしまう可能性があります。そのため、現時点では Firefox ではこの機能に対応していません。Inherits from: nsIDOMHTMLElement
void addCueRange(in DOMString className, in float start, in float end, in boolean pauseOnExit, in nsIDOMHTMLVoidCallback enterCallback, in nsIDOMHTMLVoidCallback exitCallback); |
DOMString canPlayType(in DOMString type); |
void load(); |
void pause(); |
void play(); |
void removeCueRanges(in DOMString className); |
属性 | 型 | 意味 | |||||||||||||||||||||
autoplay |
boolean |
true if playback should automatically begin as soon as enough media is available to do so without interruption. |
|||||||||||||||||||||
buffered |
TimeRanges |
A static, normalized TimeRanges object describing the time ranges of the media that have been buffered. Read only. 未実装 |
|||||||||||||||||||||
bufferedBytes |
ByteRanges |
A static, normalized ByteRanges object describing the byte ranges of the media that have been buffered. Read only. 未実装 |
|||||||||||||||||||||
bufferingRate |
float |
The average number of bits per second for the current download over the past few seconds. If there is no download in progress, this value is 0.0. Read only. 未実装 | |||||||||||||||||||||
bufferingThrottled |
boolean |
true if Firefox is intentionally throttling the bandwidth used by the download (such as when the download is paused), otherwise false . Read only. 未実装 |
|||||||||||||||||||||
controls |
boolean |
true if user interface for controlling the media should be presented. |
|||||||||||||||||||||
currentSrc |
DOMString |
The absolute URL of the chosen media resource (if, for example, the server selects a media file based on the resolution of the user's display), or an empty string if the networkState is EMPTY . Read only. |
|||||||||||||||||||||
currentTime |
float |
The current playback time, in seconds. Setting this value will seek the media to the new time. | |||||||||||||||||||||
defaultPlaybackRate |
float |
The default playback rate for the media. The Ogg backend does not support this. 1.0 is "normal speed," values lower than 1.0 make the media play slower than normal, higher values make it play faster. The value 0.0 is invalid and throws a NOT_SUPPORTED_ERR exception. |
|||||||||||||||||||||
duration |
float |
The length of the media in seconds, or zero if no media data is available. If the media data is available but the length is unknown, this value is NaN . If the media is streamed and has no predefined length, the value is Inf . Read only. |
|||||||||||||||||||||
ended |
boolean |
true if playback has finished. Read only. |
|||||||||||||||||||||
error |
|
The media's error status. Read only. | |||||||||||||||||||||
muted |
boolean |
true if the audio is muted, otherwise false . |
|||||||||||||||||||||
networkState |
unsigned short |
The current state of the fetch of the media. Read only.
|
|||||||||||||||||||||
paused |
boolean |
true if the media playback is currently paused. Read only. |
|||||||||||||||||||||
playbackRate |
float |
The current rate at which the media is being played back. This is used to implement user controls for fast forward, slow motion, and so forth. The normal playback rate is multiplied by this value to obtain the current rate, so a value of 1.0 indicates normal speed. Not supported by the Ogg backend. | |||||||||||||||||||||
readyState |
unsigned short |
The media's current readiness state. Read only.
|
|||||||||||||||||||||
seeking |
boolean |
true if the media is in the process of seeking to a new position, otherwise false . Read only. |
|||||||||||||||||||||
src |
DOMString |
The URL of the media to present. | |||||||||||||||||||||
totalBytes |
unsigned long |
The length, in bytes, of the media resource. If the length is unknown, or the content is streamed and therefore has no specified length, this value is 0. Read only. | |||||||||||||||||||||
volume |
float |
The current audio volume, from 0.0 (silent) to 1.0 (maximum). |
Adds a cue range to the media element.
void addCueRange( in DOMString className, in float start, in float end, in boolean pauseOnExit, in nsIDOMHTMLVoidCallback enterCallback, in nsIDOMHTMLVoidCallback exitCallback );
xxx
Determines whether or not the specified media type can be played back.
DOMString canPlayType( in DOMString type );
Because media formats are complicated, and it's impossible to judge every possible detail from the type string, there is no such thing as 100% certain that the specified type can be played; the best you can do is "probably".
Begins loading the media content from the server.
void load();
None.
Pauses the media playback.
void pause();
None.
Begins playback of the media.
void play();
None.
void removeCueRanges( in DOMString className );
xxx