WebAPI/AudioChannels: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 40: Line 40:
   
   
   attribute boolean telephonySpeaker; // '''Not in V1''' Makes the "telephony" channel go through the speaker.
   attribute boolean telephonySpeaker; // '''Not in V1''' Makes the "telephony" channel go through the speaker.
  readonly attribute DOMString[] occupiedChannels;
  void setOccupyChannel(DOMString channel, boolean occupy);
  }
  }


Line 114: Line 117:


I'm not sure if we need to have prompts if non-privileged apps try to use channels beyond the "normal" or "content" channels.
I'm not sure if we need to have prompts if non-privileged apps try to use channels beyond the "normal" or "content" channels.
== Use cases and requirements ==
The set of use cases and requirements that we have tried to solve with the above APIs are:
Ability for the system app to do the following for the currently running apps, as well as for the browser to do for the currently running tabs:
* Show which applications/tabs are currently playing audio
* Show UI which mutes a specific app/tag
* Enable a spotify-app/tab to be treated as a music app. I.e. it should be able to get the same benefits as if it had mozaudiochannel=content. Including both the automatic muting of other content audio, as well the ability to play in the background.
* Control which application/tab gets to play audio if there are several background applications that all are attempting to use the "content" channel, but no visible app using the "content" channel.
Ability for the system app to:
* Turn down the volume of background audio rather than completely silence it when the notification channel is used
* Figure out which volume to modify when the user is pressing the volume buttons.
Ability for apps to:
* Act as if it's occupying a channel without actually using a media element playing on that channel. This is useful for example to prepare for audio which is about to start playing, or to prepare for turning on the camera.
Confirmed users
716

edits

Navigation menu