Closed Bug 1096520 Opened 10 years ago Closed 9 years ago

[Video] Unable to put volume at max level when watching youtube video with headphones plugged in

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.1+, b2g-v2.0 affected, b2g-v2.1 verified, b2g-v2.1S fixed, b2g-v2.2 verified, b2g-master verified)

VERIFIED FIXED
2.2 S4 (23jan)
blocking-b2g 2.1+
Tracking Status
b2g-v2.0 --- affected
b2g-v2.1 --- verified
b2g-v2.1S --- fixed
b2g-v2.2 --- verified
b2g-master --- verified

People

(Reporter: SalvadorR, Assigned: evanxd)

References

()

Details

(Whiteboard: [2.1-exploratory-3])

Attachments

(5 files)

Description:
When user is watching a youtube video in fullscreen with headphones plugged in, user will not be able to max out the volume level. Occurs after flashing the device.
   
Repro Steps:
1) Update a Flame device to BuildID: 20141110001201
2) Reflash the device to the current build
3) Plug headphones in
4) Watch a youtube video and attempt to out the volume at max
5) Observe volume bar

Actual:
Volume cannot be put to max level
  
Expected: 
Volume level can be maxed
  
Environmental Variables:
Device: Flame 2.1 (319mb) KK Shallow Flash
BuildID: 20141110001201
Gaia: 0ec1925fc37b7c71d129ae44e42516a0cfb013c4
Gecko: 97487a2d1ee6
Version: 34.0 (2.1)
Firmware: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0
  
Repro frequency: 2/5
See attached: Video, Logcat
http://youtu.be/vGHEzpd3eo0
Flags: needinfo?(jmitchell)
This issue also occurs on Flame 2.0 and Flame 2.2

Result: Volume level cannot be maxed 

Flame 2.0

Device: Flame 2.0 (319mb)(Kitkat Base)(Shallow Flash)
BuildID: 20141110000204
Gaia: d3e4da377ee448f9c25f908159480e867dfb13f3
Gecko: 7198906837e7
Version: 32.0 (2.0)
Firmware: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0

Flame 2.2

Device: Flame 2.2 Master (319mb)(Kitkat Base)(Shallow Flash)
BuildID: 20141110040206
Gaia: 5f8206bab97cdd7b547cc2c8953cadb2a80a7e11
Gecko: d380166816dd
Version: 36.0a1 (2.2 Master)
Firmware: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0
QA Whiteboard: [QAnalyst-Triage?]
[Blocking Requested - why for this release]: nomming 2.1 - too late for 2.0, broken expected / basic functionality
blocking-b2g: --- → 2.1?
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell)
Could you please give this the first look on whats happening?
Flags: needinfo?(rnicoletti)
Agree in triage that this should block for reasons noted in comment #2.
blocking-b2g: 2.1? → 2.1+
Attached image volume warning
From my investigation, what happens in this scenario is our system app displays the attached dialog ("To prevent possible hearing damage, do not listen at high volume levels for long periods") when the volume is increased to a certain level. After dismissing this dialog, the user is free to continue to increase the volume.

Salvador, did you see this dialog in your testing?
Flags: needinfo?(rnicoletti) → needinfo?(srapanan)
Yes, I did see it after I pressed the home button when I was in fullscreen watching the video. The damage prevention to hearing alert will show for a brief moment and then take user to homescreen.
Flags: needinfo?(srapanan)
Assigning to Russ since he is investigating. This is most likely a system issue. Russ, please move it to the right component once you confirm that.

Thanks
Hema
Assignee: nobody → rnicoletti
Ok, the mention of "fullscreen" in comment 6 is critical to reproducing this bug. The updated STR:

1) Update a Flame device to BuildID: 20141110001201
2) Reflash the device to the current build
3) Plug headphones in
4) Open a youtube video and enable fullscreen
5) Attempt to set the volume to the maximum
5) Observe that volume bar does not go past approximately 3/4 of max
6) Press home button, observe "volume warning" dialog displays briefly

Therefore, the critical factor is whether the video is fullscreen or not. If not, the "volume warning" dialog appears and once dismissed the volume can be increased to max. When video is fullscreen, the "volume warning" dialog does not appear and volume cannot be increased past approximately three quarters of the maximum.

Alive, I'm thinking this may be a system issue. Can you advise? Thanks.
Flags: needinfo?(alive)
Component: Gaia::Video → Gaia::System
Yes, I think it's because the z-index of the custom dialog is not greater than fullscreen-ed element.

Evan, wanna to take? Should be a simple one.

