UserMedia (camera) on Android

0 favourites
  • 8 posts
From the Asset Store
Simple and easily editable template for a dynamic camera that zooms in and out based on how far apart the players are.
  • Is UserMedia usable on Android or only meant for webcams? The only examples are for webcam. I've done some simple test code and run on Android, and for starters I get multiple "On retrieved media sources" triggers for a single call of "Get media devices". I would've expected one. Thanks for any help.

  • I use it on my phone (android). The issue, is, sorry been awhile, is the source. Your phone generally has 2 camera's. You have to select the correct one.

    Um, I think it is called request camera, then select source 0 as front camera, well that is what I did.

    I made a small handheld mirror for my sister in-law so she could put on makeup.

  • I use it on my phone (android). The issue, is, sorry been awhile, is the source. Your phone generally has 2 camera's. You have to select the correct one.

    Um, I think it is called request camera, then select source 0 as front camera, well that is what I did.

    I made a small handheld mirror for my sister in-law so she could put on makeup.

    haha nice Thanks for responding. Yeah I got the whole process but I was wondering why there are so many triggers. Anyway I've since got it working on my phone to the point where I evaluate the front/back cameras and take a photo so I guess that's good! Although having to get the user to 'Allow' the camera is annoying.

    edit: what's happening is that it triggers 4 times, each time retrieving 0 cameras, then the 5th time it retrieves 1 then the 6th time it retrieves both cameras sucessfully. So somehow it seems to need lots of attempts..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Although having to get the user to 'Allow' the camera is annoying.

    edit: what's happening is that it triggers 4 times, each time retrieving 0 cameras, then the 5th time it retrieves 1 then the 6th time it retrieves both cameras sucessfully. So somehow it seems to need lots of attempts..

    Yip, the permissions is annoying. Wish we could have user select it via options or something an have it by pass that pop up.

    Triggers 4 times, strange? I can't say I've noticed that. But, I haven't looked at it for awhile.

  • > Although having to get the user to 'Allow' the camera is annoying.

    >

    > edit: what's happening is that it triggers 4 times, each time retrieving 0 cameras, then the 5th time it retrieves 1 then the 6th time it retrieves both cameras sucessfully. So somehow it seems to need lots of attempts..

    >

    Yip, the permissions is annoying. Wish we could have user select it via options or something an have it by pass that pop up.

    Might actually be a deal-breaker for my app, I can imagine users wondering why other camera apps don't make them do that every time...

    Do you, or anyone, have knowledge of any 3rd party camera plugins? I found one that it seems it doesn't work and is unsupported, and anyway it's for CocoonJS.

    https://www.scirra.com/forum/plugin-mobile-camera-cocoonjs_t109624

  • That cranberry guy has one for phonegap

  • Thanks

  • someone can help me I want to use usermedia the camera in android exporting by the cocoonjs more qaundo exported in the wheel?

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