On Mon, Oct 29, 2012 at 11:08 PM, Marco Chen <[email protected]> wrote:

> I found there is a conflict behavior on Audio competing between B2G &
> Desktop.
> And hope can get some feedback from you. Thanks in advance.
>
>   Conflict Case:
>     User launched many pages for playing musics in the same time.
>
>   Desktop version:
>     All of the musics will be mixed together so audio stream is
> independent with each others.
>
>   B2G version:
>     Case 1: We need only one music is on playing and stop other musics
> played in early.
>             Ex: Music player is playing then start to play video. In this
> time music player should be aware to stop.
>                                                     or phone call is
> coming/outgoing
>     Case 2: The musics playing from tabs in browser would still be mixed.
>
> Solution ?
>   1. Refer to Android, it is responsibility on "Web App" to tell Gecko
> whether it needs to play along or would be mixed.
>   2. Web App needs to detect the screen off if it didn't need to keep on
> playing. (ex: game with music)
>                                  event for falling into background if it
> didn't plan to play in background.
>

Perhaps we could define an attribute on media elements, say "playOne",
where Gecko automatically ensures that at most one element with the
"playOne" attribute can play at a time. When multiple playOne elements
exist and are playing, we could allow the first playOne element in the most
recently focused browser tab or Web application to play, and temporarily
pause the others.

Just an idea. I'm sure we could choose a better name.

Rob
-- 
Jesus called them together and said, “You know that the rulers of the
Gentiles lord it over them, and their high officials exercise authority
over them. Not so with you. Instead, whoever wants to become great among
you must be your servant, and whoever wants to be first must be your
slave — just
as the Son of Man did not come to be served, but to serve, and to give his
life as a ransom for many.” [Matthew 20:25-28]
_______________________________________________
dev-media mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-media

Reply via email to