michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: */ michael@0: michael@0: interface AudioChannelManager : EventTarget { michael@0: /** michael@0: * Indicates whether the headphones are plugged in or not. michael@0: */ michael@0: readonly attribute boolean headphones; michael@0: michael@0: /** michael@0: * Fired when the headphones are plugged or unplugged. michael@0: * michael@0: * When the headphones are unplugged, we may start playing audio through the michael@0: * system's speakers. Similarly, when headphones are plugged in, we may michael@0: * switch audio from speakers to headphones. michael@0: * michael@0: * If audio is currently playing in this window or in one of its children, we michael@0: * will fire this event before we switch the audio output from headphones to michael@0: * speakers (or vice versa). This allows you to, for example, pause your michael@0: * window's audio when the headphones are unplugged. michael@0: */ michael@0: attribute EventHandler onheadphoneschange; michael@0: michael@0: /** michael@0: * Indicates which audio channel is used to adjust volume when pressing HW michael@0: * volume keys. michael@0: */ michael@0: attribute DOMString volumeControlChannel; michael@0: };