<tdclass="cellrowborder"valign="top"width="59.67%"headers="mcps1.1.4.1.3 "><pid="p328012293211"><aname="p328012293211"></a><aname="p328012293211"></a>Audio stream for ringtones</p>
<tdclass="cellrowborder"valign="top"width="59.67%"headers="mcps1.1.4.1.3 "><pid="p182452299212"><aname="p182452299212"></a><aname="p182452299212"></a>Audio stream for media purpose</p>
<tdclass="cellrowborder"valign="top"width="55.38999999999999%"headers="mcps1.1.5.1.4 "><pid="p16111548121411"><aname="p16111548121411"></a><aname="p16111548121411"></a>Volume to set. The value range can be obtained by calling <strongid="b13473592612"><aname="b13473592612"></a><aname="b13473592612"></a>getMinVolume</strong> and <strongid="b9786013715"><aname="b9786013715"></a><aname="b9786013715"></a>getMaxVolume</strong>.</p>
<tdclass="cellrowborder"valign="top"width="55.38999999999999%"headers="mcps1.1.5.1.4 "><pid="p751211651512"><aname="p751211651512"></a><aname="p751211651512"></a>Callback used to return the execution result</p>
<tdclass="cellrowborder"valign="top"width="55.38999999999999%"headers="mcps1.1.5.1.4 "><pid="p2688718171716"><aname="p2688718171716"></a><aname="p2688718171716"></a>Volume to set. The value range can be obtained by calling <strongid="b665410551184"><aname="b665410551184"></a><aname="b665410551184"></a>getMinVolume</strong> and <strongid="b16547550813"><aname="b16547550813"></a><aname="b16547550813"></a>getMaxVolume</strong>.</p>
<tdclass="cellrowborder"valign="top"width="73.94%"headers="mcps1.1.3.1.2 "><pid="p4672828141718"><aname="p4672828141718"></a><aname="p4672828141718"></a>Promise used to return the execution result</p>
<tdclass="cellrowborder"valign="top"width="55.38999999999999%"headers="mcps1.1.5.1.4 "><pid="p3433161313204"><aname="p3433161313204"></a><aname="p3433161313204"></a>Callback used to return the volume</p>
<tdclass="cellrowborder"valign="top"width="74.03%"headers="mcps1.1.3.1.2 "><pid="p17435513102016"><aname="p17435513102016"></a><aname="p17435513102016"></a>Promise used to return the volume</p>
<tdclass="cellrowborder"valign="top"width="55.38999999999999%"headers="mcps1.1.5.1.4 "><pid="p1958614711221"><aname="p1958614711221"></a><aname="p1958614711221"></a>Callback used to return the minimum volume</p>
<tdclass="cellrowborder"valign="top"width="73.98%"headers="mcps1.1.3.1.2 "><pid="p05878717229"><aname="p05878717229"></a><aname="p05878717229"></a>Promise used to return the minimum volume</p>
<tdclass="cellrowborder"valign="top"width="55.38999999999999%"headers="mcps1.1.5.1.4 "><pid="p1621114282212"><aname="p1621114282212"></a><aname="p1621114282212"></a>Callback used to return the maximum volume</p>
<tdclass="cellrowborder"valign="top"width="73.98%"headers="mcps1.1.3.1.2 "><pid="p4212114210226"><aname="p4212114210226"></a><aname="p4212114210226"></a>Promise used to return the maximum volume</p>
<tdclass="cellrowborder"valign="top"width="53.94%"headers="mcps1.1.5.1.4 "><pid="p11518133684618"><aname="p11518133684618"></a><aname="p11518133684618"></a>Mute status to set. The value <strongid="b19795182381214"><aname="b19795182381214"></a><aname="b19795182381214"></a>true</strong> means to mute the stream, and <strongid="b5748123812121"><aname="b5748123812121"></a><aname="b5748123812121"></a>false</strong> means the opposite.</p>
<tdclass="cellrowborder"valign="top"width="53.94%"headers="mcps1.1.5.1.4 "><pid="p18115237124119"><aname="p18115237124119"></a><aname="p18115237124119"></a>Callback used to return the execution result</p>
<tdclass="cellrowborder"valign="top"width="52.959999999999994%"headers="mcps1.1.5.1.4 "><pid="p1079311161421"><aname="p1079311161421"></a><aname="p1079311161421"></a>Mute status to set. The value <strongid="b171348125135"><aname="b171348125135"></a><aname="b171348125135"></a>true</strong> means to mute the stream, and <strongid="b10134212151311"><aname="b10134212151311"></a><aname="b10134212151311"></a>false</strong> means the opposite.</p>
<tdclass="cellrowborder"valign="top"width="73.94%"headers="mcps1.1.3.1.2 "><pid="p18347134724215"><aname="p18347134724215"></a><aname="p18347134724215"></a>Promise used to return the execution result</p>
<tdclass="cellrowborder"valign="top"width="52.349999999999994%"headers="mcps1.1.5.1.4 "><pid="p183723274511"><aname="p183723274511"></a><aname="p183723274511"></a>Callback used to return the mute status of the stream. The value <strongid="b892511611142"><aname="b892511611142"></a><aname="b892511611142"></a>true</strong> means that the stream is muted, and <strongid="b17347151781419"><aname="b17347151781419"></a><aname="b17347151781419"></a>false</strong> means the opposite.</p>
<tdclass="cellrowborder"valign="top"width="74.03%"headers="mcps1.1.3.1.2 "><pid="p17922131112568"><aname="p17922131112568"></a><aname="p17922131112568"></a>Promise used to return the mute status of the stream. The value <strongid="b6258181931519"><aname="b6258181931519"></a><aname="b6258181931519"></a>true</strong> means that the stream is muted, and <strongid="b545312300158"><aname="b545312300158"></a><aname="b545312300158"></a>false</strong> means the opposite.</p>
<tdclass="cellrowborder"valign="top"width="53.13%"headers="mcps1.1.5.1.4 "><pid="p2803354131214"><aname="p2803354131214"></a><aname="p2803354131214"></a>Callback used to return the active status of the stream. The value <strongid="b15293142015162"><aname="b15293142015162"></a><aname="b15293142015162"></a>true</strong> means that the stream is active, and <strongid="b82641034121613"><aname="b82641034121613"></a><aname="b82641034121613"></a>false</strong> means the opposite.</p>
<tdclass="cellrowborder"valign="top"width="74.03%"headers="mcps1.1.3.1.2 "><pid="p280615541125"><aname="p280615541125"></a><aname="p280615541125"></a>Promise used to return the active status of the stream. The value <strongid="b6322155711164"><aname="b6322155711164"></a><aname="b6322155711164"></a>true</strong> means that the stream is active, and <strongid="b1832825714163"><aname="b1832825714163"></a><aname="b1832825714163"></a>false</strong> means the opposite.</p>
<tdclass="cellrowborder"valign="top"width="52.349999999999994%"headers="mcps1.1.5.1.4 "><pid="p19574514123617"><aname="p19574514123617"></a><aname="p19574514123617"></a>Callback used to return the execution result</p>
<tdclass="cellrowborder"valign="top"width="73.94%"headers="mcps1.1.3.1.2 "><pid="p20577181420364"><aname="p20577181420364"></a><aname="p20577181420364"></a>Promise used to return the execution result</p>
<tdclass="cellrowborder"valign="top"width="49.919999999999995%"headers="mcps1.1.5.1.4 "><pid="p1890771019169"><aname="p1890771019169"></a><aname="p1890771019169"></a>Callback used to return the ringer mode</p>
</td>
</tr>
</tbody>
</table>
**Return values**
None
**Example**
```
audioManager.getRingerMode((err, value) => {
if (err) {
console.error('Failed to obtain the ringer mode. ${err.message}');
return;
}
console.log('Callback invoked to indicate that the ringer mode is obtained.' + value);
<tdclass="cellrowborder"valign="top"width="74.03%"headers="mcps1.1.3.1.2 "><pid="p17910141021611"><aname="p17910141021611"></a><aname="p17910141021611"></a>Promise used to return the ringer mode</p>
</td>
</tr>
</tbody>
</table>
**Example**
```
audioManager.getRingerMode().then((value) =>
console.log('Promise returned to indicate that the ringer mode is obtained.' + value);
<tdclass="cellrowborder"valign="top"width="53.83%"headers="mcps1.1.5.1.4 "><pid="p10117574484"><aname="p10117574484"></a><aname="p10117574484"></a>Key of the audio parameter to set</p>
<tdclass="cellrowborder"valign="top"width="53.83%"headers="mcps1.1.5.1.4 "><pid="p13111157164816"><aname="p13111157164816"></a><aname="p13111157164816"></a>Value of the audio parameter to set</p>
<tdclass="cellrowborder"valign="top"width="53.83%"headers="mcps1.1.5.1.4 "><pid="p91220576488"><aname="p91220576488"></a><aname="p91220576488"></a>Callback used to return the execution result</p>
</td>
</tr>
</tbody>
</table>
**Return values**
None
**Example**
```
audioManager.setAudioParameter('PBits per sample', '8 bit', (err) => {
if (err) {
console.error('Failed to set the audio parameter. ${err.message}');
return;
}
console.log('Callback invoked to indicate a successful setting of the audio parameter.');
<tdclass="cellrowborder"valign="top"width="53.13%"headers="mcps1.1.5.1.4 "><pid="p1747016545595"><aname="p1747016545595"></a><aname="p1747016545595"></a>Key of the audio parameter to set</p>
<tdclass="cellrowborder"valign="top"width="53.13%"headers="mcps1.1.5.1.4 "><pid="p1231310421203"><aname="p1231310421203"></a><aname="p1231310421203"></a>Value of the audio parameter to set</p>
<tdclass="cellrowborder"valign="top"width="73.94%"headers="mcps1.1.3.1.2 "><pid="p41511577486"><aname="p41511577486"></a><aname="p41511577486"></a>Promise used to return the execution result</p>
</td>
</tr>
</tbody>
</table>
**Example**
```
audioManager.setAudioParameter('PBits per sample', '8 bit').then(() =>
console.log('Promise returned to indicate a successful setting of the audio parameter.');
<tdclass="cellrowborder"valign="top"width="53.74%"headers="mcps1.1.5.1.4 "><pid="p11261642604"><aname="p11261642604"></a><aname="p11261642604"></a>Key of the audio parameter whose value is to be obtained</p>
<tdclass="cellrowborder"valign="top"width="53.74%"headers="mcps1.1.5.1.4 "><pid="p91715719485"><aname="p91715719485"></a><aname="p91715719485"></a>Callback used to return the value of the audio parameter</p>
</td>
</tr>
</tbody>
</table>
**Return values**
None
**Example**
```
audioManager.getAudioParameter('PBits per sample', (err, value) => {
if (err) {
console.error('Failed to obtain the value of the audio parameter. ${err.message}');
return;
}
console.log('Callback invoked to indicate that the value of the audio parameter is obtained.' + value);
<tdclass="cellrowborder"valign="top"width="53.49%"headers="mcps1.1.5.1.4 "><pid="p1860910215116"><aname="p1860910215116"></a><aname="p1860910215116"></a>Key of the audio parameter whose value is to be obtained</p>
<tdclass="cellrowborder"valign="top"width="74.03%"headers="mcps1.1.3.1.2 "><pid="p1121155704810"><aname="p1121155704810"></a><aname="p1121155704810"></a>Promise used to return the value of the audio parameter</p>
</td>
</tr>
</tbody>
</table>
**Example**
```
audioManager.getAudioParameter('PBits per sample').then((value) =>
console.log('Promise returned to indicate that the value of the audio parameter is obtained.' + value);
<tdclass="cellrowborder"valign="top"width="48.65%"headers="mcps1.1.5.1.4 "><pid="p19654141672416"><aname="p19654141672416"></a><aname="p19654141672416"></a>Callback used to return the device list</p>
<tdclass="cellrowborder"valign="top"width="73.98%"headers="mcps1.1.3.1.2 "><pid="p765751610249"><aname="p765751610249"></a><aname="p765751610249"></a>Promise used to return the device list</p>
<tdclass="cellrowborder"valign="top"width="53.13%"headers="mcps1.1.5.1.4 "><pid="p1357124052217"><aname="p1357124052217"></a><aname="p1357124052217"></a>Active status to set. The value <strongid="b3724942112511"><aname="b3724942112511"></a><aname="b3724942112511"></a>true</strong> means to set the device to the active status, and <strongid="b166801546102520"><aname="b166801546102520"></a><aname="b166801546102520"></a>false</strong> means the opposite.</p>
<tdclass="cellrowborder"valign="top"width="53.13%"headers="mcps1.1.5.1.4 "><pid="p13358540132217"><aname="p13358540132217"></a><aname="p13358540132217"></a>Callback used to return the execution result</p>
<tdclass="cellrowborder"valign="top"width="55.38999999999999%"headers="mcps1.1.5.1.4 "><pid="p280510397459"><aname="p280510397459"></a><aname="p280510397459"></a>Active status to set. The value <strongid="b191031648162515"><aname="b191031648162515"></a><aname="b191031648162515"></a>true</strong> means to set the device to the active status, and <strongid="b910354832514"><aname="b910354832514"></a><aname="b910354832514"></a>false</strong> means the opposite.</p>
<tdclass="cellrowborder"valign="top"width="73.94%"headers="mcps1.1.3.1.2 "><pid="p536214032220"><aname="p536214032220"></a><aname="p536214032220"></a>Promise used to return the execution result</p>
<tdclass="cellrowborder"valign="top"width="53.66%"headers="mcps1.1.5.1.4 "><pid="p19365154072213"><aname="p19365154072213"></a><aname="p19365154072213"></a>Callback used to return the active status of the device</p>
<tdclass="cellrowborder"valign="top"width="74.03%"headers="mcps1.1.3.1.2 "><pid="p113691340122217"><aname="p113691340122217"></a><aname="p113691340122217"></a>Promise used to return the active status of the device</p>
<tdclass="cellrowborder"valign="top"width="53.31%"headers="mcps1.1.5.1.4 "><pid="p1953244311156"><aname="p1953244311156"></a><aname="p1953244311156"></a>Mute status to set. The value <strongid="b1767620103286"><aname="b1767620103286"></a><aname="b1767620103286"></a>true</strong> means to mute the microphone, and <strongid="b168341072815"><aname="b168341072815"></a><aname="b168341072815"></a>false</strong> means the opposite.</p>
<tdclass="cellrowborder"valign="top"width="53.31%"headers="mcps1.1.5.1.4 "><pid="p19706103612122"><aname="p19706103612122"></a><aname="p19706103612122"></a>Callback used to return the execution result</p>
</td>
</tr>
</tbody>
</table>
**Return values**
None
**Example**
```
audioManager.setMicrophoneMute(true, (err) => {
if (err) {
console.error('Failed to mute the microphone. ${err.message}');
return;
}
console.log('Callback invoked to indicate that the microphone is muted.');
<tdclass="cellrowborder"valign="top"width="52.52%"headers="mcps1.1.5.1.4 "><pid="p5819746191515"><aname="p5819746191515"></a><aname="p5819746191515"></a>Mute status to set. The value <strongid="b1892852419284"><aname="b1892852419284"></a><aname="b1892852419284"></a>true</strong> means to mute the microphone, and <strongid="b1792862482817"><aname="b1792862482817"></a><aname="b1792862482817"></a>false</strong> means the opposite.</p>
<tdclass="cellrowborder"valign="top"width="73.94%"headers="mcps1.1.3.1.2 "><pid="p2632911495"><aname="p2632911495"></a><aname="p2632911495"></a>Promise used to return the execution result</p>
</td>
</tr>
</tbody>
</table>
**Example**
```
audioManager.setMicrophoneMute(true).then(() =>
console.log('Promise returned to indicate that the microphone is muted.');
<tdclass="cellrowborder"valign="top"width="54.53%"headers="mcps1.1.5.1.4 "><pid="p7929533121617"><aname="p7929533121617"></a><aname="p7929533121617"></a>Callback used to return the mute status of the microphone. The value <strongid="b5430124112912"><aname="b5430124112912"></a><aname="b5430124112912"></a>true</strong> means that the microphone is muted, and <strongid="b49243242915"><aname="b49243242915"></a><aname="b49243242915"></a>false</strong> means the opposite.</p>
</td>
</tr>
</tbody>
</table>
**Return values**
None
**Example**
```
audioManager.isMicrophoneMute((err, value) => {
if (err) {
console.error('Failed to obtain the mute status of the microphone. ${err.message}');
return;
}
console.log('Callback invoked to indicate that the mute status of the microphone is obtained.' + value);
<tdclass="cellrowborder"valign="top"width="74.03%"headers="mcps1.1.3.1.2 "><pid="p9637191112911"><aname="p9637191112911"></a><aname="p9637191112911"></a>Promise used to return the mute status of the microphone. The value <strongid="b151051552172911"><aname="b151051552172911"></a><aname="b151051552172911"></a>true</strong> means that the microphone is muted, and <strongid="b2111205212918"><aname="b2111205212918"></a><aname="b2111205212918"></a>false</strong> means the opposite.</p>
</td>
</tr>
</tbody>
</table>
**Example**
```
audioManager.isMicrophoneMute().then((value) =>
console.log('Promise returned to indicate that the mute status of the microphone is obtained.', + value);
<tdclass="cellrowborder"valign="top"width="80.30000000000001%"headers="mcps1.1.3.1.2 "><pid="p597532272616"><aname="p597532272616"></a><aname="p597532272616"></a>Array of <strongid="b1463165615308"><aname="b1463165615308"></a><aname="b1463165615308"></a>AudioDeviceDescriptor</strong>s, which is read-only</p>
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the mute status of the stream. The value **true** means that the stream is muted, and **false** means the opposite. |
| Promise<boolean\> | Promise used to return the mute status of the stream. The value **true** means that the stream is muted, and **false** means the opposite. |
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the active status of the stream. The value **true** means that the stream is active, and **false** means the opposite. |
| Promise<boolean\> | Promise used to return the active status of the stream. The value **true** means that the stream is active, and **false** means the opposite. |
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the mute status of the microphone. The value **true** means that the microphone is muted, and **false** means the opposite. |
**Return values**
None
**Example**
```
audioManager.isMicrophoneMute((err, value) => {
if (err) {
console.error('Failed to obtain the mute status of the microphone. ${err.message}');
return;
}
console.log('Callback invoked to indicate that the mute status of the microphone is obtained.' + value);
| Promise<boolean\> | Promise used to return the mute status of the microphone. The value **true** means that the microphone is muted, and **false** means the opposite. |
**Example**
```
audioManager.isMicrophoneMute().then((value) =>
console.log('Promise returned to indicate that the mute status of the microphone is obtained.', + value);