Closed Bug 826048 Opened 10 years ago Closed 5 years ago

Audio pauses for when grooveshark not foreground in browser and browser bookmark


(Firefox OS Graveyard :: General, defect)

Not set



blocking-basecamp -


(Reporter: jdm, Unassigned)



1. open up in browser, play a song
2. return to homescreen, notice music stops
3. make a homepage bookmark for, load it up and play a song
4. return to homescreen, notice music stops

I can see an argument for the behaviour of #2, but #4 makes me particularly sad.
This sounds like bug 820704.  What build are you testing with?
Custom build, but I'm pretty sure it's everything tip. I'll confirm.
Flags: needinfo?(josh)
It turns out I was on a partially out of date repo, but I pulled, synced, built, and flashed, and I can still reproduce the same problem.
Flags: needinfo?(josh)
The default audio channel for a media element is 'normal' and, with 'normal', if the app is not visible, the media element is muted. Some app can use 'content' as audio channel, and then they can play also when not visible.

The problem here is not easy to know if the 'type' of media element is a content, or just generic audio element (== normal). What about if this app is a game? or it has some media element for effects?

Maybe we can have a whitelist...
Jonas, feedback?
Flags: needinfo?(jonas)
Hi Jonas, 
Do we want to allow browser html5 content to playback on the background?
I am the user of Grooveshark too...

Any browser app page or adding it to the homescreen doesn't change the fact that:
* It doesn't have the permission to use content channel(in manifest)
* It doesn't change mozAudioChannelType in his code because we invented this recently.

I personally would like to see a music site could be playing background.
This is something that I do think we want to add support for, but not in v1.

Like you point out, there are several problems preventing this from working right now.

Putting security aside, at the very least we would need a way for the user to flag that a particular page should not be silenced when the user switches away from the page. This requires both API for configuring the page, and UI for using doing that configuration.

If we did that, then security isn't really a problem since if the user has chosen to enable a page to play in the background, then we can trust that that is fine.

I don't know exactly what the APIs for messing with this would look like. Depends on if we want to enable this for pages in the browser, or if we should require a page to be bookmarked to the homescreen for this to work.

But this is definitely out of scope for v1. Let's chat about it once we start working on v2.
blocking-basecamp: ? → -
Flags: needinfo?(jonas)
This bug can be marked as dup of 832665.
Depends on: 832665
This also happens when Grooveshark is launched from (which is a bookmark somehow, right?).
Too fast clicking the submit ... Would it be possible that the's Grooveshark link/bookmark comes with the special permission audio-channel-content ? As far as I've read code and understand it, it's supposed to allow the application to keep playing music while in background.
Depends on: 853101
Firefox OS is not being worked on
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.