Open Bug 881153 Opened 11 years ago Updated 2 years ago

Cannot share the front camera and back camera across different tabs at the same time on FxAndroid

Categories

(Core :: WebRTC: Audio/Video, defect)

ARM
Android
defect

Tracking

()

REOPENED
backlog parking-lot

People

(Reporter: jsmith, Unassigned)

References

Details

Attachments

(1 file)

Build: 6/9/2013 Nightly
Device: Galaxy Nexus
OS: Android 4.2

STR

1. Go to http://mozilla.github.io/webrtc-landing/gum_test.html in tab #1
2. Request video
3. Accept permissions for the back camera
4. Go to http://mozilla.github.io/webrtc-landing/gum_test.html in tab #2
5. Request video
6. Accept permissions for the front camera

Expected

Access to the front camera should be granted to allow playing of media content from your front camera on tab #2.

Actual

A HARDWARE_UNAVAILABLE error is thrown. No camera stream is seen playing on tab #2.
gcp - Does Android even allow this? Any thoughts if we can do anything here to allow this?

Don't know if to block on this yet. Will be able to figure this out after getting gcp's input.
Flags: needinfo?(gpascutto)
Whiteboard: [getUserMedia][android-gum?]
Not a blocker for pref on.
Android doesn't allow this. I presume in your description that in step 6 you are no longer offered access to the back camera at all? (That would be the correct behavior).

I'm not sure what desktop does here but it wouldn't surprise me if it was the same.
Flags: needinfo?(gpascutto)
(In reply to Gian-Carlo Pascutto (:gcp) from comment #3)
> Android doesn't allow this. I presume in your description that in step 6 you
> are no longer offered access to the back camera at all? (That would be the
> correct behavior).

Actually you can share the same device across multiple tabs right now (aka tab #1 and tab #2 can use the back camera at the same time). You just can't use the back and front camera at the same time across different tabs.

> 
> I'm not sure what desktop does here but it wouldn't surprise me if it was
> the same.

Desktop actually does allow you to use multiple devices across different tabs. Although I'd imagine we have more fine-grained control to do this. Randell I think implemented this originally and would know more about this.

If this isn't possible, then I'll close this as a WONTFIX.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Whiteboard: [getUserMedia][android-gum?] → [getUserMedia][android-gum-]
>Actually you can share the same device across multiple tabs right now (aka tab #1 
>and tab #2 can use the back camera at the same time). You just can't use the back 
>and front camera at the same time across different tabs.

Ah, that's the other way around as I was assuming was the case. I see no reason why different tabs wouldn't be able to use different cameras. I will investigate.

>Desktop actually does allow you to use multiple devices across different tabs.

Different devices, OK. I was wondering if it was possible to use the *same* camera in different tabs on desktop. It looks to me like that wouldn't be technically impossible but require quite some extra complexity as the pages could have differing ideas about what framerate/resolution they want. It's not immediately clear to me why it even works on Android as you report, except if the existing WebRTC code just gets this right.

>If this isn't possible, then I'll close this as a WONTFIX.

It looks like I misunderstood you so I'll reopen and see what's up.
Assignee: nobody → gpascutto
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
This may be a hardware/driver bug:

I/CameraClient(  160): Opening camera 0
E/QualcommCamera(  160): int android::camera_device_open(const hw_module_t*, char const*, hw_device_t**) Mutliple camera open instances are not supported
F/libc    (  160): Fatal signal 11 (SIGSEGV) at 0x00000040 (code=1), thread 160 (mediaserver)
V/WEBRTC-JC(21445): preview frame length 497664 context-2105874432
I/DEBUG   (  155): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  155): Build fingerprint: 'google/occam/mako:4.2.2/JDQ39/573038:user/release-keys'
I/DEBUG   (  155): Revision: '11'
I/DEBUG   (  155): pid: 160, tid: 160, name: mediaserver  >>> /system/bin/mediaserver <<<
I/DEBUG   (  155): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000040
I/DEBUG   (  155):     r0 00000000  r1 00000000  r2 40867e31  r3 40865d97
I/DEBUG   (  155):     r4 40867c7d  r5 403ffce0  r6 403ffd58  r7 00000000
I/DEBUG   (  155):     r8 00000000  r9 403ffd0c  sl 000053c5  fp 40885040
I/DEBUG   (  155):     ip 00000000  sp be8958f8  lr 41417511  pc 40867188  cpsr 60000030
I/DEBUG   (  155):     d0  6f70707573207472  d1  6e65706f20617274
I/DEBUG   (  155):     d2  636e6174736e6965  d3  6e20657261207364
I/DEBUG   (  155):     d4  646f6d5f77682074  d5  202c2a745f656c75
I/DEBUG   (  155):     d6  6e6f632072616863  d7  5f7768202c2a7473
I/DEBUG   (  155):     d8  0000000000000000  d9  0000000000000000
I/DEBUG   (  155):     d10 0000000000000000  d11 0000000000000000
I/DEBUG   (  155):     d12 0000000000000000  d13 0000000000000000
I/DEBUG   (  155):     d14 0000000000000000  d15 0000000000000000
I/DEBUG   (  155):     d16 416c03e010000000  d17 3fe0000000000000
I/DEBUG   (  155):     d18 3def88eaafc0c000  d19 4012666666666666
I/DEBUG   (  155):     d20 3fe00000001f88eb  d21 3e66376972bea4d0
I/DEBUG   (  155):     d22 3f69490d4c016d23  d23 3fcadbcacffa4b75
I/DEBUG   (  155):     d24 3fe9490d4c016d23  d25 0000000000000000
I/DEBUG   (  155):     d26 0000000000000000  d27 0000000000000000
I/DEBUG   (  155):     d28 0000000000000000  d29 0000000000000000
I/DEBUG   (  155):     d30 0000000000000000  d31 0000000000000000
I/DEBUG   (  155):     scr 60000010
I/DEBUG   (  155): 
I/DEBUG   (  155): backtrace:
I/DEBUG   (  155):     #00  pc 0001e188  /system/lib/libcameraservice.so (android::CameraClient::initialize(camera_module*)+335)
On a Galaxy Tab 10.1 with Android 3.2, I don't get this (hardware) error, but we run into problems because we have a single, fixed static preview surface. Using 2 different cameras would need 2 different preview surfaces.
Patch to dynamically set up the preview surfaces. I still can't get this working reliably, the second tab shows the same video as the first tab, and the first tab stops.

It's probably not worth spending much more time on this until we can confirm that a certain device actually supports it. And with the S3 and N4 apparently not doing so, I'm going to leave this bug for now.
Assignee: gpascutto → nobody
backlog: --- → parking-lot
Whiteboard: [getUserMedia][android-gum-]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: