CanvasCaptureMediaStreamTrack

CanvasCaptureMediaStreamTrack interface represents the video track contained in a MediaStream being generated from a <canvas> following a call to HTMLCanvasElement.captureStream() .

Part of the Media Capture and Streams API .

特性

This interface inherits the properties of its parent, MediaStreamTrack .

CanvasCaptureMediaStreamTrack.canvas 只读
返回 HTMLCanvasElement object whose surface is captured in real-time.

方法

This interface inherits the methods of its parent, MediaStreamTrack .

CanvasCaptureMediaStreamTrack.requestFrame()
Manually forces a frame to be captured and sent to the stream. This lets applications that wish to specify the frame capture times directly do so, if they specified a frameRate of 0 when calling captureStream() .

规范

规范 状态 Comment
Media Capture from DOM Elements
The definition of 'CanvasCaptureMediaStreamTrack' in that specification.
工作草案 初始定义

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
CanvasCaptureMediaStreamTrack
Chrome 51 Edge ≤79 Firefox 41
Disabled
41
Disabled
Disabled From version 41: this feature is behind the canvas.capturestream.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 51 Chrome Android 51 Firefox Android 41
Disabled
41
Disabled
Disabled From version 41: this feature is behind the canvas.capturestream.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 5.0
canvas
Chrome 不支持 No Edge 不支持 No Firefox 41
Disabled
41
Disabled
Disabled From version 41: this feature is behind the canvas.capturestream.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 41
Disabled
41
Disabled
Disabled From version 41: this feature is behind the canvas.capturestream.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
requestFrame
Chrome 51 Edge ≤79 Firefox 41
Disabled
41
Disabled
Disabled From version 41: this feature is behind the canvas.capturestream.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 51 Chrome Android 51 Firefox Android ? Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 5.0

图例

完整支持
完整支持
不支持
不支持
兼容性未知
兼容性未知
实验。期望将来行为有所改变。
实验。期望将来行为有所改变。
用户必须明确启用此特征。
用户必须明确启用此特征。

另请参阅