Webcam template example does not allow switching cameras

Bugs will be moved here once resolved.

Post » Sun Apr 10, 2016 1:36 am

Problem Description
The Webcam template example has a dropdown list that allows the user to switch the camera being used (so the user can switch from front camera to rear camera). Switching does not work. Regardless of which camera I select in the dropdown, it always picks the front facing camera.

I tried this on three different Android phones (published as a website). Chrome required that I use an https connection.

Attach a Capx
Capx is the Example: Webcam Level:Intermediate
Get a webcam feed from the user's camera using the User Media object.

Steps to Reproduce Bug
  • Run the HTML5 project on an Android phone with two cameras
  • Switch camera
  • Expected: The video feed switches

Observed Result
Video feed does not switch. Always selects front camera.

Expected Result
The video feed switches

Affected Browsers
  • Chrome: (YES)

Construct 2 Version ID
Release 221 (64-bit/Steam)
Built at 13:39:54 on Jan 18 2016
B
6
S
2
G
2
Posts: 6
Reputation: 1,464

Post » Sun Apr 10, 2016 2:53 am

This is os specific.
You would do it via a Cordova plug.
There may be one on the store.
Image ImageImage
B
168
S
50
G
169
Posts: 8,283
Reputation: 108,195

Post » Sun Apr 10, 2016 4:25 am

Not sure I understand your suggestion. Please elaborate.

I tried exporting to HTML5 and then opening with Chrome on my Android device.

I also tried exporting to Cordova then building APK sing Intel XDK. When I go this route, the dropdown that's supposed to show camera sources shows nothing.
B
6
S
2
G
2
Posts: 6
Reputation: 1,464

Post » Sun Apr 10, 2016 7:52 am

Changing camera's isn't covered in the html5 standard, so it has to be done with a third party plug, if one exists.
Image ImageImage
B
168
S
50
G
169
Posts: 8,283
Reputation: 108,195

Post » Thu Apr 14, 2016 7:48 am

Hi,

Me too have raised the bug over same feature. I just want to add that in Firefox user is able to switch to front and back camera both but this problem is visible in google chrome. Also want to point that in older version of construct, switching cam features used to work fine but in latest versions it is not working only front cam opens. Here u can say that chrome has changed permissions api's etc but I think it is construct team responsibility to find a work around for fixing it and open rear camera too. Have requested Ashley also for same but I think he ignored my raised bug ticket. If u guys find any solution plz let me know.
B
49
S
14
Posts: 74
Reputation: 3,583

Post » Wed May 04, 2016 12:14 pm

Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests