getUserMedia Video does not work on (some) Android 2.3 devices

VERIFIED FIXED in Firefox 38

Status

()

VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: cos_flaviu, Assigned: gcp)

Tracking

Trunk
mozilla38
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox38 verified)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Environment: 
Device: Samsung Galaxy R (Android 2.3.4);
Build: Nightly 38.0a1 (2015-02-04);

Steps to reproduce:
1. Go to http://mozilla.github.com/webrtc-landing/gum_test.html
2. Select video;
3. Choose 'Share' option from the doorhanger.

Expected result:
The camera starts and the video capture is visible on the screen.

Actual result:
The camera does not start.

Notes:

The following exception is thrown in logcat:
startCapture failed
java.lang.RuntimeException: No preview surface for Camera.
at org.webrtc.videoengine.VideoCaptureAndroid.access$100(VideoCaptureAndroid.java:48)
at org.webrtc.videoengine.VideoCaptureAndroid$1.run(VideoCaptureAndroid.java:188)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at org.webrtc.videoengine.VideoCaptureAndroid$CameraThread.run(VideoCaptureAndroid.java:162)
(Assignee)

Comment 1

4 years ago
Looks a bit like a 2.3 specific issue, I'll check on my Galaxy S2.
Assignee: nobody → gpascutto
Summary: getUserMedia Video does not work → getUserMedia Video does not work on (some) Android 2.3 devices
(Assignee)

Updated

4 years ago
Blocks: 1109248
(Assignee)

Comment 2

4 years ago
Created attachment 8559840 [details] [diff] [review]
Get the local preview surface (line dropped during merge)

Looks like this accidentally got deleted when merging.
Attachment #8559840 - Flags: review?(rjesup)

Updated

4 years ago
Attachment #8559840 - Flags: review?(rjesup) → review+
https://hg.mozilla.org/mozilla-central/rev/a6049d618131
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox38: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
(Reporter)

Comment 5

4 years ago
The video works correctly now, but the audio/microphone doesn't work.

Here are the logs:

