Chromium 58 canvas.captureStream

时间:2017-06-03 11:31:05

标签: javascript canvas mediastream

我通过websockets传输MediaRecorder数据,一切正常,但Chromium 58在客户端失败,较低版本按预期工作。视频标记保持空白,并将以下错误消息发送到控制台:

Uncaught DOMException: Failed to execute 'appendBuffer' on 'SourceBuffer': This SourceBuffer has been removed from the parent media source.

media-internals给了我:

Timestamp Property  Value
00:00:00 00 pipeline_state  kCreated
00:00:00 00 event WEBMEDIAPLAYER_CREATED
00:00:00 00 url blob:http://localhost/2784e88e-e864-49aa-92fb-ec7574ae36a0
00:00:00 00 pipeline_state  kStarting
00:00:02 85 error Unsupported video codec_id V_MPEG4/ISO/AVC
00:00:02 85 error Append: stream parsing failed. Data size=131072 append_window_start=0 append_window_end=inf
00:00:02 86 pipeline_error  chunk demuxer: append failed
00:00:02 86 pipeline_state  kStopping
00:00:02 86 pipeline_state  kStopped

客户端支持的sourceBuffer使用以下设置:

sourceBuffer = mediaSource.addSourceBuffer(`video/webm; codecs="vp8"`);
sourceBuffer.mode = "sequence";
// and chunks is an array of uint8arrays
sourceBuffer.appendBuffer(chunks[ii]);

我需要使用Chromium 58,因为错误是固定的,我们称之为captureStream的画布不再需要连接到正文。

0 个答案:

没有答案