Closed Bug 1207788 Opened 9 years ago Closed 9 years ago

[Flame][Gallery] If you press the homescreen button while watching a video in Landscape mode in the Gallery application the video does not pause playback

Categories

(Firefox OS Graveyard :: Gaia::Gallery, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.5+)

VERIFIED WORKSFORME
blocking-b2g 2.5+

People

(Reporter: mbryant, Unassigned)

Details

(Keywords: regression)

If you watch a video in landscape mode, hit the home button and then select the Gallery app again the video will not have paused upon leaving the application. If you do the same thing while watching a video in portrait mode the video will be paused when you resume.

* The problem can be seen in this video: https://youtu.be/hs6oDB07oiA
* A second video: https://www.youtube.com/watch?v=RkSVzylOxbo was taken while the phone was held in the air instead of being laid down flat on the table.

Phone build:

Device: Flame
Build ID               20150922030227
Gaia Revision          29991414eb94b6baa1ec2e63fdb4f6dfae05fb01
Gaia Date              2015-09-21 09:27:10
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/2235e56c94cf61614902fd3a4ac7b837f7154b97
Gecko Version          44.0a1
Firmware(Release)      4.4.2
Firmware(Incremental)  65
Firmware Date          Mon Dec 15 18:51:29 CST 2014
Bootloader             L1TC000118D0
[Blocking Requested - why for this release]:
QA wanted for branch check, and I think this is a regression that needs to be addressed - it should always pause upon exiting the Gallery app.
blocking-b2g: --- → 2.5?
Keywords: qawanted
QA Contact: sleedavid
This DOES occur on Flame 2.5. 
Result:If you watch a video in landscape mode, hit the home button and then select the Gallery app again the video will continuing playing without pausing. 

REPRO: 

Environmental Variables:
Device: Flame 2.5 kk (319mb)
BuildID: 20150923030227
Gaia: 864500d40633bbf0e9a83c92a03cea46bb901906
Gecko: 19b4265d0d568d232fb3a34705f947b6db7496dc
Gonk: c4779d6da0f85894b1f78f0351b43f2949e8decd
Version: 44.0a1 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This does NOT occur on Flame 2.2. 
Result:When played a video in landscape mode from the gallery, hit home button, went back to the gallery and the video was in pause mode, as expected. 

No REPRO on 2.2

Environmental Variables:
Device: Flame 2.2 kk (319mb)
BuildID: 20150923002638
Gaia: 5dd95cfb9f1d6501ce0e34414596ef3dd9c2f583
Gecko: 65ddad73ad6b
Gonk: bd9cb3af2a0354577a6903917bc826489050b40d
Version: 37.0 (2.2) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
QA Whiteboard: [QAnalyst-triage?]
Flags: needinfo?(jmercado)
Let's get a window here.
QA Whiteboard: [QAnalyst-triage?] → [QAnalyst-triage+]
Flags: needinfo?(jmercado)
B2G inbound window: 

Last Working

BuildID: 20150618012742
Environmental Variables:
Device: Flame 2.5
BuildID: 20150618012742
Gaia: ad8a87ddd3d255f34f5f58893010ddbaf5fa0d72
Gecko: bd7b2334924d
Gonk: c4779d6da0f85894b1f78f0351b43f2949e8decd
Version: 41.0a1 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:41.0) Gecko/41.0 Firefox/41.0

First Broken

BuildID: 20150618025743
Environmental Variables:
Device: Flame 2.5
BuildID: 20150618025743
Gaia: 7626a37ee5e4ec63a5f383897b5226f7b14135ae
Gecko: 148608189b11
Gonk: c4779d6da0f85894b1f78f0351b43f2949e8decd
Version: 41.0a1 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:41.0) Gecko/41.0 Firefox/41.0


Gaia Pushlog: 
https://github.com/mozilla-b2g/gaia/compare/ad8a87ddd3d255f34f5f58893010ddbaf5fa0d72...7626a37ee5e4ec63a5f383897b5226f7b14135ae

This issue appears to be caused by changes made in Bug 1170944
QA Whiteboard: [QAnalyst-triage+] → [QAnalyst-triage?]
Flags: needinfo?(jmercado)
No-Jun, George is inactive now.  Who should look into this?
QA Whiteboard: [QAnalyst-triage?] → [QAnalyst-triage+]
Flags: needinfo?(jmercado) → needinfo?(npark)
I think Gregor is, or at least know who to talk to.  ni?ing him.
Flags: needinfo?(npark) → needinfo?(anygregor)
This is weird. I wonder if it is related to bug 1207792. And I wonder if it is fixed by the recent change that fixed bug 1205096.
The fact that this affects landscape mode but not portrait mode seems like a pretty significant indication that this is a gecko issue or a system app issue and not a gallery issue.

It should be pretty easy to find the mozvisibilitychange event handler that is responsible for pausing the video playback and add some logging to it. Maybe that event is not being properly fired when we're in landscape.

If the video app has the same problem, then it is almost certainly the system app or gecko.  If the video app does not have the same problem but the camera app does, then it is almost certainly an issue in shared/js/media/video_player.js, and possibly a regression caused by bug 1164200.
I just tested this on flame with a build from 9/22.  I could reproduce it in Gallery, and also in Camera, but not in the Video app.  That points to a gaia regression.

Then I flashed my phone with today's nightly, and the bug does not reproduce anymore.

So I'm pretty sure that this was a regression caused by bug 1164200 and fixed by bug 1205096. Part of that regression was causing a call to pause() to not be called, so I'm now thinking that the video did not continue playing while in the background but just started up in a playing state instead of a paused state.

That doesn't match the regression range in comment 4, however. And it doesn't explain why this would only affect landscape mode and not portrait mode.  But the bug does not seem to reproduce anymore, so I guess we should close this.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
So reverting bug 1205096 does not bring this bug back, so I guess something else fixed this in the last couple of days.

Sleedavid, will you verify that this bug is actually fixed, please?
Flags: needinfo?(sleedavid)
Flags: needinfo?(anygregor)
Verified per build: 
Environmental Variables:
Device: Flame 2.5
BuildID: 20150925030204
Gaia: f1cb3089ee2a77dd779408ca86dbb5e4ed5af0b3
Gecko: e5effeb8e57ceddf679f7784faab0c2cebb1e1e6
Gonk: c4779d6da0f85894b1f78f0351b43f2949e8decd
Version: 44.0a1 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0

When starting a video in landscape mode from the gallery and then pressing the home button
the video pauses as expected. 

Verified per build: 
Environmental Variables:
Device: Aries 2.5
BuildID: 20150928133112
Gaia: 01ffe82cf088ca8fda9fe6783dc5cad2c3dde01c
Gecko: 031db40e2b558c7e4dd0b4c565db4a992c1627c8
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 44.0a1 (2.5) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0

When starting a video in landscape mode from the gallery and then pressing the home button
the video pauses as expected.
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-triage+] → [QAnalyst-triage?]
Flags: needinfo?(sleedavid) → needinfo?(jmercado)
QA Whiteboard: [QAnalyst-triage?] → [QAnalyst-triage+]
Flags: needinfo?(jmercado)
blocking-b2g: 2.5? → 2.5+
You need to log in before you can comment on or make changes to this bug.