userMedia - force back camera

0 favourites
  • 14 posts
From the Asset Store
Build a thrilling space station scenario with these level assets and characters.
  • I am using the userMedia plugin on a mobile game using android 4.2 and chrome, when i request and allow the camera it opens the front camera with no option to switch.

    In firefox on android 4.2 i get to choose front/back.

    In chrome on android 4.4 it sends me to os camera app and i have all the feature accessible from there.

    Is there a way around it?, can i force userMedia to request back camera?

    Thank You.

  • Ashley any thoughts on the subject?

  • Hello,

    I'm currently facing the same problem and I'm almost totally blocked.

    I have tried to modify the base plugin usermedia without succes.

    If we could make the choice for the camera with the base plugin it would be perfect.

    That's what for the moment that I'm trying to following to help to create / modify something. https://simpl.info/getusermedia/sources/

    Where in the source you can see that there's a "optional: [{sourceId: videoSource}]" added after user choice.

    This sourceId is not even growing (1,2) but random...

    Maybe if someone find this and could help (I'm still trying to do something but I'm poor js coder).

    Regards

  • Hi Shiva,

    I've made an update of the official plugin, until we'll get the official update.

    It works through browsers, but i can't get it to work with crosswalk.

    You are welcome to try it yourself.

    https://googledrive.com/host/0B3JLq-yXZ ... media2.zip

  • Hi Lof!

    Yeah! Yes it work great on browser, but like you said not with crosswalk.

    Thanks for the share, could be really usefull!

    Regards

  • You're welcome,

    btw, this has already been implemented in the official plugin, so i suggest you use that.

  • Hi there ... any luck on this yet? I'm trying out different settings for it on my Galaxy S3 ... no luck so far tho. I mustve made a typo somewhere as always.

  • I'm struggling to get a choice through the browser on mobile just wondered if you could let me know which versions you're using thanks.

    I've got chrome version 35.0.1916.141 on android 4.1.1

    simpl.info works, should have tried that before this post

  • the thing is on normal browsers it sends allow / deny) to the browser and i have to click on that to choose(using the same system as the demo provided in c2). Then it shows the camera... however on mobile it doesn't send that message and it just isn't showing the camera just a black box

  • finally managed my camera to show... I just published it trough crosswalk... however... my camera is showing me blue....(on mobile) Ashley any ideas on this?

    now if I could force back camera it would be awesome.

  • The stock user media examples show how to choose cameras if it's supported. It's a relatively new feature though so I don't know if Crosswalk has picked it up yet. Does the beta build of Crosswalk support it?

    Chrome for Android should already support it.

  • im not sure, if this will work on android or ios?

    im a bit confused... Any news about Crosswalk?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi all,

    I had a similar problem, this plugin works for me though:

    it is for phonegap but it works great on crosswalk also.

  • The link is broke T.T

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