MDN wants to talk to developers like you: https://qsurvey.mozilla.com/s3/8d22564490d8

srcObject

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!
この記事を English (US) で読むこともできます。

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.

The srcObject property of the HTMLMediaElement interface sets or returns the object which serves as the source of the media associated with the HTMLMediaElement. This is usually a MediaStream but can, according to the specification, be a MediaSource, Blob, or File.

Syntax

var mediaStream = HTMLMediaElement.srcObject
HTMLMediaElement.srcObject = mediaStream

Value

MediaStreamMediaSourceBlob, or File object (though see the compatibility table for what is actually supported).

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'srcObject' in that specification.
Living Standard Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 52.0[1] 18.0 (18.0)[1][2]
42.0 (42.0)[1]
? 39[1] ?
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support 52.0 ? ? ? 39 ? 52.0

[1] Only MediaStream objects are currently supported. MediaSource, Blob, and File objects are yet to be supported, and throw a TypeError.

[2] Early versions of Firefox implemented this under the non-standard name mozSrcObject.

ドキュメントのタグと貢献者

 このページの貢献者: chrisdavidmills, Sheppy, Jib, jpmedley
 最終更新者: chrisdavidmills,