Bug 187756 - Change the input camera in the sources & outputs example on Safari (11) with M.Way camera
Summary: Change the input camera in the sources & outputs example on Safari (11) with ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 11
Hardware: Mac iOS 11
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
: 187933 188606 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-18 06:20 PDT by theraudmickael
Modified: 2018-08-16 12:50 PDT (History)
7 users (show)

See Also:


Attachments
Screenshot to confirm you this issue in Safari Technology Preview (160.03 KB, image/png)
2018-07-18 07:48 PDT, theraudmickael
no flags Details
Patch (4.74 KB, patch)
2018-08-15 15:39 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews205 for win-future (12.92 MB, application/zip)
2018-08-16 08:24 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description theraudmickael 2018-07-18 06:20:53 PDT
## Browser affected
Safari Version 11.0 (13604.5.6) (macOS)

## Description
The example "Select sources & outputs" is not switching the video input devices as expected. I have 2 camera connected and the example let's me select CAM 2, but i got an error on console about constraint used.

## Steps to reproduce
1. Plug 2 camera on Mac device
2. Go to https://webrtc.github.io/samples/src/content/devices/input-output/
3. Change video source to M.Way camera (see "Amazon camera references")

## Expected results
I expect to see the other camera stream

## Actual results
I got an error on console : 
> [Log] navigator.getUserMedia error:  – OverconstrainedError {message: "Invalid constraint", constraint: "deviceId"} (main.js, line 116) OverconstrainedError {message: "Invalid constraint", constraint: "deviceId"} OverconstrainedErrorconstraint: "deviceId"

## Amazon camera references
- Link of the article | https://www.amazon.fr/M-Way-Résolution-Microphone-ajustable-Compatible/dp/B073F6WQFJ
- Name of the article | Webcam HD 720P, M.Way USB Caméra à Haut Résolution avec Microphone Intégré et Trépied ajustable Caméra PC pour Skype/MSN/Facebook/Twitter Compatible avec Windows 7, Windows 8, Windows 10 Mac OS 10.6 Noir
- Number of the article | M.WAYLOLV12GRA101
- ASIN | B073F6WQFJ

You can see this bug in github : https://github.com/webrtc/samples/issues/1033#issuecomment-405814817
Comment 1 Radar WebKit Bug Importer 2018-07-18 06:30:30 PDT
<rdar://problem/42332178>
Comment 2 youenn fablet 2018-07-18 06:32:38 PDT
Hi Mickael and thanks for the report.
Is it specific to the amazon camera or does it apply to any USB camera?
Is the Amazon camera working in other applications?

Can you try with Safari Tech Preview and check whether the issue is still reproducing?
Comment 3 theraudmickael 2018-07-18 07:48:43 PDT
Created attachment 345245 [details]
Screenshot to confirm you this issue in Safari Technology Preview

Hi yauenn !

Thank you for your response.

For more informations, this bug it specific to the amazon camera (for the moment for me because i haven't a big pool of camera to test) and yes, my camera work with "Skype" version 8.25.0.5 (desktop software) or "Photo Booth Library" version 9.0 (904) software in my mac, for exemple.

For your last request, i tried with Safari Technology Preview and I have the same error. I will attach you a screenshot to confirm you this issue.
Comment 4 youenn fablet 2018-08-13 17:09:42 PDT
I was able to repro the bug.
The issue might be for cameras that do support discrete frame rates, but not 30fps.
When adding frameRate: 15, the stream is actually created.
Comment 5 youenn fablet 2018-08-15 14:30:22 PDT
*** Bug 187933 has been marked as a duplicate of this bug. ***
Comment 6 youenn fablet 2018-08-15 14:30:41 PDT
*** Bug 188606 has been marked as a duplicate of this bug. ***
Comment 7 youenn fablet 2018-08-15 15:39:49 PDT
Created attachment 347214 [details]
Patch
Comment 8 Eric Carlson 2018-08-15 16:21:35 PDT
Comment on attachment 347214 [details]
Patch

Nice simple fix, thanks!
Comment 9 EWS Watchlist 2018-08-16 08:23:57 PDT
Comment on attachment 347214 [details]
Patch

Attachment 347214 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8880378

New failing tests:
http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
Comment 10 EWS Watchlist 2018-08-16 08:24:08 PDT
Created attachment 347265 [details]
Archive of layout-test-results from ews205 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews205  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 11 WebKit Commit Bot 2018-08-16 12:50:41 PDT
Comment on attachment 347214 [details]
Patch

Clearing flags on attachment: 347214

Committed r234949: <https://trac.webkit.org/changeset/234949>
Comment 12 WebKit Commit Bot 2018-08-16 12:50:43 PDT
All reviewed patches have been landed.  Closing bug.