Dear Rob,

Thanks for your quickly reponse.
And that sounds straitforward and align my thought.

So maybe that is not just a new attribute but an API with callback functions.
The callback function is used to notify Web App that can this audio be played 
along.
For example:
  a. Once the other Web App is playing then current one will get success to 
play as well as notify old one to stop.
  b. Once now is on phone call then current app will get error and notify 
existing audio to stop.

To consider more on example a;
Who is responsilbe for stopping old music stream? old Web App or Gecko?
     Marco: I suggest Web App.
     Reason: If music stream is stopped by Gecko then there is an 
asynchroziation state between Ap & Gecko.
             Even that Gecko sent a event to notify old App, we can't gaurantee 
the response from App.
             In the opposite, If old App didn't response the event for stopping 
music actively, 
             the music is just mixed but not asynchronous between UI and Music.

Sincerely yours.

----- Original Message -----
From: "Robert O'Callahan" <[email protected]>
To: "Marco Chen" <[email protected]>
Cc: [email protected], "Lin Randy" <[email protected]>
Sent: 2012年10月29日 星期一 18:41:12
Subject: Re: [B2G] Policy for Audio Competing is conflict betwen B2G & Desktop

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