New issue
Advanced search Search tips

Issue 622099 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

MediaRecorder does not work on a stream obtained from an invisible canvas.

Reported by m...@jasonthom.as, Jun 21 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36

Example URL:

Steps to reproduce the problem:
1.
var canvas = document.createElement('canvas');
var stream = canvas.captureStream(30);
var mr = new MediaRecorder(stream);

mr.ondatavailable = (blob) => {
    console.log("Processing Raw Data " + blob.data.size);
}

mr.start(33);

// Draw to canvas

2. Observe callback is never called, and if it is data is empty.

3. Switch 'canvas' for canvas which is in DOM, and visible, and it will work.

What is the expected behavior?
MediaRecorder can record what is being drawn to an invisible canvas.

What went wrong?
MediaRecorder requires canvas to be displayed in order to record.

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? N/A 

Chrome version: 51.0.2704.84  Channel: stable
OS Version: 10
Flash Version: Shockwave Flash 22.0 r0
 
Components: -Internals>Media Blink>WebRTC

Comment 2 by m...@jasonthom.as, Jun 29 2016

Also the same issue can be reproduced using a canvas that is in the DOM that has style="display:none" set.
Cc: niklase@chromium.org emir...@chromium.org
Components: -Blink>WebRTC Blink>MediaStream>CaptureFromElement
niklase, please help with an owner.
Owner: emir...@chromium.org
This is an expected behavior from both MediaRecorder and CanvasCaptureStream. As canvas that is not attached to DOM (referred as "invisible canvas") does not paint any new frames, nothing gets captured into MediaStream. As a result nothing gets recorded.

This behavior is explained in the spec as "A new frame is requested from the canvas when frameCaptureRequested is true and the canvas is painted." When canvas is "invisible", nothing gets painted currently.
https://w3c.github.io/mediacapture-fromelement/

Comment 5 by mcasas@chromium.org, Jul 25 2016

Status: WontFix (was: Unconfirmed)
Marking this bug as "WontFix" per #4.

Sign in to add a comment