Closed Bug 994456 Opened 11 years ago Closed 11 years ago

WebRTC doesn't work in Android WebApps

Categories

(Core :: WebRTC, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31
Tracking Status
firefox29 --- fixed
firefox30 --- fixed
firefox31 --- fixed

People

(Reporter: wesj, Assigned: wesj)

Details

Attachments

(1 file)

Using the app at http://weary-use-940.appalot.me/install.html webrtc seems to fail with: D/WEBRTC (13486): VideoCaptureDeviceInfoAndroid D/WEBRTC (13486): Camera 0, Facing back, Orientation 90 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 1920, height: 1080 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 1280, height: 720 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 960, height: 720 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 800, height: 480 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 720, height: 480 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 640, height: 480 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 576, height: 432 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 480, height: 320 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 352, height: 288 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 320, height: 240 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 240, height: 160 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 176, height: 144 D/WEBRTC (13486): Camera 1, Facing front, Orientation 270 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 1280, height: 720 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 960, height: 720 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 800, height: 480 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 720, height: 720 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 720, height: 480 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 640, height: 480 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 576, height: 432 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 480, height: 320 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 320, height: 320 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 352, height: 288 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 320, height: 240 V/WEBRTC (13486): VideoCaptureDeviceInfo , maxFPS: 31, width: 176, height: 144 D/WEBRTC (13486): AllocateCamera Camera 0, Facing back, Orientation 90 V/WEBRTC (13486): AllocateCamera - creating VideoCaptureAndroid E/WEBRTC-JC(13486): VideoCaptureAndroid enableCameraView exception: null D/WEBRTC-JC(13486): StartCapture width 800 height 480 frame rate 31 D/WEBRTC-JC(13486): tryStartCapture 800 height 480 frame rate 31 isCaptureRunning false isSurfaceReady false isCaptureStarted true D/WEBRTC-JC(13486): StopCapture The real exceptions here are hidden, so its a bit hard to diagnose from this. Still trying to figure out how we now get apps to run in local builds, but wanted to make sure this was filed. Maybe someone on the webrtc team will know quickly whats up?
Flags: needinfo?(gpascutto)
That log looks normal to me. Could it be a problem with the permission prompts not working for webapps?
Flags: needinfo?(gpascutto)
The prompts appear and seem fine. Its the: E/WEBRTC-JC(13486): VideoCaptureAndroid enableCameraView exception: null The worried me mostly.
Oh oops, missed that. Okay, the problem is likely this: there needs to be a preview surface in the Android app before it can use the Android camera. This is required at least on pre-ICS. I don't remember if we hacked the code to make it work without it post-ICS, but in any case Firefox itself supplies the preview surface.
Attached patch PatchSplinter Review
This moves this layout into the shared components so that webapps will have it. It also makes it a generic FrameLayout, since RelativeLayouts can be more expensive.
Attachment #8404811 - Flags: review?(gpascutto)
Comment on attachment 8404811 [details] [diff] [review] Patch Review of attachment 8404811 [details] [diff] [review]: ----------------------------------------------------------------- Assume you tested that WebRTC still works both pre and post-ICS etc...
Attachment #8404811 - Flags: review?(gpascutto) → review+
Comment on attachment 8404811 [details] [diff] [review] Patch [Approval Request Comment] Bug caused by (feature/regressing bug #): Webrtc general User impact if declined: Webrtc can't work in Webapps at all. Since we're pushing SynthApks for 29, we might want this here. Testing completed (on m-c, etc.): Landed on mc this week. Tested on two devices locally. Risk to taking this patch (and alternatives if risky): Pretty small change. Just moving some (invisible) views around so that they're shared in both UI's. No good alternatives that I know of, besides just saying that webrtc is busted in 29. String or IDL/UUID changes made by this patch: none.
Attachment #8404811 - Flags: approval-mozilla-beta?
Attachment #8404811 - Flags: approval-mozilla-aurora?
(In reply to Wesley Johnston (:wesj) from comment #7) > Testing completed (on m-c, etc.): Landed on mc this week. Tested on two > devices locally. I don't see it in mc. Are you sure?
Assignee: nobody → wjohnston
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Wesj, can you check if the camera keeps working when the app is resumed/restored/rotated? Specifically, whether GeckoAppShell.AppStateListener is implemented/handled by webapps?
Flags: needinfo?(wjohnston)
Attachment #8404811 - Flags: approval-mozilla-beta?
Attachment #8404811 - Flags: approval-mozilla-beta+
Attachment #8404811 - Flags: approval-mozilla-aurora?
Attachment #8404811 - Flags: approval-mozilla-aurora+
Keywords: verifyme
Wesley, is this issue applicable also for Desktop Firefox? If yes, could you please provide str? The app from comment 0 is not helpful.
No. This should be Android only AFAIK.
Flags: needinfo?(wjohnston)
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: