- From: Max Froumentin via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 17 Dec 2009 12:09:13 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/system-info In directory hutz:/tmp/cvs-serv14651 Modified Files: Overview.html Log Message: - fixed examples - gathered all DCO issues into one - readded Audio Index: Overview.html =================================================================== RCS file: /sources/public/2009/dap/system-info/Overview.html,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Overview.html 16 Dec 2009 13:04:44 -0000 1.42 +++ Overview.html 17 Dec 2009 12:09:11 -0000 1.43 @@ -155,15 +155,14 @@ <h2>API Description & Properties</h2> <section> - <h2>Properties</h2> + <h2>System Properties</h2> <p>A <dfn>property</dfn> is defined as a set of related device characteristics. For instance, the <a>PowerState</a> property - contains all the characteristics that concern the device's - electrical power supply. Properties are accessible through the - use of the functions defined by the <a>SystemInfo</a> - interface below. A property is characterized by the following - elements:</p> + contains all the characteristics that relate to the device's + electrical power supply. Properties are accessible using the + functions defined by the <a>SystemInfo</a> interface below. A + property is characterized by the following elements:</p> <ul> <li>A name</li> @@ -190,10 +189,6 @@ <p class="issue">window.systeminfo.* instead? Pending WG decision. See <a href="http://www.w3.org/mid/355A518BC0575547B2A3D6773AAF8EEF73A1A0@ftrdmel1">thread</a></p> - <p class="issue">Should all properties be readonly?</p> - - <p class="issue">Sequences or arrays?</p> - <dl title='[NoInterfaceObject] interface SystemInfo' class='idl'> <dt>PendingOp get(DOMString propertyId, SuccessCB successCallback, optional ErrorCB? errorCallback, optional Options options)</dt> <dd> @@ -383,7 +378,7 @@ <dt>attribute DOMString id</dt> <dd>Some of the properties below are labeled as - <em>enumerable</em>, meaning that more than one instance of + <dfn>enumerable</dfn>, meaning that more than one instance of the property's value type exist on the system. For instance, a multi-processor system would report as many instances of <a>Cpu</a> as the number of processors. In order to @@ -411,23 +406,20 @@ <section> <h4>ECMAScript Example</h4> - <pre class="sh_javascript example"> - var success = function(power) { - alert("Low battery level: "+power.level); - }; - navigator.device.system.watch("PowerState",success,null,{lowThreshold:0.2});</pre> + <pre class="sh_javascript example">// Alert the user when the power level is below 20% +navigator.system.watch("PowerState",success,null,{lowThreshold:0.2}); - <p class="issue">fix examples</p> +function success(power) { + alert("Low battery level: "+power.level); +};</pre> </section> <section> <h4>The <a>PowerState</a> Property</h4> <p>This property reflects the state of general state of the system's power sources</p> - <ul> - <li>Name: <code>PowerState</code></li> - <li>Enumerable: no</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <li class="issue">Find the corresponding DCO properties everywhere</li> + <dl title="[NoInterfaceObject] interface PowerState" class="idl"> <dt>readonly attribute float? level</dt> @@ -456,7 +448,7 @@ currently powered by an internal source. </dd> - <dt>readonly attribute sequence<PowerSource> sources</dt> + <dt>readonly attribute PowerSource sources[]</dt> <dd>A list of all the power sources connected to this device.</dd> </dl> @@ -464,13 +456,7 @@ <section> <h4>The <a>PowerSource</a> Property</h4> - <p>This property describes the state of a single power source connected to the system</p> - <ul> - <li>Name: <code>PowerSource</code></li> - <li>Enumerable: yes</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> - + <p>This property describes the state of a single power source connected to the system. It is <a>enumerable</a>.</p> <dl title="[NoInterfaceObject] interface PowerSource" class="idl"> <dt>const unsigned short TYPE_UNKNOWN=0</dt> @@ -511,17 +497,17 @@ <section> <h2>CPU</h2> <p>This section defines a set of APIs that expose the system's CPU information, including type, specifications, current system load - information</p> + information.</p> <section> <h4>ECMAScript Example</h4> - <pre class="sh_javascript example">//Monitor and display the CPU load + <pre class="sh_javascript example">//Monitor and display the CPU load, and each CPU's frequency navigator.device.system.watch("CpuState",success); function success(cpu) { - var s="CPU STATUS. Global load: "+cpu.load+" - "; - for (var i=0;i<cpu.units;i++) { - s+="CPU #"+i+": "+cpu.units[i].currentFrequency+" MHz"; + var s="CPU Status. Overall load: "+cpu.load+" - "; + for (var i=0;i<cpu.units.length;i++) { + s+="CPU #"+i+": "+cpu.units[i].currentFrequency+" MHz, "; } document.getElementById("cpuIndicator").innerHTML=s; }</pre> @@ -530,11 +516,6 @@ <section> <h4>The <a>CpuState</a> Property</h4> <p>This property reflects the state of a single CPU available on the system</p> - <ul> - <li>Name: <code>CpuState</code></li> - <li>Enumerable: no</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> <dl title="[NoInterfaceObject] interface CpuState" class="idl"> <dt>readonly attribute float load</dt> @@ -545,17 +526,15 @@ threshold parameter used in a <a>watch</a> function to monitor this property applies to this attribute. </dd> - <dt>readonly attribute sequence<Cpu> units</dt> + <dt>readonly attribute Cpu units[]</dt> <dd>The list of available CPUs</dd> </dl> </section> <section> <h4>The <a>Cpu</a> Property</h4> - <ul> - <li>Name: <code>Cpu</code></li> - <li>Enumerable: yes</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property contains the data pertaining to a single CPU on the system. It is <a>enumerable</a>.</p> + <dl title="[NoInterfaceObject] interface Cpu" class="idl"> <dt>readonly attribute DOMString info</dt> <dd>A free-form string describing this CPU</dd> @@ -584,32 +563,32 @@ This attribute indicates the minimum working frequency of this CPU (in MHz). </dd> </dl> + </section> </section> <!--******************** /CPU **********************************--> - <!--******************* Temperature *******************************************--> + <!--******************* Temperature ****************************--> <section> <h2>Internal Temperature</h2> - <p>The properties described in this section expose the system's internal temperature state</p> + <p>The properties described in this section expose the + system's temperature, as reported to the various internal + thermometers.</p> <section> <h4>ECMAScript Example</h4> - <pre class="sh_javascript example">// Display the temperatire of the first thermometer + <pre class="sh_javascript example">// Display the temperature of the first thermometer navigator.device.system.get("ThermalState",success); function success(thermal) { - document.getElementById("tempIndicator").innerHTML=("Current Temperature #1: "+thermal.thermometers[0].temperature); + document.getElementById("tempIndicator").innerHTML="Thermometer #1: "+thermal.thermometers[0].temperature; };</pre> </section> <section> <h4>The <a>ThermalState</a> property</h4> - <ul> - <li>Name: <code>ThermalState</code></li> - <li>Enumerable: no</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information on the global temperature state of the system</p> <dl title="[NoInterfaceObject] interface ThermalState" class="idl"> <dt>readonly attribute float status</dt> @@ -628,12 +607,7 @@ </section> <section> <h4>The <a>Thermometer</a> property</h4> - <p>This property exposes the state of a single internal thermometer available to the system.</p> - <ul> - <li>Name: <code>Thermometer</code></li> - <li>Enumerable: yes</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + <p>This property exposes the state of a single internal thermometer available to the system. It is <a>enumerable</a></p> <dl title="[NoInterfaceObject] interface Thermometer" class="idl"> <dt>readonly attribute DOMString info</dt> @@ -652,11 +626,6 @@ <section> <h4>The <a>CoolingSystem</a> property</h4> <p>This property exposes the overall state of the system's active cooling devices (e.g. fans or pumps)</p> - <ul> - <li>Name: <code>CoolingSystem</code></li> - <li>Enumerable: no</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> <dl title="[NoInterfaceObject] interface CoolingSystem" class="idl"> <dt>readonly attribute float value</dt> @@ -675,11 +644,8 @@ </section> <section> <h4>The <a>CoolingDevice</a> property</h4> - <ul> - <li>Name: <code>thermal:coolingDevice</code></li> - <li>Enumerable: yes</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information on a single cooling device in the system. It is <a>enumerable</a></p> <dl title="[NoInterfaceObject] interface CoolingDevice" class="idl"> <dt>const unsigned short TYPE_UNKNOWN=0</dt> @@ -721,26 +687,32 @@ <section> <h4>ECMAScript Example</h4> - <pre class="sh_javascript example">// Display the current WiFi signal strength -navigator.device.system.watch("CurrentConnection",success,null); + <pre class="sh_javascript example">// Find if the system has a WiFi connection, if so monitor its signal +// First, find the first WiFi interface on the system +navigator.system.get("Connection",success,null); function success(connection) { - var net = connection.currentBearer; - if(net && net.type===net.WI_FI) - document.getElementById("Wireless adaptor connected to "+net.essid+" at "+(net.signalStrength*100)+"%"); + var nets = connection.availableConnections; + for (var i=0;i<nets.length;i++) { + if (nets[i].type===nets[i].TYPE_IEEE802_11) { + // we found a wifi connection, watch it + navigator.system.watch("Connection",wifiWatchCB,null,{id: nets[i].id}); + } + } +} + +function wifiWatchCB(connection) { + document.getElementById(indicator, "Wireless "+connection.essid+" at "+(connection.signalStrength*100)+"%"); }</pre> </section> <section> - <h4>The <a>CurrentConnection</a> Property</h4> - <ul> - <li>Name: <a>CurrentConnection</a></li> - <li>Enumerable: no</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + <h4>The <a>Connection</a> Property</h4> - <dl title='[NoInterfaceObject] interface CurrentConnection' class='idl'> - <dt>readonly attribute float? signalStrength</dt> + <p>This property provides information on the system's connection to the network</p> + + <dl title='[NoInterfaceObject] interface Connection' class='idl'> + <dt>readonly attribute float? currentSignalStrength</dt> <dd>This connection's signal strength. This value MUST be <code>null</code> if this connection is wired.</dd> <dt>readonly attribute unsigned int currentDownloadBandwidth</dt> @@ -762,18 +734,17 @@ <dt>readonly attribute Connection activeConnection</dt> <dd>The current active connection among the ones reported by the <a>availableConnections</a> attribute.</dd> - <dt>readonly attribute sequence<Connection> availableConnections</dt> + <dt>readonly attribute Connection availableConnections[]</dt> <dd>A list of all the connections available to this system.</dd> </dl> </section> <section> <h4>The <a>Connection</a> property</h4> - <ul> - <li>Name: <code>Connection</code></li> - <li>Enumerable: yes</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information on a single network + connection available to the system. It is + <a>enumerable</a>.</p> <dl title="[NoInterfaceObject] interface Connection" class="idl"> <dt>const unsigned short TYPE_UNKNOWN = 0</dt> @@ -838,7 +809,7 @@ <dt>readonly attribute DOMString id</dt> <dd>A free-form string identifying this connection. The value of this element MUST be unique within the list - reported in a <a>CurrentConnection</a> object.</dd> + reported in a <a>Connection</a> object.</dd> <dt>readonly attribute unsigned int minDownloadBandwidth</dt> <dd>This property represents the min download bandwidth @@ -882,22 +853,19 @@ <section> <h4>ECMAScript Example</h4> - <pre class="sh_javascript example">// adjust the display brightness if too low -navigator.device.system.get("Display",success,null); + <pre class="sh_javascript example">// adjust the display brightness if it is too low +navigator.device.system.get("Display", success, null); function success(display) { - var brightness = display.brightness; - if(brightness <= 0.2) - navigator.device.system.set("Display", {brightness: 0.8}, success2); - }</pre> + if (display.brightness <= 0.2) + navigator.device.system.set("Display", {brightness: 0.8}, adjustCallback); +}</pre> </section> <section> <h4>The <a>Display</a> Property</h4> - <ul> - <li>Name: <code>Display</code></li> - <li>Enumerable: no</li> - </ul> + + <p>This property provides information on the display available on this system</p> <dl title='[NoInterfaceObject] interface Display' class='idl'> <dt>const unsigned short ORIENTATION_UNKNOWN = 0</dt> @@ -922,7 +890,7 @@ <dt>readonly attribute DisplayDevice activeDevice</dt> <dd>The display currently in use</dd> - <dt>readonly attribute sequence<DisplayDevice> devices</dt> + <dt>readonly attribute DisplayDevice devices[]</dt> <dd>The sequence of all the available display devices</dd> </dl> @@ -935,10 +903,8 @@ <section> <h4>The <a>DisplayDevice</a> property</h4> - <ul> - <li>Name: <code>DisplayDevice</code></li> - <li>Enumerable: yes</li> - </ul> + + <p>This property exposes information on a single display device available to the system. Is it <a>enumerable.</a></p> <p>The <a>DisplayDevice</a> interface defined below inherits from the <a>Screen</a> interface as defined in [[!CSSOM-VIEW]]</p> @@ -947,7 +913,7 @@ <dd>A free-form string describing this device</dd> <dt>readonly attribute DOMString id</dt> - <dd>A free-form string identifying this connection. The value of this element MUST be unique within the list reported in a <a>CurrentConnection</a> object.</dd> + <dd>A free-form string identifying this device. The value of this element MUST be unique within the list reported in a <a>Display</a> object.</dd> <dt>readonly attribute unsigned int dotsPerInchW</dt> <dd>Resolution of this device, along its width, in dots per inch.</dd> @@ -975,12 +941,11 @@ <section> <h4>ECMAScript Example</h4> <pre class="sh_javascript example">// Adjust the screen's brightness if the ambient brightness is above a certain level -navigator.device.system.watch("AmbientLight",success,{maxThreshold: 0.9}); +navigator.device.system.watch("AmbientLight",success, {maxThreshold: 0.9}); -function success(brightnessLevel) { - navigator.device.system.set("Display",{screen:brightness: 0.4}); -} - </pre> +function success() { + navigator.device.system.set("Display",{brightness: 0.4}); +}</pre> </section> <!-- ==== Ambient Light ==== --> @@ -988,26 +953,22 @@ <h4>Ambient Light</h4> <section> <h5>The <a>AmbientLight</a> Property</h5> - <ul> - <li>Name: <code>AmbientLight</code></li> - <li>Enumerable: no</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information about the global level of ambient light around the device.</p> + <dl title="[NoInterfaceObject] interface AmbientLight" class="idl"> - <dt>readonly attribute float value</dt> + <dt>readonly attribute float intensity</dt> <dd>A normalised value representing the overall ambient light around the device. The way this value is determined should be an implementation-defined combination of the values reported by each ambient light sensor available.</dd> - <dt>readonly attribute sequence<AmbientLightSensor> sensors</dt> + <dt>readonly attribute AmbientLightSensor sensors[]</dt> <dd>The list of all ambient light sensors available to this device</dd> </dl> </section> <section> <h5>The <a>AmbientLightSensor</a> Property</h5> - <ul> - <li>Name: <code>AmbientLightSensor</code></li> - <li>Enumerable: yes</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information about a single external light sensor available to the system. It is <a>enumerable</a>.</p> + <dl title="[NoInterfaceObject] interface AmbientLightSensor" class="idl"> <dt>readonly attribute DOMString info</dt> <dd>A free-form string describing this device.</dd> @@ -1017,6 +978,8 @@ <dd>The luminance measured by this device, in candelas per square metre (cd/m<sup>2</sup>)</dd>. <dt>readonly attribute float maxLuminance</dt> <dd>The maximum luminance that this device can report, in candelas per square metre (cd/m<sup>2</sup>)</dd>. + <dt>readonly attribute float minLuminance</dt> + <dd>The minimum luminance that this device can report, in candelas per square metre (cd/m<sup>2</sup>)</dd>. </dl> </section> </section> @@ -1027,25 +990,21 @@ <h4>Ambient Noise</h4> <section> <h5>The <code>AmbientNoise</code> property</h5> - <ul> - <li>Name: <code>AmbientNoise</code></li> - <li>Enumerable: no</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information about the global level of ambient noise around the device.</p> + <dl title="[NoInterfaceObject] interface AmbientNoise" class="idl"> <dt>readonly attribute float value</dt> - <dd>A normalized value representing the overall ambient noise around the device</dd> - <dt>readonly attribute sequence<AmbientNoiseSensor> sensors</dt> + <dd>The ambient noise around the device, in decibels (dB), computed from the data provided by each sensor. </dd> + <dt>readonly attribute AmbientNoiseSensor sensors[]</dt> <dd>The list of all ambient noise sensors connected to this device.</dd> </dl> </section> <section> <h5>The <a>AmbientNoiseSensor</a> property</h5> - <ul> - <li>Name: <code>AmbientNoiseSensor</code></li> - <li>Enumerable: yes</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information about a single ambient noise sensor available to the system. It is <a>enumerable.</a></p> + <dl title="[NoInterfaceObject] interface AmbientNoiseSensor" class="idl"> <dt>readonly attribute DOMString info</dt> <dd>A free-form string describing this device.</dd> @@ -1067,18 +1026,16 @@ <h4>Ambient Temperature</h4> <section> <h5>The <a>AmbientTemperature</a> Property</h5> - <ul> - <li>Name: <code>AmbientTemperature</code></li> - <li>Enumerable: no</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information about the temperature around the device.</p> + <dl title="[NoInterfaceObject] interface AmbientTemperature" class="idl"> <dt>readonly attribute float value</dt> <dd>The overall ambient temperature level around the device. The value is normalised from the minimum and maximum temperature level that this device can report to 0 and 1.</dd> - <dt>readonly attribute sequence<Thermometer> thermometers</dt> + <dt>readonly attribute Thermometer thermometers[]</dt> <dd>The list of all external thermometers connected to this device</dd> </dl> </section> @@ -1090,23 +1047,23 @@ <h4>Ambient Atmospheric Pressure</h4> <section> <h5>The <a>AmbientAtmosphericPressure</a> Property</h5> - <ul> - <li>Name: <code>AmbientAtmosphericPressure</code></li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information about the atmospheric pressure around the device.</p> + <dl title="[NoInterfaceObject] interface AmbientAtmosphericPressure" class="idl"> <dt>readonly attribute float pressure</dt> <dd>The estimated atmospheric pressure around this device, in kiloPascal (kPa)</dd> - <dt>readonly attribute sequence<Barometer> barometers</dt> + <dt>readonly attribute Barometer barometers[]</dt> <dd>The list of all the barometers connected to this device</dd> </dl> </section> + <section> <h5>The <a>Barometer</a> Property</h5> - <ul> - <li>Name: <code>Barometer</code></li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information about a single + barometer available to the system. It is + <a>enumerable.</a></p> <dl title="[NoInterfaceObject] interface Barometer" class="idl"> <dt>readonly attribute DOMString id</dt> @@ -1129,35 +1086,39 @@ <h4>Proximity</h4> <section> <h5>The <a>Proximity</a> Property</h5> - <ul> - <li>Name: <code>Proximity</code></li> - <li>Enumerable: no</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> + + <p>This property provides information about the distance of objects around the device.</p> + <dl title="[NoInterfaceObject] interface Proximity" class="idl"> <dt>readonly attribute float distance</dt> <dd>The distance from the device to the nearest object, as determined by this device's proximity sensors, in meters (m)</dd> - <dt>readonly attribute sequence<ProximitySensor> sensors</dt> + <dt>readonly attribute ProximitySensor sensors[]</dt> <dd>The list of all proximity sensors available to this device</dd> </dl> </section> <section> <h4>The <a>ProximitySensor</a> Property</h4> + + <p>This property provides information about a single + proximity sensor available to the system. It is + <a>enumerable</a>.</p> + <dl title="[NoInterfaceObject] interface ProximitySensor" class="idl"> - <ul> - <li>Name: <code>ProximitySensor</code></li> - <li>Enumerable: yes</li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> <dt>readonly attribute DOMString id</dt> - <dd>A free-form string identifying this sensor. The value of this element MUST be unique within the list reported in a <a>Proximity</a> object.</dd> + <dd>A free-form string identifying this sensor. The + value of this element MUST be unique within the list + reported in a <a>Proximity</a> object.</dd> + <dt>readonly attribute DOMString info</dt> <dd>A free-form string describing this device.</dd> + <dt>readonly attribute float distance</dt> <dd>The distance between this sensor and the nearest object, in meters</dd>. + <dt>readonly attribute float minProximity</dt> <dd>The maximum proximity that this device can report, in meters</dd> + <dt>readonly attribute float maxProximity</dt> <dd>The minimum proximity that this device can report, in meters</dd> </dl> @@ -1166,124 +1127,155 @@ </section> <!-- ********* /Sensors ************************************************************** --> - - <p class="issue">Add video/audio</p> + <p class="issue">Add video/input/vibrate</p> <!-- ********* Audio ************************************************************** --> - <!-- - <section> - <h2>Audio</h2> - <p>These property expose the device's audio capabilities.</p> - <p class="issue">TODO: volume control - Does volume belong to this specification anyway, or capture? Similarly for Video Input Devices: zoom, flash, Depth of field, etc.</p> - <section> + <section> + <h2>Audio</h2> + <p>The properties below expose the device's audio capabilities.</p> + + <section> <h4>ECMAScript Example</h4> - <pre class="sh_javascript example"> - </pre> - </section> - <section> + <pre class="sh_javascript example">//Enumerate the active microphones on the system +system.audio.get("Audio", success); + +function isMicrophone(device, index, array) { + return device.type===device.TYPE_MICROPHONE; +} + +function success(audio) { + var activeMicrophones = audio.outputDevices.filter(isMicrophone); +}</pre> + </section> + <section> <h4>The <a>Audio</a> property</h4> - <ul> - <li>Value type: <code>Audio</code></li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> - </ul> -<dl title='[NoInterfaceObject] interface Audio' class='idl'> -<dt>readonly attribute DOMString info</dt> -<dd>Audio architecture information.</dd> -<dt>readonly attribute float inputVolume</dt> -<dd>A normalized value (from 0 to 1) representing the current volume of the input device currently in use -<p class="issue">Or should we have instead an output volume for each microphone and linein?</p> -</dd> + <p>This property exposes information on the audio capabilities of this system</p> -<dt>readonly attribute sequence<AudioCodec> codecs</dt> -<dd>Audio codecs on this device</dd> -<dt>readonly attribute sequence<AudioOutputDevice> audioOutputs</dt> -<dd>Audio output attached to this device</dd> -<dt>readonly attribute sequence<AudioInputDevice> audioInputs</dt> -<dd>Audio inputs</dd> -</dl> -<dl title='[NoInterfaceObject] interface AudioCodec' class='idl'> -<dt>readonly attribute DOMString info</dt> -<dd> -Free-form string containing information on this codec's implementation. Examples: "Microsoft G.711", "LAME". -</dd> -<dt>readonly attribute DOMString compFormat</dt> -<dd> -Free-form information on the compression format. Examples : "G.711", "MP3", "MIDI" -</dd> -<dt>readonly attribute boolean encode</dt> -<dd> -<code>true</code> if this device supports audio encoding, <code>false</code> otherwise. -</dd> -<dt>readonly attribute boolean decode</dt> -<dd> -<code>true</code> if this device supports audio decoding, <code>false</code> otherwise. -</dd> -</dl> -<dl title='[NoInterfaceObject] interface AudioInputDevice' class='idl'> -<dt>const unsigned short UNKNOWN=0</dt> -<dd><code>type</code> is set to this value when the type of this device is unknown</dd> -<dt>const unsigned short MICROPHONE=1</dt> -<dd><code>type</code> is set to this value when this device is a microphone</dd> -<dt>const unsigned short LINE_IN=2</dt> -<dd><code>type</code> is set to this value when this device is a line-in connector</dd> -<dt>readonly attribute unsigned short type</dt> -<dd>The type of audio input device. The value is one of the constants defined for this type.</dd> -<dt>readonly attribute DOMString info</dt> -<dd> -Free-form text describing this device. -</dd> -<dt>readonly attribute unsigned int freqRangeLow</dt> -<dd> -Frequency range, low value, in Hz -</dd> -<dt>readonly attribute unsigned int freqRangeHigh</dt> -<dd> -Frequency range, high value, in Hz -</dd> -<dt>readonly attribute float volume</dt> -<dd> -A normalized value (from 0 to 1) representing the current volume of this device -</dd> + <p class="note">These properties do not provide volume + controls. An application will have to use HTML5's volume + control attributes.</p> + + <dl title='[NoInterfaceObject] interface Audio' class='idl'> + <dt>readonly attribute AudioCodec codecs[]</dt> + <dd>Audio codecs on this device</dd> -</dl> -<dl title='[NoInterfaceObject] interface AudioOutputDevice' class='idl'> -<dt>const unsigned short UNKNOWN=0</dt> -<dd><code>type</code> is set to this value when the type of this device is unknown</dd> -<dt>const unsigned short SPEAKER=1</dt> -<dd><code>type</code> is set to this value when this device is a loud speaker</dd> -<dt>const unsigned short HEADPHONES=2</dt> -<dd><code>type</code> is set to this value when this device is a pair of headphones</dd> -<dt>readonly attribute unsigned short type</dt> -<dd> -The type of audio input device. The value is one of the constants defined for this type. -</dd> -<dt>readonly attribute DOMString info</dt> -<dd> -Free-form text describing this device. -</dd> -<dt>readonly attribute unsigned int freqRangeLow</dt> -<dd> -Frequency range, low value, in Hz -</dd> -<dt>readonly attribute unsigned int freqRangeHigh</dt> -<dd> -Frequency range, high value, in Hz -</dd> -<dt>readonly attribute float volume</dt> -<dd> -A normalized value (from 0 to 1) representing the current volume of this device -</dd> -</dl> + <dt>readonly attribute AudioOutputDevice outputDevices[]</dt> + <dd>Audio output devices attached to this device</dd> + + <dt>readonly attribute AudioInputDevice inputDevices[]</dt> + <dd>Audio input devices attached to this</dd> + </dl> + </section> + <section> + <h4>The <a>AudioCodec</a> Property</h4> + + <p>This property exposes information on a single audio codec available to this system. Is it <a>enumerable</a>.</p> + + <dl title='[NoInterfaceObject] interface AudioCodec' class='idl'> + <dt>readonly attribute DOMString info</dt> + <dd>Free-form string containing information on this + codec's implementation. Examples: "Microsoft G.711", + "LAME".</dd> + + <dt>readonly attribute DOMString compFormat</dt> + + <dd>Free-form information on the compression + format. Examples : "G.711", "MP3", "MIDI"</dd> + + <dt>readonly attribute boolean encode</dt> + <dd><code>true</code> if this device supports audio + encoding, <code>false</code> otherwise.</dd> + + <dt>readonly attribute boolean decode</dt> + <dd><code>true</code> if this device supports audio + decoding, <code>false</code> otherwise.</dd> + </dl> + </section> + + <section> + <h4>The <a>AudioInputDevice</a> Property</h4> + + <p>This property exposes information on a single audio input + device available to this system. It is + <a>enumerable</a>.</p> + + <dl title='[NoInterfaceObject] interface AudioInputDevice' class='idl'> + <dt>const unsigned short TYPE_UNKNOWN=0</dt> + <dd><code>type</code> is set to this value when the type of this device is unknown</dd> + <dt>const unsigned short TYPE_MICROPHONE=1</dt> + <dd><code>type</code> is set to this value when this device is a microphone</dd> + <dt>const unsigned short TYPE_LINEIN=2</dt> + <dd><code>type</code> is set to this value when this device is a line-in connector</dd> + + <dt>readonly attribute unsigned short type</dt> + <dd>The type of audio input device. The value is one of + the constants defined for this type.</dd> + + <dt>attribute boolean active</dt> + <dd>Indicates if the device is currently active, i.e. if + any sound recording will be made using this device</dd> + + <dt>readonly attribute DOMString info</dt> + <dd>Free-form text describing this device.</dd> + + <dt>readonly attribute DOMString id</dt> + <dd>A free-form string identifying this device. The value + of this element MUST be unique within the list reported in + an <a>Audio</a> object.</dd> + + <dt>readonly attribute unsigned int freqRangeLow</dt> + <dd>Frequency range, low value, in Hz</dd> + + <dt>readonly attribute unsigned int freqRangeHigh</dt> + <dd>Frequency range, high value, in Hz</dd> + </dl> + </section> + <section> + <h4>The <a>AudioOutputDevice</a> Property</h4> + + <p>This property exposes information on a single audio + output device available to this system. It is + <a>enumerable</a>.</p> + + <dl title='[NoInterfaceObject] interface AudioOutputDevice' class='idl'> + <dt>const unsigned short TYPE_UNKNOWN=0</dt> + <dd><code>type</code> is set to this value when the type of this device is unknown</dd> + <dt>const unsigned short TYPE_SPEAKER=1</dt> + <dd><code>type</code> is set to this value when this device is a loud speaker</dd> + <dt>const unsigned short TYPE_HEADPHONES=2</dt> + <dd><code>type</code> is set to this value when this device is a pair of headphones</dd> + <dt>readonly attribute unsigned short type</dt> + <dd>The type of audio output device. The value is one of the constants defined for this type.</dd> + + <dt>readonly attribute DOMString info</dt> + <dd>Free-form text describing this device.</dd> + + <dt>readonly attribute DOMString id</dt> + <dd>A free-form string identifying this device. The value + of this element MUST be unique within the list reported in + an <a>Audio</a> object.</dd> + + <dt>attribute boolean active</dt> + <dd>Indicates if the device is currently active, i.e. if + any sound recording will be made using this device</dd> + + <dt>readonly attribute unsigned int freqRangeLow</dt> + <dd>Frequency range, low value, in Hz</dd> + + <dt>readonly attribute unsigned int freqRangeHigh</dt> + <dd>Frequency range, high value, in Hz</dd> + </dl> + + </section> + </section> -</section> -</section> - --> <!-- ********* /Audio ************************************************************** --> <!-- ********* PropertyTemplate ************************************************************** --> +<!-- <section> <h2>PropertyTemplate</h2> <p>PropertyTemplate</p> @@ -1297,18 +1289,18 @@ <h4>PropertyTemplate</h4> <ul> <li>Name: <code>PropertyTemplate</code></li> - <li class="issue">Corresponding DCO property: <a href=""></a></li> </ul> <dl title="[NoInterfaceObject] interface Template" class="idl"> <dt>const unsigned int foo = 0</dt> <dd>...</dd> <dt>readonly attribute float bar</dt> <dd>..</dd> - <dt>readonly attribute sequence<..> baz</dt> + <dt>readonly attribute Baz baz[]</dt> <dd>qux</dd> </dl> </section> </section> +--> <!-- ********* /PropertyTemplate ************************************************************** --> <!--
Received on Thursday, 17 December 2009 12:09:15 UTC