1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/AudioChannel.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + */ 1.9 + 1.10 +// AudioChannels are used by: 1.11 +// * HTMLMediaElement 1.12 +// * AudioContext (WebAudio) 1.13 +// When used, it has to throw an exception if the app tries to change the audio 1.14 +// channel type without the permission (manifest file for B2G apps). 1.15 +// The supported values are: 1.16 +// * normal (default value) 1.17 +// Automatically paused if "notification" or higher priority channel 1.18 +// is played 1.19 +// Use case: normal applications 1.20 +// * content 1.21 +// Automatically paused if "notification" or higher priority channel 1.22 +// is played. Also paused if another app starts using "content" 1.23 +// channel. Using this channel never affects applications using 1.24 +// the "normal" channel. 1.25 +// Use case: video/audio players 1.26 +// * notification 1.27 +// Automatically paused if "alarm" or higher priority channel is played. 1.28 +// Use case: New email, incoming SMS 1.29 +// * alarm 1.30 +// Automatically paused if "telephony" or higher priority channel is 1.31 +// played. 1.32 +// User case: Alarm clock, calendar alarms 1.33 +// * telephony 1.34 +// Automatically paused if "ringer" or higher priority 1.35 +// channel is played. 1.36 +// Use case: dialer, voip 1.37 +// * ringer 1.38 +// Automatically paused if "publicnotification" or higher priority 1.39 +// channel is played. 1.40 +// Use case: dialer, voip 1.41 +// * publicnotification 1.42 +// Always plays in speaker, even when headphones are plugged in. 1.43 +// Use case: Camera shutter sound. 1.44 +enum AudioChannel { 1.45 + "normal", 1.46 + "content", 1.47 + "notification", 1.48 + "alarm", 1.49 + "telephony", 1.50 + "ringer", 1.51 + "publicnotification", 1.52 +};