WebAPI/AudioChannels: Difference between revisions

Line 60: Line 60:
The proposal is to add this set of new properties to the browserAPI (for simplicity in webIDL):  
The proposal is to add this set of new properties to the browserAPI (for simplicity in webIDL):  


interface BrowserAPI {
interface BrowserAPI {
  // With this it's possible to mute all the MediaElement for this mozbrowser iframe.
  // With this it's possible to mute and pause all the MediaElement for this mozbrowser iframe.
  attribute boolean audioMuted;
  attribute boolean audioMuted;
 
  // range: 0.0 to 1.0 - a custom volume
  // range: 0.0 to 1.0 - a custom volume
  attribute double audioVolume;
  attribute double audioVolume;
 
  // list of active audio channels
  // list of active audio channels
  readonly attribute DOMString[] activeAudioChannels;
  readonly attribute DOMString[] activeAudioChannels;
 
  // if this app actually playing?
  // if this app actually playing? Do we need this? Isn't this the same as activeAudioChannels.length == 0?
  readonly attribute boolean audioActive;
  readonly attribute boolean audioActive;
 
  // horrible name :(
  // horrible name :(
  // when this attribute is set to true, any normal channel will be 'converted'
  // when this attribute is set to true, any normal channel will be 'converted'
  // to content channel. This fixes the problem of the visibility.
  // to content channel. This fixes the problem of the visibility.
  // Task of the system app is to set this boolean to true before changing the visibility to false
  // Task of the system app is to set this boolean to true before changing the visibility to false
  // for the foreground app. Implementing this, we can revert all the hacks we implemented for the
  // for the foreground app. Implementing this, we can revert all the hacks we implemented for the
  // visibility and normal channels...
  // visibility and normal channels...
  attribute boolean normalAudioChannelToContent;
  attribute boolean normalAudioChannelToContent;
}
}


In addition we want to emit events when activeAudioChannels and audioActive attributes change.
In addition we want to emit events when activeAudioChannels and audioActive attributes change.
Confirmed users
716

edits