Dear Rob,
For method 1:
a. Music player (or music Apps with control panel to show status) is starting
to play.
b. Phone is coming.
c. Gecko noticed a phone call then stop media stream directly (then maybe
send a event to notify corresponding App).
d. Music player (maybe not handle the event from step c) is not aware it's
music is stopped by Gecko.
Result: After phone call, user will find the time is already shifted later or
even the music is jumped to another one.
For method 2:
On the other way of just notifying the App to stop it's own music actively.
If the App still didn't handle this then
Result: Music are mixed together and user can choose to stop one of them.
Conclusion:
1. In the case of good Apps, both of two methods can achieve this requirement.
2. In the case of bad Apps, method 1 will cause user's misunderstanding on
music player is aware to stop but find asynchronous bug later.
method 2 will let user exactly know which app
didn't handle this but keep it work well.
Thanks,
Sincerely yours.
----- Original Message -----
From: "Robert O'Callahan" <[email protected]>
To: "Marco Chen" <[email protected]>
Cc: [email protected], "Lin Randy" <[email protected]>
Sent: Tuesday, October 30, 2012 6:39:41 AM
Subject: Re: [B2G] Policy for Audio Competing is conflict betwen B2G & Desktop
On Tue, Oct 30, 2012 at 4:30 AM, Marco Chen < [email protected] > wrote:
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.
I don't see a problem with having Gecko pause and resume the old music stream
automatically. Can you explain the problem in more detail?
Thanks,
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