Hint: see bottom of system/style/zindex.css
Flags: needinfo?(alive) → needinfo?(evanxd)
Alive, Sure.
Assignee: rnicoletti → evanxd
Flags: needinfo?(evanxd)
Looks like it is a gecko issue.
System app could not receive `volume-up-button` events after video is fullscreen on YouTube app. But it could work when we play a youtube video in fullscreen mode in Browser app.
Assignee: evanxd → nobody
Component: Gaia::System → DOM
Product: Firefox OS → Core
Gina, could you take a look?
Thanks.
Flags: needinfo?(gyeh)
I noticed this is a 2.1 blocker and mozbrowser key event is not in v2.1, so it might be another problem in platform.
Flags: needinfo?(gyeh)
Gecko doesn't know about volume-up-button events.
Looks like b2g's shell.js dispatches those.
(In reply to Olli Pettay [:smaug] from comment #14)
> Gecko doesn't know about volume-up-button events.
> Looks like b2g's shell.js dispatches those.

(It's still gecko :D)
Component: DOM → Runtime
Product: Core → Firefox OS
This is not a regression; all branches are marked as affected.
(In reply to Evan Tseng [:evanxd][:愛聞插低] from comment #11)
> Looks like it is a gecko issue.
> System app could not receive `volume-up-button` events after video is
> fullscreen on YouTube app. But it could work when we play a youtube video in
> fullscreen mode in Browser app.

Evan: did you try Alive's suggestion of just changing the z-index so that the warning dialog is visible? Even if that only fixes this bug in the browser app, at least that is a partial solution.  

The original reporter did not specify whether they were using a youtube app or were just watching a youtube video from the browser.  Comment #8 makes it sound like the volume can be adjusted up until a limit is reached. Your comment seems to indicate that no volume change up or down is possible at all, and that seems like an even worse bug than not being able to see the hearing protection dialog.
Flags: needinfo?(evanxd)
(In reply to David Flanagan [:djf] from comment #17)
> (In reply to Evan Tseng [:evanxd][:愛聞插低] from comment #11)
> > Looks like it is a gecko issue.
> > System app could not receive `volume-up-button` events after video is
> > fullscreen on YouTube app. But it could work when we play a youtube video in
> > fullscreen mode in Browser app.
> 
> Evan: did you try Alive's suggestion of just changing the z-index so that
> the warning dialog is visible? Even if that only fixes this bug in the
> browser app, at least that is a partial solution.  
Hi David,

I didn't try the suggestion, because I found out that the `volume-up-button` event issue is the root cause.

And I think changing the z-index will not work for us. The volume dialog is hidden by default, we need the volume button event listener to trigger the method[1] to set the dialog visible.

> The original reporter did not specify whether they were using a youtube app
> or were just watching a youtube video from the browser.  Comment #8 makes it
> sound like the volume can be adjusted up until a limit is reached. Your
> comment seems to indicate that no volume change up or down is possible at
> all, and that seems like an even worse bug than not being able to see the
> hearing protection dialog.

Sorry, I could not reproduce that `5) Observe that volume bar does not go past approximately 3/4 of max` in Comment 8. But in Comment 8, it said `When video is fullscreen, the "volume warning" dialog does not appear...`, and it looks like that we could not change volume at all in fullscreen mode. Then I go this way, I think the missing `volume-up-button` event is the problem.

David, how do you think?

[1] https://github.com/mozilla-b2g/gaia/blob/2ff52ba2f528d50acde945b92aa33971edc95786/apps/system/js/sound_manager.js#L985
Flags: needinfo?(evanxd)
Although the reporter did not specify they were using the youtube app or playing a video from the browser, by deduction we can prove it was from the browser because the system app can't receive volume events from youtube app when in fullscreen (which I have verified). Therefore, IMO, we should consider the youtube app issue a separate bug and that this one should focus on the "volume warning" dialog appearing behind the video when video is fullscreen and played from the browser.
(In reply to Russ Nicoletti [:russn] from comment #19)
> Although the reporter did not specify they were using the youtube app or
> playing a video from the browser, by deduction we can prove it was from the
> browser because the system app can't receive volume events from youtube app
> when in fullscreen (which I have verified). Therefore, IMO, we should
> consider the youtube app issue a separate bug and that this one should focus
> on the "volume warning" dialog appearing behind the video when video is
> fullscreen and played from the browser.

Russ, can you file a separate bug for the youtube app issue and update the bug title to reflect the volume warning issue? Who is going to work on the follow-up and who is taking this bug?
Flags: needinfo?(rnicoletti)
Attached file STR
Bug 1104170 has been created to track the YouTube app issue.

Evan, if we focus only on the use case of playing a video from the browser, I'd like to explore you're comment that "changing the z-index will not work for us. The volume dialog is hidden by default, we need the volume button event listener to trigger the method[1] to set the dialog visible." My observation is the the "volume warning" dialog is visible; it can be seen when pressing the home button to return to the home screen. This can be seen in the attached video. 

I'm including an updated STR below to be more specific about viewing the video in the browser as opposed ot in YouTube app:

1) Update a Flame device to BuildID: 20141110001201
2) Reflash the device to the current build
3) Plug headphones in
4) Open a youtube video in the browser and enable fullscreen
5) Attempt to set the volume to the maximum
5) Observe that volume bar does not go past approximately 3/4 of max
6) Press home button, observe "volume warning" dialog displays briefly

