NPAPI:AudioControl: Difference between revisions
Jump to navigation
Jump to search
(Modify to reflect the flash beta push API implementation) |
|||
Line 5: | Line 5: | ||
= Contributors = | = Contributors = | ||
* Last modified: | * Last modified: June 1, 2015 | ||
* Authors: Kyle Huey (Mozilla) | * Authors: Kyle Huey (Mozilla), Benoit Girard (Mozilla) | ||
* Contributors: | * Contributors: | ||
= Changes = | |||
Modified in 2015 to be push API instead of a pull API and to use Get/SetValue. | |||
= Use case = | = Use case = | ||
Line 17: | Line 21: | ||
<pre> | <pre> | ||
NPPVpluginIsPlayingAudio = 4000 | |||
</pre> | </pre> | ||
This | This NPPVariable, when set via NPN_SetValue, will let the plugin instance signal via a BOOL if the current instance is currently playing audio. | ||
== Mute/Unmute a plugin instance == | == Mute/Unmute a plugin instance == | ||
<pre> | <pre> | ||
NPNVmuteAudioBool = 4000 | |||
</pre> | </pre> | ||
This NPNVariable, when set via NPP_SetValue, will let the browser notify the plugin that it should mute audio for the current plugin instance. | |||
= Open issues = | = Open issues = | ||
* Will we want to be able to control the volume level on a per instance basis? This seems unnecessarily complicated. | * Will we want to be able to control the volume level on a per instance basis? This seems unnecessarily complicated. |
Revision as of 23:20, 1 June 2015
Status
Drafting.
Contributors
- Last modified: June 1, 2015
- Authors: Kyle Huey (Mozilla), Benoit Girard (Mozilla)
- Contributors:
Changes
Modified in 2015 to be push API instead of a pull API and to use Get/SetValue.
Use case
The ability to mute/unmute tabs or determine which tabs are playing audio is a commonly requested feature in web browsers. This specification allows browsers to mute/unmute instances of cooperating plugins and determine which instances are playing audio. Browsers can use these APIs to implement per-tab audio control.
Proposed Specification
Determine if an instance is playing audio
NPPVpluginIsPlayingAudio = 4000
This NPPVariable, when set via NPN_SetValue, will let the plugin instance signal via a BOOL if the current instance is currently playing audio.
Mute/Unmute a plugin instance
NPNVmuteAudioBool = 4000
This NPNVariable, when set via NPP_SetValue, will let the browser notify the plugin that it should mute audio for the current plugin instance.
Open issues
- Will we want to be able to control the volume level on a per instance basis? This seems unnecessarily complicated.