NPAPI:AudioControl: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (typo)
(On the mailing list I suggested that if this is needed it can be proposed at a later time)
Line 33: Line 33:


This NPNVariable, when set via NPP_SetValue, will let the browser notify the plugin that it should mute audio for the current plugin instance.
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.

Revision as of 15:50, 10 June 2015

Status

Drafting.

Contributors

  • Last modified: June 1, 2015
  • Authors: Kyle Huey (Mozilla), Benoit Girard (Mozilla)
  • Contributors:

Changes

Modified in 2015 to be a 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.