Chrome and getusermedia no longer work properly? <SOLVED>

Discussion and feedback on Construct 2

Post » Sat Oct 01, 2016 9:44 pm

Hi, all!

I recently discovered that I am no longer able to successfully use getusermedia and Chrome... wondered if anyone has had a similar experience:

- Open the standard Microphone Input capx (included in examples with C2) and preview in Firefox 47.0.1.
- Process works as expected -> Browser prompts for selection of mic source, asks for permission to share, etc.
- Capx works as designed.

- Open the standard Microphone Input capx (included in examples with C2) and preview in Chrome 53.0.2785.143.
- Process does not work as expected -> Browser does not prompt for selection of mic source, asks for permission to share, etc.
- Capx does not work as designed (no mic input to drive it).

Could this have something to do with Chrome's handling of non-https sites? If so... any ideas on how to mitigate this during development/preview?
Last edited by johxn on Mon Oct 03, 2016 1:38 pm, edited 1 time in total.
B
5
S
1
Posts: 17
Reputation: 409

Post » Sat Oct 01, 2016 10:03 pm

Nope, it's just you. I have the latest version of Chrome, tested the example capx...works for me.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 521
Reputation: 19,594

Post » Sun Oct 02, 2016 1:29 pm

Appreciate your checking, @LaDestitute - I'll keep poking at it. :)
B
5
S
1
Posts: 17
Reputation: 409

Post » Sun Oct 02, 2016 7:09 pm

Features like this require HTTPS (if not already then certainly in the near future) so if you're not already on HTTPS, consider that the problem.

Otherwise note that if you ever click "deny", sometimes the browser remembers that and auto-denies all future requests from the same origin. To get the prompt to show again you have to go and change the browser settings for the site.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Mon Oct 03, 2016 1:28 pm

Just in case anyone else mysteriously loses Mic support in Chrome:

It seems that I had unknowingly only whitelisted mic access in Chrome for localhost. I had been messing about with network preview, and the new IP had not been whitelisted. Live and learn. :)

@Ashley - I understand that HTTPS will be necessary for hosting, but do you foresee an issue in the future with using getusermedia during the C2 development cycle itself(as we're just previewing on localhost)?

Thanks again for the sanity-check!
B
5
S
1
Posts: 17
Reputation: 409

Post » Mon Oct 03, 2016 3:25 pm

johxn wrote:@Ashley - I understand that HTTPS will be necessary for hosting, but do you foresee an issue in the future with using getusermedia during the C2 development cycle itself(as we're just previewing on localhost)?

Browsers actually treat localhost as a "secure context" as well as HTTPS, so all features should still work there.

With preview-over-wifi it gets a bit tricker, since if you are previewing over an address like http://192.168.0.1:50000, that is neither HTTPS nor localhost so secure-only features like user media won't work. You can work around this in Chrome for Android by setting up port forwarding, which means you can visit a localhost URL on the device (therefore qualifying as a secure context) which is really just redirecting to the LAN address.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762


Return to Construct 2 General

Who is online

Users browsing this forum: Huemerson, jobel and 5 guests