过时
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 .

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
ended 弃用 Chrome ? — 54
不支持 ? — 54
Deprecated in Chrome 52.
Edge ? Firefox No IE No Opera ? — 39 Safari ? WebView Android ? — 54
不支持 ? — 54
Deprecated in Chrome 52.
Chrome Android ? — 54
不支持 ? — 54
Deprecated in Chrome 52.
Firefox Android No Opera Android ? — 41 Safari iOS ? Samsung Internet Android ? — 6.0
不支持 ? — 6.0
Deprecated in Samsung Internet 6.0.

图例

不支持

不支持

兼容性未知 ?

兼容性未知

弃用。不要用于新网站。

弃用。不要用于新网站。

见实现注意事项。

元数据

  • 最后修改: