Closed Bug 874288 Opened 11 years ago Closed 10 years ago

[Music] After pausing music when it's not currently the foreground app (by using lockscreen/status-bar pause button, or unplugging headphones), the scrubber & track-time UI will be out-of-date until you resume the track.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g18?)

RESOLVED DUPLICATE of bug 1000214
Tracking Status
b2g18 ? ---

People

(Reporter: dholbert, Unassigned)

References

Details

(Keywords: b2g-testdriver, unagi, Whiteboard: [see possible solution in comment 1])

STR:
 1. Start playing a track in the music app.
 2. Turn off the screen (& note your current position in the track when you do so)
 3. Let a few seconds pass (or more).
 4. Unplug the headphones (which pauses the track).
 5. Turn screen back on & unlock the display.
 6.  (optional) Resume the track by hitting play button.

EXPECTED RESULTS:
 - The screen *should* show the correct paused time & scrubber-position when I unlock the screen in step 5.

ACTUAL RESULTS:
 - After you unlock the screen (step 5), the music app still has the time & scrubber-position that it showed when I turned off the screen. In other words, the scrubber UI hasn't updated to reflect the elapsed time while the screen was off.
 - When you resume the track, only *then* does it jump to the correct time.

I'm using an unagi device, with:
 Build Identifier: 20130510070207
 Update Channel: unagi/1.1.0/beta
Summary: [Music] After pausing music by disconnecting headphones with screen off, scrubber doesn't update until after you resume → [Music] After pausing music by disconnecting headphones with screen off, scrubber & track-time UI is out-of-date until you resume the track.
That's a bug really...Music app stops to listen to timeupdate when screen is off for saving power(please see bug 836214 and bug 842506), so the time text and position will not be updated until the screen is on again or music plays.

The possible solution could be when mozvisibilitychange event fires on screen on, the player can try get the currentTime of the audio element then set it back to the UI, that should fix this issue.
(In reply to Dominic Kuo [:dkuo] from comment #1)
> the time text
> and position will not be updated until the screen is on again or music plays.

s/or/and/, right?

(The time text & scrubber still aren't updated when the screen comes back on.  They only update when you hit "play")
yap, should be "screen is on and music plays", thanks for correction.
I also hit this bug if the phone's screen is off for a while, and then the music app gets paused by an incoming phone call.

When I return to the music app to resume it, after finishing the phone call, its scrubber is at an outdated position -- it shows the position from when the screen turned off, not the actual position the track is paused at.
CC'ing :evilmachines and :alive, who were involved with bug 842506, which seems like it might have caused this (or at least is related).
Blocks: 842506
Whiteboard: [see possible solution in comment 1]
Comment 1 seems right to me. If visibilitychange event isn't fired please let me know.
In B2G 1.3, you can pause the music app on the lock screen and in the status-bar dropdown, and these trigger this bug as well. (It gives you two more ways to pause the music while the Music App isn't currently being rendered to the screen.)

--> Updating summary to note that.
Summary: [Music] After pausing music by disconnecting headphones with screen off, scrubber & track-time UI is out-of-date until you resume the track. → [Music] After pausing music when it's not currently the foreground app (by using lockscreen/status-bar pause button, or unplugging headphones), the scrubber & track-time UI will be out-of-date until you resume the track.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.