02-20 14:57:36.080: I/AudioPolicyManager(101): getSituationVolume: isBTConnected:0 isHeadConnected:0
02-20 14:57:36.080: D/AudioPolicyManager(101): startOutput() output 1, stream 1, session 79
02-20 14:57:36.080: D/AudioPolicyManager(101): setOutputDevice() output 1 device 2 delayMs 0
02-20 14:57:36.080: D/AudioPolicyManager(101): setOutputDevice() setting same device 2 or null device for output 1
02-20 14:57:36.080: D/AudioHardware(101): AudioHardware pcm playback is exiting standby.++
02-20 14:57:36.080: V/AudioHardware(101): open pcm_out driver
02-20 14:57:36.080: V/AudioHardware(101): openPcmOut_l() mPcmOpenCnt: 0
02-20 14:57:36.080: V/alsa_pcm(101): pcm_open(0x00027000)
02-20 14:57:36.080: V/alsa_pcm(101): pcm_open() period sz multiplier 8
02-20 14:57:36.080: V/alsa_pcm(101): pcm_open() period cnt 4
02-20 14:57:36.080: E/libOpenSLES(2977): Cannot set recording preset: unknown or invalid preset
02-20 14:57:36.080: E/AudioTrack(130): Audio track delete
02-20 14:57:36.080: E/AudioTrack(130): stop 0xa3d18
02-20 14:57:36.080: E/AudioTrack(130): Stop complete
02-20 14:57:36.080: E/AudioTrack(130): Audio track exit start
02-20 14:57:36.080: E/AudioTrack(130): Audio track exit done
02-20 14:57:36.090: D/AudioPolicyManager(101): startOutput() output 1, stream 3, session 80
02-20 14:57:36.090: D/AudioPolicyManager(101): setOutputDevice() output 1 device 2 delayMs 0
02-20 14:57:36.090: D/AudioPolicyManager(101): setOutputDevice() setting same device 2 or null device for output 1
02-20 14:57:36.090: D/AudioPolicyManager(101): mCurDevice is 2
02-20 14:57:36.090: W/GeckoConsole(2977): [JavaScript Error: "TypeError: params.video is undefined" {file: "http://mozilla.github.io/webrtc-landing/gum_test.html" line: 205}]
02-20 14:57:36.100: D/AudioPolicyManager(101): stopOutput() output 1, stream 3, session 80
02-20 14:57:36.100: D/AudioPolicyManager(101): setOutputDevice() output 1 device 2 delayMs 0
02-20 14:57:36.100: D/AudioPolicyManager(101): setOutputDevice() setting same device 2 or null device for output 1
02-20 14:57:36.100: E/AudioTrack(2977): Audio track delete
02-20 14:57:36.100: E/AudioTrack(2977): stop 0x482a9800
02-20 14:57:36.100: E/AudioTrack(2977): Stop complete
02-20 14:57:36.100: E/AudioTrack(2977): Audio track exit start
02-20 14:57:36.100: W/WindowManager(130): Window Window{40b9b348 PopupWindow:407e4808 paused=false} destroyed surface Surface(name=PopupWindow:407e4808, identity=-1, mNativeSurface=0), session Session{40e102e8 uid 10102}
02-20 14:57:36.110: E/AudioTrack(2977): Audio track exit done
02-20 14:57:36.140: V/alsa_pcm(101): pcm_open() period_cnt 4 period_sz 1024 channels 2
02-20 14:57:36.140: W/SurfaceFlinger(130): PopupWindow:407e4808[139] is not removed from mLayerMap
02-20 14:57:36.140: V/alsa_pcm(101): pcm_open end
02-20 14:57:36.140: V/AudioHardware(101): openPcmOut_l end
02-20 14:57:36.140: V/AudioHardware(101): openMixer_l() mMixerOpenCnt: 0
02-20 14:57:36.140: V/alsa_mixer(101): mixer_open
02-20 14:57:36.140: V/alsa_mixer(101): mixer_open end
02-20 14:57:36.140: V/AudioHardware(101): openMixer_l end
02-20 14:57:36.140: V/AudioHardware(101): open playback normal
02-20 14:57:36.140: V/AudioHardware(101): write() wakeup setting route SPK
02-20 14:57:36.140: V/alsa_mixer(101): mixer_ctl_select SPK
02-20 14:57:36.210: D/AudioHardware(101): AudioHardware pcm playback is exiting standby.--
02-20 14:57:36.210: W/AudioFlinger(101): write blocked for 125 msecs, 17 delayed writes, thread 0x52970
02-20 14:57:36.400: E/AudioTrack(130): stop 0x50ecc8
02-20 14:57:36.400: D/AudioPolicyManager(101): stopOutput() output 1, stream 1, session 79
02-20 14:57:36.400: D/AudioPolicyManager(101): setOutputDevice() output 1 device 0 delayMs 0
02-20 14:57:36.400: D/AudioPolicyManager(101): setOutputDevice() setting same device 0 or null device for output 1
02-20 14:57:36.400: E/AudioTrack(130): Stop complete


Is this a different bug?
Flags: needinfo?(gpascutto)
(Assignee)

Comment 6

4 years ago
Yes, this fix was specific to video. (Audio also worked in my testing so more info would be needed anyway)
Flags: needinfo?(gpascutto)
(Assignee)

Comment 7

4 years ago
Did you file a bug for the audio issue or was it a false alarm?
Flags: needinfo?(flaviu.cos)
(Reporter)

Comment 8

4 years ago
Sorry for the delay, I logged Bug 1134991 for the audio issue.
Flags: needinfo?(flaviu.cos)
(Reporter)

Comment 9

4 years ago
Verified as fixed in build 38.0a1 (2015-02-20);
Device: Samsung Galaxy R (Android 2.3.4).
Status: RESOLVED → VERIFIED
status-firefox38: fixed → verified
You need to log in before you can comment on or make changes to this bug.