Baseline Widely available *
HTML åªä½å ç´ æ¥å£å¨å±æ§åæ¹æ³ä¸æ·»å äº HTML å ç´ æ¥æ¯æåºç¡çåªä½ç¸å ³çè½åï¼å°±åé³é¢åè§é¢ä¸æ ·ãHTML è§é¢å ç´ åHTML é³é¢å ç´ å ç´ é½ç»§æ¿èªæ¤æ¥å£ã
must be a string
ç¹æ§ä»ç¶çº§ HTMLElement
ãElement
ãNode
å EventTarget
ç»§æ¿å±æ§ã
audioTracks
AudioTrackList
表示å¨è¯¥å
ç´ ä¸å
å«çAudioTrack
对象å表
autoplay
Boolean
表示 autoplay
ç HTML 屿§ï¼è¡¨æå¨è§é¢å è½½å¯ç¨æ¶æ¯å¦ä¸ä¸æå°èªå¨ææ¾èµæº
buffered
åªè¯» TimeRanges
buffered
屿§ä¼åè¯æµè§å¨åªä¸é¨åçåªä½å·²ç»è¢«ä¸è½½ï¼å¦ææµè§å¨æ¯æçè¯ï¼ï¼æç
§æ åä¼è¿åä¸ä¸ªTimeRanges
对象 controller
MediaController
è¿åå½ååªä½æ§å¶å¨ç MediaController 对象ï¼å¦ææ²¡æè¿æ¥å°±è¿å null
controls
Boolean
æ å°å¨ HTML æ ç¾ãcontrols
屿§æ§å¶æ¯å¦æ¾ç¤ºç¨æ·ææ¾çé¢çæ§å¶ HTML crossOrigin
DOMString
ä¸ä¸ªè¡¨ç¤ºåªä½å
ç´ CORS 设置çDOMString
ãä» CORS settings attributes æ¥çæ´å¤è¯¦æ
currentSrc
åªè¯» DOMString
ç¨DOMString
表示åªä½æä»¶çç»å¯¹ URLã妿networkState
为EMPTYï¼
é£ä¹å¼ä¸ºç©ºå符串ã currentTime
double
å½åææ¾æ¶é´ï¼åä½ä¸ºç§ã为å
¶èµå¼å°ä¼ä½¿åªä½è·³å°ä¸ä¸ªæ°çæ¶é´ã defaultMuted
Boolean
æ å°å¨ HTML æ ç¾ä¸ãmuted
屿§è¡¨ç¤ºåªä½å£°é³è¢«ææ¾æ¶æ¯å¦åºè¯¥è¢«éé³ãè¿ä¸ªå±æ§ä¸è½å¨æè®¾ç½®éé³/ä¸éé³ï¼å¦æå¸æè®¾ç½®éé³/ä¸éé³ï¼è¯·ä½¿ç¨ muted
屿§ defaultPlaybackRate
double
æ§å¶åªä½çææ¾é度ã1.0 表示æ£å¸¸çææ¾é度ï¼å¦æå¼å°äº 1.0ï¼åææ¾éåº¦ä¼æ¯âæ£å¸¸é度âæ
¢ï¼å¦æå¼å¤§äº 1.0ï¼åææ¾éåº¦ä¼æ¯âæ£å¸¸é度âå¿«ã0.0 æ¯ä¸ä¸ªæ æçå¼ï¼å¹¶ä¸ä¼æåº NOT_SUPPORTED_ERR
é误ã duration
åªè¯» double
åªä½ä»¥ç§ä¸ºåä½çæ»é¿åº¦æ¶é´ï¼å¦æåªä½ä¸å¯ç¨ï¼å为 0. 妿åªä½å¯ç¨ï¼ä½æ¶é´é¿åº¦æªç¥ï¼å¼ä¸º NAN. 妿åªä½æ¯ä»¥ stream å½¢å¼ä¼ è¾å¹¶ä¸æ²¡æé¢å®é¿åº¦ï¼åå¼ä¸º Infã ended
åªè¯» Boolean
表示åªä½æ¯å¦å·²ç»ææ¾å®æ¯ã error
åªè¯» MediaError
MediaError
对象表示æè¿çé误ï¼å¦ææ²¡æé误åå¼ä¸º null
ã initialTime
åªè¯» éæ å å·²å¼ç¨ double
åå§ææ¾ä½ç½®ï¼ä»¥ç§ä¸ºåä½ï¼ã loop
Boolean
伿 å°å¨ HTML æ ç¾ loop
屿§ , å³å®è¯¥åªä½æ¯å¦å¾ªç¯ææ¾ã mediaGroup
DOMString
åæ å¨ HTML mediagroup
æ ç¾ä¸ã 表示å
ç´ æå½å±çåç»ï¼åä¸ç»çåªä½å
ç´ ä¼å
±äº«åä¸ä¸ªæ§å¶å¨ï¼controller
ï¼ã mediaKeys å®éªæ§ åªè¯» MediaKeys
Returns a reference to the MediaKeys
interface, which is a set of keys that an associated HTMLMediaElement can use for decription of media data during playback. mozAudioChannelType
éæ å DOMString
Can be used to set the audio channel that the sound coming from an <audio>
or <video>
element will play in, on a Firefox OS device. See Using the AudioChannels API for more details. mozChannels
åªè¯» éæ å long
声鿰 (æ¯å¦ 2
æ¯ç«ä½å£°). mozFrameBufferLength
éæ å long
Indicates the number of samples that will be returned in the framebuffer of each MozAudioAvailable
event. This number is a total for all channels, and by default is set to be the number of channels * 1024 (e.g., 2 channels * 1024 samples = 2048 total).
The mozFrameBufferLength
property can be set to a new value, for lower latency, or larger amounts of data, etc. The size given must be a number between 512 and 16384. Using any other size results in an exception being thrown. The best time to set a new length is after the loadedmetadata
event fires, when the audio info is known, but before the audio has started or MozAudioAvailable
events have begun firing.
mozSampleRate
åªè¯» éæ å long
ææ¾å
容çéæ ·çï¼æ¯ç§éæ ·æ¬¡æ°ï¼ãæ¯å¦ï¼44100 å°±æ¯ä¸å¼ CD çéæ ·çã mozSrcObject
éæ å MediaStream
Lets you set or get the Media Stream to be played or being played. muted
Boolean
é鳿¶ä¸º true
ï¼å¦åæ¯false
. networkState
unsigned short
è·ååªä½æ¶çç½ç»ç¶æ NETWORK_EMPTY
0 è¿æ²¡æ°æ®ãreadyState
æ¯ HAVE_NOTHING
. NETWORK_IDLE
1 NETWORK_LOADING
2 æ£å¨å è½½ã NETWORK_NO_SOURCE
3 paused
åªè¯» Boolean
æç¤ºåªä½å
ç´ æ¯å¦è¢«æåã playbackRate
double
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.
If the playbackRate
is negative, the media is played backwards.
The audio is muted when the media plays backwards or if the fast forward or slow motion is outside a useful range (E.g. Gecko mute the sound outside the range 0.25
and 5.0
).
The pitch of the audio is corrected by default and is the same for every speed. Some browsers implement the non-standard preservespitch
property to control this.
played
åªè¯» TimeRanges
åªä½å¯è¢«ææ¾çèå´ã preload
DOMString
Reflects the preload
HTML attribute, indicating what data should be preloaded, if any. Possible values are: none
, metadata
, auto
. See preload
attribute documentation for details. readyState
åªè¯» unsigned short
The readiness state of the media. HAVE_NOTHING
0 No information is available about the media resource. HAVE_METADATA
1 Enough of the media resource has been retrieved that the metadata attributes are initialized. Seeking will no longer raise an exception. HAVE_CURRENT_DATA
2 Data is available for the current playback position, but not enough to actually play more than one frame. HAVE_FUTURE_DATA
3 Data for the current playback position as well as for at least a little bit of time into the future is available (in other words, at least two frames of video, for example). HAVE_ENOUGH_DATA
4 Enough data is availableâand the download rate is high enoughâthat the media can be played through to the end without interruption. seekable
åªè¯» TimeRanges
The time ranges that the user is able to seek to, if any. seeking
åªè¯» Boolean
Indicates whether the media is in the process of seeking to a new position. sinkId
åªè¯» å®éªæ§ DOMString
The unique ID of the audio device delivering output, or an empty string if it is using the user agent default. This ID should be one of the MediaDeviceInfo.deviceid
values returned from MediaDevices.enumeratedDevices()
, id-multimedia
, or id-communications
. src
DOMString
Reflects the src
HTML attribute, containing the URL of a media resource to use. Gecko implements a similar functionality for streams: mozSrcObject
. textTracks
TextTrackList
Represents the list of TextTrack
objects contained in the element. videoTracks
VideoTrackList
Represents the list of VideoTrack
objects contained in the element.
Note: Yet Gecko supports only single track playback, and the parsing of tracks' metadata is only available for media with Ogg container foramt.
volume
double
表示é³é¢çé³éãå¼ä» 0.0ï¼éé³ï¼å° 1.0ï¼æå¤§é³éï¼ã Methods
Inherits methods from its parent, HTMLElement
.
canPlayType(in
DOMString
type)
DOMString
probably
: if the specified type appears to be playable.maybe
: if it's impossible to tell whether the type is playable without playing it.Note: Previously canPlayType('video/webm')
returned 'probably'
. Starting with Gecko 28, it returns 'maybe'
. (Firefox bug 884275)
fastSeek(double time)
void
Directly seek to the given time. load()
void
Reset the media element and restart selecting the media resource. Any pending events are discarded. How much media data is fetched is still affected by the preload
attribute. This method can be useful for releasing resources after any src
attribute and source
element descendants have been removed. Otherwise, it is usually unnecessary to use this method, unless required to rescan source
element children after dynamic changes. mozGetMetadata()
éæ å Object
The mozGetMetadata
method returns a javascript object whose properties represent metadata from the playing media resource as {key: value} pairs. A separate copy of the data is returned each time the method is called.
loadedmetadata
event fires. mozLoadFrom(HTMLMediaElement other)
éæ å å·²å¼ç¨ void
This method, available only in old Mozilla's implementation, loads data from another media element. This works similarly to load()
except that instead of running the normal resource selection algorithm, the source is simply set to the other
element's currentSrc
.
other
element's cached and buffered data; in fact, the two elements share downloaded data so that data downloaded by either element is available to both. pause()
void
æåææ¾ã play()
void
å¼å§ææ¾ã setMediaKeys å®éªæ§ Promise
Sets the MediaKeys
keys to use when decrypting media during playback. setSinkId å®éªæ§ Promise
Sets the ID of the audio device through which audio output should be rendered if the application is authorized to play out of a given device. Events
Audio and Video elements can fire quite a few different events.
Specifications Browser compatibility See alsoRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4