过时
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
ended
只读特性在
MediaStream
interface returns a Boolean value which is
true
if the stream has been completely read, or
false
if the end of the stream has not been reached. This value once the
ended
event has been fired.
This property has been removed from the specification; you should instead rely on the
ended
event or check the value of
MediaStreamTrack.readyState
to see if its value is
"ended"
for the track or tracks you want to ensure have finished playing.
var hasEnded = MediaStream.ended;
A Boolean value that returns
true
if the end of the stream has been reached.
No longer part of any specification. This property was part of earlier drafts of the Media Capture and Streams specification .
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ended
弃用
|
Chrome
? — 54
|
Edge ? | Firefox No | IE No | Opera ? — 39 | Safari ? |
WebView Android
? — 54
|
Chrome Android
? — 54
|
Firefox Android No | Opera Android ? — 41 | Safari iOS ? |
Samsung Internet Android
? — 6.0
|
不支持
兼容性未知
弃用。不要用于新网站。
见实现注意事项。
MediaStream
active
ended
id
onaddtrack
onremovetrack
MediaDevices.getUserMedia()
Navigator.mediaDevices
RTCCertificate
RTCDTMFSender
RTCDTMFToneChangeEvent
RTCDataChannel
RTCDataChannelEvent
RTCDtlsTransport
RTCErrorEvent
RTCIceCandidate
RTCIceTransport
RTCPeerConnection
RTCPeerConnectionIceErrorEvent
RTCPeerConnectionIceEvent
RTCRtpReceiver
RTCRtpSender
RTCRtpTransceiver
RTCSctpTransport
RTCSessionDescription
RTCStatsEvent
RTCStatsReport
RTCTrackEvent