New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 600243 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

getUserMedia frame rate constraints don't work with fake input devices

Reported by a...@tokbox.com, Apr 4 2016

Issue description

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

Example URL:
https://output.jsbin.com/ficari

Steps to reproduce the problem:
1. Launch Chrome 51 with the --use-fake-device-for-media-stream flag
2. Visit https://output.jsbin.com/ficari

What is the expected behavior?
The expected behaviour is that the framerate should be set to 1 frame per second and so the video displayed is at 1 fps. In Chrome 49 and Chrome 50 this is how it behaves.

What went wrong?
Instead the framerate constraints appear to be ignored and the default of 30 fps is used. The video moves smoothly instead of at 1 fps like requested.

Did this work before? Yes Chrome 50

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes 

Chrome version: 51.0.2698.0  Channel: canary
OS Version: OS X 10.11.3
Flash Version: Shockwave Flash 21.0 r0

It seems to behave correctly with real devices, it's only the fake device behaviour which is not taking the constraints into consideration.
 

Comment 1 by a...@tokbox.com, Apr 4 2016

Actually, I just tested again and this bug is in Chrome 50 as well. Chrome 49 does display the correct behaviour though.

Comment 2 by a...@tokbox.com, Apr 4 2016

It looks like it's just the optional constraints that are ignored, not the mandatory ones. So if I do:

navigator.webkitGetUserMedia({
    audio: true,
    video: {
      mandatory: {
        maxFrameRate: 1,
        minFrameRate: 1
      }
    }
  }, function(stream) {
    var video = document.createElement('video');
    document.body.appendChild(video);
    video.src = window.URL.createObjectURL(stream);
    video.play();
  }, function(err) {
    alert(err.message);
  });

it works fine but:

navigator.webkitGetUserMedia({
    audio: true,
    video: {
      optional: [
        {maxFrameRate: 1},
        {minFrameRate: 1}
      ]
    }
  }, function(stream) {
    var video = document.createElement('video');
    document.body.appendChild(video);
    video.src = window.URL.createObjectURL(stream);
    video.play();
  }, function(err) {
    alert(err.message);
  });

does not work.
Status: Untriaged (was: Unconfirmed)
Components: -Internals>Media Blink>GetUserMedia
Cc: phoglund@chromium.org
Labels: -Type-Bug Type-Bug-Regression
Owner: hta@chromium.org
Status: Assigned (was: Untriaged)

Comment 6 by hta@chromium.org, Apr 5 2017

Owner: guidou@chromium.org

Comment 7 by guidou@chromium.org, Apr 18 2017

Status: Fixed (was: Assigned)
This is fixed in M59 with the new algorithm for video constraints.

Sign in to add a comment