[Loop] When Loop is opened in foreground , the sound is heard from the speaker when it was disconnected (same happens with headset)

RESOLVED FIXED

Status

Firefox OS
Gaia::Loop
--
critical
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: lolimartinezcr, Assigned: jaoo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Room1.1.1_TestRun1][Room1.1.1_Exploratory1][tef-triage])

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
Flame
2.0
Gecko-5f9dc54
Gaia-31d6c94
Loop version: master/51a04dd

Prerequisites:
User A logged in Mobile Loop application, has created and shared a room with User B (logged in Mobile or Desktop Loop application).

Scenario 1:
User B is joined to Room.
User A connected headset.
User A clicks in Loop application and joins to room (where is User B)

Scenario 2:
STRs:
User A connected headset.
User A clicks in "Radio" application.
User A clicks in Loop application.

Actual result:
the sound is heard from the speaker.

Expected result:
The sound is heard from headset.
(Reporter)

Updated

3 years ago
QA Whiteboard: [TEF-Track]
(Reporter)

Updated

3 years ago
Whiteboard: [Room1.1.1_TestRun1]
(Reporter)

Updated

3 years ago
Whiteboard: [Room1.1.1_TestRun1] → [Room1.1.1_TestRun1][Room1.1.1_Exploratory1]
Severity: normal → critical
Whiteboard: [Room1.1.1_TestRun1][Room1.1.1_Exploratory1] → [Room1.1.1_TestRun1][Room1.1.1_Exploratory1][tef-triage]
Assignee: nobody → crdlc
Status: NEW → ASSIGNED
Created attachment 8549554 [details] [review]
Added headset support
Attachment #8549554 - Flags: review?(carmen.jimenezcabezas)
Well, all the work for headset is done. But, there are always sadly a "but" lol. If you are joining the room without speaker, put the app in background clicking on home button and open again the app, the speaker starts magically :( ni to José.
Flags: needinfo?(josea.olivera)
Comment on attachment 8549554 [details] [review]
Added headset support

R+ with two "buts"
* We should fix the background mode problem since it was part of the bug description at comment 0 (but I agree with Cristian that we can fix this in another bug)
* I would like refactoring all the copied code from the conversation UI so instead of copying the code on both UIs we only have a single copy of the code. This is not critical though since there's not that much code and (I hope) it won't change much.
Attachment #8549554 - Flags: review?(carmen.jimenezcabezas) → review+
Attachment #8549554 - Attachment description: Github pull request → Added headset support
Added support for headset in master:

https://github.com/mozilla-b2g/firefoxos-loop-client/commit/8d80b1d248e6c9a7efda3df6f64bed945e4a0a6c

We haven't got this feature in Rooms
Assignee: crdlc → nobody
Summary: [Loop] When Loop is opened in foreground and headset is connected, the sound is heard from the speaker → [Loop] When Loop is opened in foreground , the sound is heard from the speaker when it was disconnected (same happens with headset)
Now, when headset are supported in FX Hello, we can the same problem:

1) You are in a audio room with the speaker disconnected or headset plugged without speaker
2) Click home button
3) Go to FX Hello again
4) Speaker sounds magically although it was disconnected

It doesn't seem to be under our umbrella, I mean, we are using the MozSpeakerManager maybe the problem is there or in Tokbox or who knows... Do you have any thought about this José?
Status: ASSIGNED → NEW
(Assignee)

Updated

3 years ago
Assignee: nobody → crdlc
Flags: needinfo?(josea.olivera)
Assignee: crdlc → nobody
José, with headset is always reproducible, without them sometimes
(Assignee)

Comment 7

3 years ago
(In reply to Cristian Rodriguez (:crdlc) from comment #5)
> Now, when headset are supported in FX Hello, we can the same problem:
> 
> 1) You are in a audio room with the speaker disconnected or headset plugged
> without speaker
> 2) Click home button
> 3) Go to FX Hello again
> 4) Speaker sounds magically although it was disconnected
> 
> It doesn't seem to be under our umbrella, I mean, we are using the
> MozSpeakerManager maybe the problem is there or in Tokbox or who knows... Do
> you have any thought about this José?

Still trying to figure out what's going on here. The SpeakerManager API has a quite interesting set of behaviors. One of them (see [1]) might be the cause of the issue reported in this bug.

[1] https://mxr.mozilla.org/mozilla-central/source/dom/speakermanager/SpeakerManager.h#39
(Assignee)

Comment 8

3 years ago
Created attachment 8550411 [details] [review]
Pointer to Github PR https://github.com/mozilla-b2g/firefoxos-loop-client/pull/466

Follow-up. This patch should fix the issue. Cristian, would you mind to have a look please? Thanks!
Attachment #8550411 - Flags: review?(crdlc)
Comment on attachment 8550411 [details] [review]
Pointer to Github PR https://github.com/mozilla-b2g/firefoxos-loop-client/pull/466

LGTM. Left some comments in github. Please try to explain me the rationale of this patch because I don't understand the problem. Was it due to instantiate twice the mozSpeakerManager? Thanks a lot José
Attachment #8550411 - Flags: review?(crdlc) → review+
Assignee: nobody → josea.olivera
Status: NEW → ASSIGNED
Follow-up landed on master branch at:

https://github.com/mozilla-b2g/firefoxos-loop-client/commit/3bb7b728f75356612c393874c0fafa4efce5fb4f
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Comment 11

3 years ago
Hi Jose Antonio, Cristian,

I am able to reproduce this bug using fire E 2.0 and loop 1.1.1/d4d6d7.
Also, I would add a new scenario:

-User A with headset connected has created and shared a room with user B, user A is in the room (although it is reproducible also when user A is not in the room when user B joins)
-User A is listening to the radio
-User B joins the room and user A receives the notification 
-User A taps on the notification -> The radio starts listening through the speaker.

Should I re-open this bug or create a new one? Thanks!
if this a new scenario I would prefer another one, but I would like to know the Jose's opinion
Flags: needinfo?(josea.olivera)
IHMO this is another issue so we should file another bug and figure out what's happening here. Isabel, file that bug and assign it to me please. Thanks!
Flags: needinfo?(josea.olivera) → needinfo?(isabelrios)

Comment 14

3 years ago
Thanks for your comments guys!
New bug already open Bug 1126234
Flags: needinfo?(isabelrios)
You need to log in before you can comment on or make changes to this bug.