Chrome and getusermedia no longer work properly? <SOLVED>

0 favourites
  • 6 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Nope, it's just you. I have the latest version of Chrome, tested the example capx...works for me.

  • Appreciate your checking, LaDestitute - I'll keep poking at it.

  • 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.

  • 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!

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)