Are you able to reproduce with these STR? Does this change your opinion of the z-index solution?
Flags: needinfo?(rnicoletti)
Flags: needinfo?(evanxd)
Hi Russ,

I could not reproduce this in Build 20141110040206(Sorry, could not find out 20141110001201).

I could set the volume to the maximum in the browser playing a youtube video.
Flags: needinfo?(evanxd)
Russ, is this problem fixed for you as well?
Flags: needinfo?(rnicoletti)
The problem can be reproduced using today's latest build: 20141215040201. Evan, are you following the steps in comment 21 precisely? I have updated the STR to make them a bit more concise:

1) Flash the device to the current build
2) Plug headphones in
3) Open the browser and play a youtube video
4) Enable fullscreen
5) Attempt to set the volume to the maximum
6) Observe that volume bar does not go past approximately 3/4 of max
7) Press home button, observe "volume warning" dialog displays briefly

I have taken another video of the STR. I didn't include in the video steps 1 and 2, although they are necessary. Video is here - http://youtu.be/45F3pMTFixg
Clearing NI, see comment 24
Flags: needinfo?(rnicoletti)
Component: Runtime → AudioChannel
Hi! Steven,

Could your team help to take a look? Thanks

--
Keven
Flags: needinfo?(slee)
I tried the latest 2.1. I can reproduce this problem when using browser to open Youtube. I found that the volume level stays in 10 which is the threshold of warning message. If I cancel the warning dialog, then everything works fine. This scenario is the same as comment 8.

BTW, I don't know how to force the warning dialog to show up so that my method is to reset gaia then the dialog will appear. I can always reproduce by this method.

changeset:   221566:99cea2c818f6
tag:         tip
user:        Ryan VanderMeulen <ryanvm@gmail.com>
date:        Mon Jan 05 17:40:27 2015 -0500
summary:     No bug, Manual HPKP preload list update. a=hpkp-update
Flags: needinfo?(slee)
Assignee: nobody → evanxd
Currently, the root cause is just like Alive said in Comment 9.

And it is weird.
In one month ago, system app just could not receive the event(Comment 11).
Maybe the event issue is same as Bug 1106818?
Hi Alive,

Could you help to review the patch?

The event issue(Comment 11) is gone, currently it is only about z-index.

Thanks.
Attachment #8547415 - Flags: review?(alive)
Component: AudioChannel → Gaia::System::Window Mgmt
Attachment #8547415 - Flags: review?(alive) → review+
Wait for Gaia tree is opened, and we could land it.
Comment on attachment 8547415 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/27311

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): none.
[User impact] if declined: User could not set volume at max level when he/she watch a video at fullscreen mode.
[Testing completed]: It works on local device, and the CI works well.
[Risk to taking this patch] (and alternatives if risky): Small risk, we just changed one line css.
[String changes made]: none.
Attachment #8547415 - Flags: approval-gaia-v2.1?(bbajaj)
Keywords: verifyme
Attachment #8547415 - Flags: approval-gaia-v2.1?(bbajaj) → approval-gaia-v2.1+
Comment on attachment 8547415 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/27311



We should uplift this to 2.2 as well. Hoping the same patch applies, else NI the dev for a branch specific patch.
Attachment #8547415 - Flags: approval-gaia-v2.2+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Attached video Verify video
This problem is verified pass on Flame2.1/2.2
See attachments: Verify_video.MP4
Rate: 0/5

Flame 2.1 build:
Gaia-Rev        77c57eb8a985d5cbd34a597fb1b978ba6e205af6
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/f05d0a2d2378
Build-ID        20150120001202
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20150120.035022
FW-Date         Tue Jan 20 03:50:33 EST 2015
Bootloader      L1TC000118D0

Flame 2.2 build: 
Gaia-Rev        f5b3d1b6cfa3e702033f613915ae637cb735cbfb
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/5d7497ce4cc7
Build-ID        20150120002507
Version         37.0a2
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20150120.035540
FW-Date         Tue Jan 20 03:55:51 EST 2015
Bootloader      L1TC000118D0
This issue has been verified as fixed on the Flame 3.0

The user can turn up the volume to max while watching a youtube video without issue. 

Environmental Variables:
Device: Flame 3.0
BuildID: 20150121010204
Gaia: 5e98dc164b17fd6decb48a9eaddef0e55b82e249
Gecko: 540077a30866
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 38.0a1 (3.0) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:38.0) Gecko/38.0 Firefox/38.0
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: