未验证 提交 a32e629b 编写于 作者: O openharmony_ci 提交者: Gitee

!1643 added syscap for apis and enums in js api doc for audio

Merge pull request !1643 from geevarghesevk/syscap_br
...@@ -16,7 +16,9 @@ None ...@@ -16,7 +16,9 @@ None
getAudioManager\(\): AudioManager<a name="section84581011418"></a> getAudioManager\(\): AudioManager<a name="section84581011418"></a>
Obtains an **AudioManager** instance. Obtains an **AudioManager** instance.
**System capabilities**: SystemCapability.Multimedia.Audio.Core
**Return value** **Return value**
...@@ -44,14 +46,16 @@ var audioManager = audio.getAudioManager(); ...@@ -44,14 +46,16 @@ var audioManager = audio.getAudioManager();
## audioRenderer ## audioRenderer
createAudioRenderer(volumeType: AudioVolumeType): AudioRenderer<a name="createaudioRenderer"></a> createAudioRenderer(options: AudioRendererOptions): AudioRenderer<a name="createaudioRenderer"></a>
Obtains an **AudioRenderer** instance. Obtains an **AudioRenderer** instance.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| :--------- | :-------------- | :-------- | :----------------- | | :--------- | :------------------- | :-------- | :---------------------- |
| volumeType | AudioVolumeType | Yes | Audio stream type. | | options | AudioRendererOptions | Yes | Renderer configurations |
**Return value** **Return value**
...@@ -125,28 +129,28 @@ Enumerates audio stream types. ...@@ -125,28 +129,28 @@ Enumerates audio stream types.
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p2282152962115"><a name="p2282152962115"></a><a name="p2282152962115"></a>0</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p2282152962115"><a name="p2282152962115"></a><a name="p2282152962115"></a>0</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p328012293211"><a name="p328012293211"></a><a name="p328012293211"></a>Audio stream for voice calls.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p328012293211"><a name="p328012293211"></a><a name="p328012293211"></a>Audio stream for voice calls. <br/> System capabilities: SystemCapability.Multimedia.Audio.Volume </p>
</td> </td>
</tr> </tr>
<tr id="row1389215612395"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p52851329122117"><a name="p52851329122117"></a><a name="p52851329122117"></a>RINGTONE</p> <tr id="row1389215612395"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p52851329122117"><a name="p52851329122117"></a><a name="p52851329122117"></a>RINGTONE</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p2282152962115"><a name="p2282152962115"></a><a name="p2282152962115"></a>2</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p2282152962115"><a name="p2282152962115"></a><a name="p2282152962115"></a>2</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p328012293211"><a name="p328012293211"></a><a name="p328012293211"></a>Audio stream for ringtones.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p328012293211"><a name="p328012293211"></a><a name="p328012293211"></a>Audio stream for ringtones. <br/> System capabilities: SystemCapability.Multimedia.Audio.Volume</p>
</td> </td>
</tr> </tr>
<tr id="row6892145616397"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p027662952110"><a name="p027662952110"></a><a name="p027662952110"></a>MEDIA</p> <tr id="row6892145616397"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p027662952110"><a name="p027662952110"></a><a name="p027662952110"></a>MEDIA</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p17273229192113"><a name="p17273229192113"></a><a name="p17273229192113"></a>3</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p17273229192113"><a name="p17273229192113"></a><a name="p17273229192113"></a>3</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p182452299212"><a name="p182452299212"></a><a name="p182452299212"></a>Audio stream for media purpose.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p182452299212"><a name="p182452299212"></a><a name="p182452299212"></a>Audio stream for media purpose. <br/> System capabilities: SystemCapability.Multimedia.Audio.Volume</p>
</td> </td>
</tr> </tr>
<tr id="row6892145616397"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p027662952110"><a name="p027662952110"></a><a name="p027662952110"></a>VOICE_ASSISTANT</p> <tr id="row6892145616397"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p027662952110"><a name="p027662952110"></a><a name="p027662952110"></a>VOICE_ASSISTANT</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p17273229192113"><a name="p17273229192113"></a><a name="p17273229192113"></a>9</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p17273229192113"><a name="p17273229192113"></a><a name="p17273229192113"></a>9</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p182452299212"><a name="p182452299212"></a><a name="p182452299212"></a>Audio stream for voice assistant.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p182452299212"><a name="p182452299212"></a><a name="p182452299212"></a>Audio stream for voice assistant. <br/> System capabilities: SystemCapability.Multimedia.Audio.Volume</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -170,21 +174,21 @@ Enumerates audio device flags. ...@@ -170,21 +174,21 @@ Enumerates audio device flags.
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p172861314213"><a name="p172861314213"></a><a name="p172861314213"></a>1</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p172861314213"><a name="p172861314213"></a><a name="p172861314213"></a>1</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p5286133134212"><a name="p5286133134212"></a><a name="p5286133134212"></a>Output device.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p5286133134212"><a name="p5286133134212"></a><a name="p5286133134212"></a>Output device. <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
<tr id="row2286163194220"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p5514162412251"><a name="p5514162412251"></a><a name="p5514162412251"></a>INPUT_DEVICES_FLAG</p> <tr id="row2286163194220"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p5514162412251"><a name="p5514162412251"></a><a name="p5514162412251"></a>INPUT_DEVICES_FLAG</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p112863354219"><a name="p112863354219"></a><a name="p112863354219"></a>2</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p112863354219"><a name="p112863354219"></a><a name="p112863354219"></a>2</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p1328617334214"><a name="p1328617334214"></a><a name="p1328617334214"></a>Input device.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p1328617334214"><a name="p1328617334214"></a><a name="p1328617334214"></a>Input device. <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
<tr id="row10631228192520"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p1731716317259"><a name="p1731716317259"></a><a name="p1731716317259"></a>ALL_DEVICES_FLAG</p> <tr id="row10631228192520"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p1731716317259"><a name="p1731716317259"></a><a name="p1731716317259"></a>ALL_DEVICES_FLAG</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p1364628102517"><a name="p1364628102517"></a><a name="p1364628102517"></a>3</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p1364628102517"><a name="p1364628102517"></a><a name="p1364628102517"></a>3</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p1864182814256"><a name="p1864182814256"></a><a name="p1864182814256"></a>All devices.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p1864182814256"><a name="p1864182814256"></a><a name="p1864182814256"></a>All devices. <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -208,14 +212,14 @@ Enumerates audio device roles. ...@@ -208,14 +212,14 @@ Enumerates audio device roles.
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p98008852610"><a name="p98008852610"></a><a name="p98008852610"></a>1</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p98008852610"><a name="p98008852610"></a><a name="p98008852610"></a>1</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p118009817260"><a name="p118009817260"></a><a name="p118009817260"></a>Input role.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p118009817260"><a name="p118009817260"></a><a name="p118009817260"></a>Input role. <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
<tr id="row680018802618"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p2011710479267"><a name="p2011710479267"></a><a name="p2011710479267"></a>OUTPUT_DEVICE</p> <tr id="row680018802618"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p2011710479267"><a name="p2011710479267"></a><a name="p2011710479267"></a>OUTPUT_DEVICE</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p08009812613"><a name="p08009812613"></a><a name="p08009812613"></a>2</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p08009812613"><a name="p08009812613"></a><a name="p08009812613"></a>2</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p380020842611"><a name="p380020842611"></a><a name="p380020842611"></a>Output role.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p380020842611"><a name="p380020842611"></a><a name="p380020842611"></a>Output role. <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -239,42 +243,42 @@ Enumerates audio device types. ...@@ -239,42 +243,42 @@ Enumerates audio device types.
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p772892012273"><a name="p772892012273"></a><a name="p772892012273"></a>0</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p772892012273"><a name="p772892012273"></a><a name="p772892012273"></a>0</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p137281920172712"><a name="p137281920172712"></a><a name="p137281920172712"></a>Invalid device.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p137281920172712"><a name="p137281920172712"></a><a name="p137281920172712"></a>Invalid device. <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
<tr id="row16728520192714"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p4753161132815"><a name="p4753161132815"></a><a name="p4753161132815"></a>SPEAKER</p> <tr id="row16728520192714"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p4753161132815"><a name="p4753161132815"></a><a name="p4753161132815"></a>SPEAKER</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p3728920162713"><a name="p3728920162713"></a><a name="p3728920162713"></a>2</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p3728920162713"><a name="p3728920162713"></a><a name="p3728920162713"></a>2</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p17728112062715"><a name="p17728112062715"></a><a name="p17728112062715"></a>Speaker.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p17728112062715"><a name="p17728112062715"></a><a name="p17728112062715"></a>Speaker. <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
<tr id="row1758117472814"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p74802011112815"><a name="p74802011112815"></a><a name="p74802011112815"></a>WIRED_HEADSET</p> <tr id="row1758117472814"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p74802011112815"><a name="p74802011112815"></a><a name="p74802011112815"></a>WIRED_HEADSET</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p35820462819"><a name="p35820462819"></a><a name="p35820462819"></a>3</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p35820462819"><a name="p35820462819"></a><a name="p35820462819"></a>3</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p155821548285"><a name="p155821548285"></a><a name="p155821548285"></a>Wired headset.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p155821548285"><a name="p155821548285"></a><a name="p155821548285"></a>Wired headset. <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
<tr id="row1335108192818"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p107521514142811"><a name="p107521514142811"></a><a name="p107521514142811"></a>BLUETOOTH_SCO</p> <tr id="row1335108192818"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p107521514142811"><a name="p107521514142811"></a><a name="p107521514142811"></a>BLUETOOTH_SCO</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p18335108112819"><a name="p18335108112819"></a><a name="p18335108112819"></a>7</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p18335108112819"><a name="p18335108112819"></a><a name="p18335108112819"></a>7</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p193351683289"><a name="p193351683289"></a><a name="p193351683289"></a>Bluetooth device using the synchronous connection oriented (SCO) link.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p193351683289"><a name="p193351683289"></a><a name="p193351683289"></a>Bluetooth device using the synchronous connection oriented (SCO) link. <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
<tr id="row1649111617286"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p10784017102818"><a name="p10784017102818"></a><a name="p10784017102818"></a>BLUETOOTH_A2DP</p> <tr id="row1649111617286"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p10784017102818"><a name="p10784017102818"></a><a name="p10784017102818"></a>BLUETOOTH_A2DP</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p849110610286"><a name="p849110610286"></a><a name="p849110610286"></a>8</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p849110610286"><a name="p849110610286"></a><a name="p849110610286"></a>8</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p549117620284"><a name="p549117620284"></a><a name="p549117620284"></a>Bluetooth device using the advanced audio distribution profile (A2DP).</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p549117620284"><a name="p549117620284"></a><a name="p549117620284"></a>Bluetooth device using the advanced audio distribution profile (A2DP). <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
<tr id="row81701220112812"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p168642028152812"><a name="p168642028152812"></a><a name="p168642028152812"></a>MIC</p> <tr id="row81701220112812"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p168642028152812"><a name="p168642028152812"></a><a name="p168642028152812"></a>MIC</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p517062012812"><a name="p517062012812"></a><a name="p517062012812"></a>15</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p517062012812"><a name="p517062012812"></a><a name="p517062012812"></a>15</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p5170520112813"><a name="p5170520112813"></a><a name="p5170520112813"></a>Microphone.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p5170520112813"><a name="p5170520112813"></a><a name="p5170520112813"></a>Microphone. <br/> System capabilities: SystemCapability.Multimedia.Audio.Device</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -298,21 +302,21 @@ Enumerates ringer modes. ...@@ -298,21 +302,21 @@ Enumerates ringer modes.
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p18788114345414"><a name="p18788114345414"></a><a name="p18788114345414"></a>0</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p18788114345414"><a name="p18788114345414"></a><a name="p18788114345414"></a>0</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p1378874385416"><a name="p1378874385416"></a><a name="p1378874385416"></a>Silence mode.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p1378874385416"><a name="p1378874385416"></a><a name="p1378874385416"></a>Silence mode. <br/> System capabilities: SystemCapability.Multimedia.Audio.Communication</p>
</td> </td>
</tr> </tr>
<tr id="row69495166107"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p1447557125520"><a name="p1447557125520"></a><a name="p1447557125520"></a>RINGER_MODE_VIBRATE</p> <tr id="row69495166107"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p1447557125520"><a name="p1447557125520"></a><a name="p1447557125520"></a>RINGER_MODE_VIBRATE</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p04766720552"><a name="p04766720552"></a><a name="p04766720552"></a>1</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p04766720552"><a name="p04766720552"></a><a name="p04766720552"></a>1</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p3610191945517"><a name="p3610191945517"></a><a name="p3610191945517"></a>Vibration mode.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p3610191945517"><a name="p3610191945517"></a><a name="p3610191945517"></a>Vibration mode. <br/> System capabilities: SystemCapability.Multimedia.Audio.Communication</p>
</td> </td>
</tr> </tr>
<tr id="row49498168105"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p1034891712171"><a name="p1034891712171"></a><a name="p1034891712171"></a>RINGER_MODE_NORMAL</p> <tr id="row49498168105"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="p1034891712171"><a name="p1034891712171"></a><a name="p1034891712171"></a>RINGER_MODE_NORMAL</p>
</td> </td>
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p421692310811"><a name="p421692310811"></a><a name="p421692310811"></a>2</p> <td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="p421692310811"><a name="p421692310811"></a><a name="p421692310811"></a>2</p>
</td> </td>
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p187929346177"><a name="p187929346177"></a><a name="p187929346177"></a>Normal mode.</p> <td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="p187929346177"><a name="p187929346177"></a><a name="p187929346177"></a>Normal mode. <br/> System capabilities: SystemCapability.Multimedia.Audio.Communication</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -322,71 +326,71 @@ Enumerates ringer modes. ...@@ -322,71 +326,71 @@ Enumerates ringer modes.
## AudioSampleFormat<sup>8+</sup><a name="audiosampleformat"></a> ## AudioSampleFormat<sup>8+</sup><a name="audiosampleformat"></a>
Enumerates the audio sample formats. Enumerates the audio sample formats.
| Name | Default Value | Description | | Name | Default Value | Description |
| :------------ | :------------ | :------------------------------------ | | :-------------------- | :------------ | :----------------------------------------------------------------------------------------------------- |
| INVALID_WIDTH | -1 | Invalid format. | | SAMPLE_FORMAT_INVALID | -1 | Invalid format. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_U8 | 0 | Unsigned 8 bit integer. | | SAMPLE_FORMAT_U8 | 0 | Unsigned 8 bit integer. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_S16LE | 1 | Signed 16 bit integer, little endian. | | SAMPLE_FORMAT_S16LE | 1 | Signed 16 bit integer, little endian. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_S24LE | 2 | Signed 24 bit integer, little endian. | | SAMPLE_FORMAT_S24LE | 2 | Signed 24 bit integer, little endian. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_S32LE | 3 | Signed 32 bit integer, little endian. | | SAMPLE_FORMAT_S32LE | 3 | Signed 32 bit integer, little endian. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
## AudioChannel<sup>8+</sup><a name="audiochannel"></a> ## AudioChannel<sup>8+</sup><a name="audiochannel"></a>
Enumerates the audio channels. Enumerates the audio channels.
| Name | Default Value | Description | | Name | Default Value | Description |
| :----- | :------------ | :--------------- | | :----- | :------------ | :-------------------------------------------------------------------------------- |
| CHANNEL_1 | 0x1 << 0 | Channel count 1. | | CHANNEL_1 | 0x1 << 0 | Channel count 1. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| CHANNEL_2 | 0x1 << 1 | Channel count 2. | | CHANNEL_2 | 0x1 << 1 | Channel count 2. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
## AudioSamplingRate<sup>8+</sup><a name="audiosamplingrate"></a> ## AudioSamplingRate<sup>8+</sup><a name="audiosamplingrate"></a>
Enumerates the audio sampling rates. Enumerates the audio sampling rates.
| Name | Default Value | Description | | Name | Default Value | Description |
| :---------------- | :------------ | :------------------- | | :---------------- | :------------ | :------------------------------------------------------------------------------------ |
| SAMPLE_RATE_8000 | 8000 | Sampling rate 8000. | | SAMPLE_RATE_8000 | 8000 | Sampling rate 8000. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_RATE_11025 | 11025 | Sampling rate 11025. | | SAMPLE_RATE_11025 | 11025 | Sampling rate 11025. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_RATE_12000 | 12000 | Sampling rate 12000. | | SAMPLE_RATE_12000 | 12000 | Sampling rate 12000. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_RATE_16000 | 16000 | Sampling rate 16000. | | SAMPLE_RATE_16000 | 16000 | Sampling rate 16000. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_RATE_22050 | 22050 | Sampling rate 22050. | | SAMPLE_RATE_22050 | 22050 | Sampling rate 22050. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_RATE_24000 | 24000 | Sampling rate 24000. | | SAMPLE_RATE_24000 | 24000 | Sampling rate 24000. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_RATE_32000 | 32000 | Sampling rate 32000. | | SAMPLE_RATE_32000 | 32000 | Sampling rate 32000. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_RATE_44100 | 44100 | Sampling rate 44100. | | SAMPLE_RATE_44100 | 44100 | Sampling rate 44100. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_RATE_48000 | 48000 | Sampling rate 48000. | | SAMPLE_RATE_48000 | 48000 | Sampling rate 48000. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_RATE_64000 | 64000 | Sampling rate 64000. | | SAMPLE_RATE_64000 | 64000 | Sampling rate 64000. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| SAMPLE_RATE_96000 | 96000 | Sampling rate 96000. | | SAMPLE_RATE_96000 | 96000 | Sampling rate 96000. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
## AudioEncodingType<sup>8+</sup><a name="audioencodingtype"></a> ## AudioEncodingType<sup>8+</sup><a name="audioencodingtype"></a>
Enumerates the audio encoding types. Enumerates the audio encoding types.
| Name | Default Value | Description | | Name | Default Value | Description |
| :-------------------- | :------------ | :---------------- | | :-------------------- | :------------- | :------------------------------------------------------------------------------- |
| ENCODING_TYPE_INVALID | -1 | Invalid. | | ENCODING_TYPE_INVALID | -1 | Invalid. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| ENCODING_TYPE_RAW | 0 | PCM encoding. | | ENCODING_TYPE_RAW | 0 | PCM encoding. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
## ContentType<sup>8+</sup><a name="contentype"></a> ## ContentType<sup>8+</sup><a name="contentype"></a>
Enumerates the content types. Enumerates the content types.
| Name | Default Value | Description | | Name | Default Value | Description |
| :------------------------ | :------------ | :-------------------- | | :------------------------ | :------------ | :------------------------------------------------------------------------------------- |
| CONTENT_TYPE_UNKNOWN | 0 | Unknown content. | | CONTENT_TYPE_UNKNOWN | 0 | Unknown content. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| CONTENT_TYPE_SPEECH | 1 | Speech content. | | CONTENT_TYPE_SPEECH | 1 | Speech content. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| CONTENT_TYPE_MUSIC | 2 | Music content. | | CONTENT_TYPE_MUSIC | 2 | Music content. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| CONTENT_TYPE_MOVIE | 3 | Movie content. | | CONTENT_TYPE_MOVIE | 3 | Movie content. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| CONTENT_TYPE_SONIFICATION | 4 | Notification content. | | CONTENT_TYPE_SONIFICATION | 4 | Notification content. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| CONTENT_TYPE_RINGTONE | 5 | Ringtone content. | | CONTENT_TYPE_RINGTONE | 5 | Ringtone content. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
## StreamUsage<sup>8+</sup><a name="streamusage"></a> ## StreamUsage<sup>8+</sup><a name="streamusage"></a>
Enumerates the stream usage. Enumerates the stream usage.
| Name | Default Value | Description | | Name | Default Value | Description |
| :--------------------------------- | :------------ | :------------------------------ | | :--------------------------------- | :------------ | :----------------------------------------------------------------------------------------------- |
| STREAM_USAGE_UNKNOWN | 0 | Unknown usage. | | STREAM_USAGE_UNKNOWN | 0 | Unknown usage. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| STREAM_USAGE_MEDIA | 1 | Media usage. | | STREAM_USAGE_MEDIA | 1 | Media usage. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| STREAM_USAGE_VOICE_COMMUNICATION | 2 | Voice communication usage. | | STREAM_USAGE_VOICE_COMMUNICATION | 2 | Voice communication usage. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| STREAM_USAGE_NOTIFICATION_RINGTONE | 3 | Notification or ringtone usage. | | STREAM_USAGE_NOTIFICATION_RINGTONE | 3 | Notification or ringtone usage. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
## AudioState<sup>8+</sup><a name="audiostate"></a> ## AudioState<sup>8+</sup><a name="audiostate"></a>
...@@ -394,54 +398,54 @@ Enumerates the audio states. ...@@ -394,54 +398,54 @@ Enumerates the audio states.
| Name | Default Value | Description | | Name | Default Value | Description |
| :------------- | :------------ | :------------------------- | | :------------- | :------------ | :------------------------- |
| STATE_INVALID | -1 | Invalid state. | | STATE_INVALID | -1 | Invalid state. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| STATE_NEW | 0 | Create New instance state. | | STATE_NEW | 0 | Create New instance state. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| STATE_PREPARED | 1 | Prepared state. | | STATE_PREPARED | 1 | Prepared state. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| STATE_RUNNING | 2 | Running state. | | STATE_RUNNING | 2 | Running state. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| STATE_STOPPED | 3 | Stopped state. | | STATE_STOPPED | 3 | Stopped state. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| STATE_RELEASED | 4 | Released state. | | STATE_RELEASED | 4 | Released state. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
| STATE_PAUSED | 5 | Paused state. | | STATE_PAUSED | 5 | Paused state. <br/> System capabilities: SystemCapability.Multimedia.Audio.Core |
## AudioRendererRate<sup>8+</sup><a name="audiorendererrate"></a> ## AudioRendererRate<sup>8+</sup><a name="audiorendererrate"></a>
Enumerates the audio renderer rates. Enumerates the audio renderer rates.
| Name | Default Value | Description | | Name | Default Value | Description |
| :----------------- | :------------ | :----------- | | :----------------- | :------------ | :-------------------------------------------------------------------------------- |
| RENDER_RATE_NORMAL | 0 | Normal rate. | | RENDER_RATE_NORMAL | 0 | Normal rate. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
| RENDER_RATE_DOUBLE | 1 | Double rate. | | RENDER_RATE_DOUBLE | 1 | Double rate. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
| RENDER_RATE_HALF | 2 | Half rate. | | RENDER_RATE_HALF | 2 | Half rate. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
## InterruptType<sup>8+</sup><a name="interrupttype"></a> ## InterruptType<sup>8+</sup><a name="interrupttype"></a>
Enumerates the interrupt types. Enumerates the interrupt types.
| Name | Default Value | Description | | Name | Default Value | Description |
| :------------------- | :------------ | :----------------------------------- | | :------------------- | :------------ | :-------------------------------------------------------------------------------------------------------- |
| INTERRUPT_TYPE_BEGIN | 1 | Audio playback interruption started. | | INTERRUPT_TYPE_BEGIN | 1 | Audio playback interruption started. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
| INTERRUPT_TYPE_END | 2 | Audio playback interruption ended. | | INTERRUPT_TYPE_END | 2 | Audio playback interruption ended. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
## InterruptForceType<sup>8+</sup><a name="interruptforcetype"></a> ## InterruptForceType<sup>8+</sup><a name="interruptforcetype"></a>
Enumerates the interrupt force types. Enumerates the interrupt force types.
| Name | Default Value | Description | | Name | Default Value | Description |
| :-------------- | :------------ | :--------------------------------------- | | :-------------- | :------------ | :------------------------------------------------------------------------------------------------------------ |
| INTERRUPT_FORCE | 0 | Forced action taken by system. | | INTERRUPT_FORCE | 0 | Forced action taken by system. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
| INTERRUPT_SHARE | 1 | App can choose to take action or ignore. | | INTERRUPT_SHARE | 1 | App can choose to take action or ignore. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
## InterruptHint<sup>8+</sup><a name="interrupthint"></a> ## InterruptHint<sup>8+</sup><a name="interrupthint"></a>
Enumerates the interrupt hints. Enumerates the interrupt hints.
| Name | Default Value | Description | | Name | Default Value | Description |
| :-------------------- | :------------ | :------------------------- | | :-------------------- | :------------ | :---------------------------------------------------------------------------------------------- |
| INTERRUPT_HINT_NONE | 0 | None. | | INTERRUPT_HINT_NONE | 0 | None. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
| INTERRUPT_HINT_RESUME | 1 | Resume the playback. | | INTERRUPT_HINT_RESUME | 1 | Resume the playback. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
| INTERRUPT_HINT_PAUSE | 2 | Paused/Pause the playback. | | INTERRUPT_HINT_PAUSE | 2 | Paused/Pause the playback. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
| INTERRUPT_HINT_STOP | 3 | Stopped/Stop the playback. | | INTERRUPT_HINT_STOP | 3 | Stopped/Stop the playback. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
| INTERRUPT_HINT_DUCK | 4 | Ducked the playback. | | INTERRUPT_HINT_DUCK | 4 | Ducked the playback. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
| INTERRUPT_HINT_UNDUCK | 5 | Unducked the playback. | | INTERRUPT_HINT_UNDUCK | 5 | Unducked the playback. <br/> System capabilities: SystemCapability.Multimedia.Audio.Renderer |
## RingtoneType<sup>8+</sup><a name="ringtonetype"></a> ## RingtoneType<sup>8+</sup><a name="ringtonetype"></a>
...@@ -455,6 +459,8 @@ Enumerates the ringtone types. ...@@ -455,6 +459,8 @@ Enumerates the ringtone types.
## AudioStreamInfo<sup>8+</sup><a name="audiorstreaminfo"></a> ## AudioStreamInfo<sup>8+</sup><a name="audiorstreaminfo"></a>
Describes audio stream information. Describes audio stream information.
**System capabilities**: SystemCapability.Multimedia.Audio.Core
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -467,6 +473,8 @@ Describes audio stream information. ...@@ -467,6 +473,8 @@ Describes audio stream information.
## AudioRendererInfo<sup>8+</sup><a name="audiorendererinfo"></a> ## AudioRendererInfo<sup>8+</sup><a name="audiorendererinfo"></a>
Describes audio renderer information. Describes audio renderer information.
**System capabilities**: SystemCapability.Multimedia.Audio.Core
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -475,10 +483,23 @@ Describes audio renderer information. ...@@ -475,10 +483,23 @@ Describes audio renderer information.
| usage | StreamUsage | Yes | Stream usage. | | usage | StreamUsage | Yes | Stream usage. |
| rendererFlags | number | Yes | Audio renderer flags. | | rendererFlags | number | Yes | Audio renderer flags. |
## AudioRendererOptions<sup>8+</sup><a name="audiorendereroptions"></a>
Describes audio renderer configuration options.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters**
| Name | Type | Mandatory | Description |
| :------------ | :---------------- | :-------- | :-------------------- |
| streamInfo | AudioStreamInfo | Yes | Stream information. |
| rendererInfo | AudioRendererInfo | Yes | Renderer information. |
## InterruptEvent<sup>8+</sup><a name="interruptevent"></a> ## InterruptEvent<sup>8+</sup><a name="interruptevent"></a>
Describes the interrupt event received by the app when playback is interrupted. Describes the interrupt event received by the app when playback is interrupted.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -491,6 +512,8 @@ Describes the interrupt event received by the app when playback is interrupted. ...@@ -491,6 +512,8 @@ Describes the interrupt event received by the app when playback is interrupted.
## VolumeEvent<sup>8+</sup><a name="volumeevent"></a> ## VolumeEvent<sup>8+</sup><a name="volumeevent"></a>
Describes the volume event received by the app when the volume is changed. Describes the volume event received by the app when the volume is changed.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -515,12 +538,16 @@ Describes ringtone options. ...@@ -515,12 +538,16 @@ Describes ringtone options.
Implements audio volume and audio device management. Implements audio volume and audio device management.
**System capabilities**: SystemCapability.Multimedia.Audio.Core
## audioManager.setVolume ## audioManager.setVolume
setVolume\(volumeType: AudioVolumeType, volume: number, callback: AsyncCallback<void\>\): void<a name="section189141826104616"></a> setVolume\(volumeType: AudioVolumeType, volume: number, callback: AsyncCallback<void\>\): void<a name="section189141826104616"></a>
Sets the volume for a stream. This method uses an asynchronous callback to return the result. Sets the volume for a stream. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table11004831415"></a> <a name="table11004831415"></a>
...@@ -585,6 +612,8 @@ setVolume\(volumeType: AudioVolumeType, volume: number\): Promise<void\><a name= ...@@ -585,6 +612,8 @@ setVolume\(volumeType: AudioVolumeType, volume: number\): Promise<void\><a name=
Sets the volume for a stream. This method uses a promise to return the result. Sets the volume for a stream. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table20688181818176"></a> <a name="table20688181818176"></a>
...@@ -650,6 +679,8 @@ getVolume\(volumeType: AudioVolumeType, callback: AsyncCallback<number\>\): void ...@@ -650,6 +679,8 @@ getVolume\(volumeType: AudioVolumeType, callback: AsyncCallback<number\>\): void
Obtains the volume of a stream. This method uses an asynchronous callback to return the query result. Obtains the volume of a stream. This method uses an asynchronous callback to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table44323134204"></a> <a name="table44323134204"></a>
...@@ -707,6 +738,8 @@ getVolume\(volumeType: AudioVolumeType\): Promise<number\><a name="section041219 ...@@ -707,6 +738,8 @@ getVolume\(volumeType: AudioVolumeType\): Promise<number\><a name="section041219
Obtains the volume of a stream. This method uses a promise to return the query result. Obtains the volume of a stream. This method uses a promise to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table174341113202016"></a> <a name="table174341113202016"></a>
...@@ -764,6 +797,8 @@ getMinVolume\(volumeType: AudioVolumeType, callback: AsyncCallback<number\>\): v ...@@ -764,6 +797,8 @@ getMinVolume\(volumeType: AudioVolumeType, callback: AsyncCallback<number\>\): v
Obtains the minimum volume allowed for a stream. This method uses an asynchronous callback to return the query result. Obtains the minimum volume allowed for a stream. This method uses an asynchronous callback to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table9585157122219"></a> <a name="table9585157122219"></a>
...@@ -821,6 +856,8 @@ getMinVolume\(volumeType: AudioVolumeType\): Promise<number\><a name="section415 ...@@ -821,6 +856,8 @@ getMinVolume\(volumeType: AudioVolumeType\): Promise<number\><a name="section415
Obtains the minimum volume allowed for a stream. This method uses a promise to return the query result. Obtains the minimum volume allowed for a stream. This method uses a promise to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table558627102215"></a> <a name="table558627102215"></a>
...@@ -878,6 +915,8 @@ getMaxVolume\(volumeType: AudioVolumeType, callback: AsyncCallback<number\>\): v ...@@ -878,6 +915,8 @@ getMaxVolume\(volumeType: AudioVolumeType, callback: AsyncCallback<number\>\): v
Obtains the maximum volume allowed for a stream. This method uses an asynchronous callback to return the query result. Obtains the maximum volume allowed for a stream. This method uses an asynchronous callback to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table7210144262214"></a> <a name="table7210144262214"></a>
...@@ -935,6 +974,8 @@ getMaxVolume\(volumeType: AudioVolumeType\): Promise<number\><a name="section155 ...@@ -935,6 +974,8 @@ getMaxVolume\(volumeType: AudioVolumeType\): Promise<number\><a name="section155
Obtains the maximum volume allowed for a stream. This method uses a promise to return the query result. Obtains the maximum volume allowed for a stream. This method uses a promise to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table11211104210226"></a> <a name="table11211104210226"></a>
...@@ -991,6 +1032,8 @@ mute\(volumeType: AudioVolumeType, mute: boolean, callback: AsyncCallback<void\> ...@@ -991,6 +1032,8 @@ mute\(volumeType: AudioVolumeType, mute: boolean, callback: AsyncCallback<void\>
Mutes a stream. This method uses an asynchronous callback to return the result. Mutes a stream. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table16516183634618"></a> <a name="table16516183634618"></a>
...@@ -1057,6 +1100,8 @@ mute\(volumeType: AudioVolumeType, mute: boolean\): Promise<void\><sup>7+</sup>< ...@@ -1057,6 +1100,8 @@ mute\(volumeType: AudioVolumeType, mute: boolean\): Promise<void\><sup>7+</sup><
Mutes a stream. This method uses a promise to return the result. Mutes a stream. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table9519103616467"></a> <a name="table9519103616467"></a>
...@@ -1123,6 +1168,8 @@ isMute\(volumeType: AudioVolumeType, callback: AsyncCallback<boolean\>\): void<s ...@@ -1123,6 +1168,8 @@ isMute\(volumeType: AudioVolumeType, callback: AsyncCallback<boolean\>\): void<s
Checks whether a stream is muted. This method uses an asynchronous callback to return the query result. Checks whether a stream is muted. This method uses an asynchronous callback to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table26841038115812"></a> <a name="table26841038115812"></a>
...@@ -1180,6 +1227,8 @@ isMute\(volumeType: AudioVolumeType\): Promise<boolean\><sup>7+</sup><a name="se ...@@ -1180,6 +1227,8 @@ isMute\(volumeType: AudioVolumeType\): Promise<boolean\><sup>7+</sup><a name="se
Checks whether a stream is muted. This method uses a promise to return the result. Checks whether a stream is muted. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table179201611155614"></a> <a name="table179201611155614"></a>
...@@ -1237,6 +1286,8 @@ isActive\(volumeType: AudioVolumeType, callback: AsyncCallback<boolean\>\): void ...@@ -1237,6 +1286,8 @@ isActive\(volumeType: AudioVolumeType, callback: AsyncCallback<boolean\>\): void
Checks whether a stream is active. This method uses an asynchronous callback to return the query result. Checks whether a stream is active. This method uses an asynchronous callback to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table11801954151215"></a> <a name="table11801954151215"></a>
...@@ -1294,6 +1345,8 @@ isActive\(volumeType: AudioVolumeType\): Promise<boolean\><sup>7+</sup><a name=" ...@@ -1294,6 +1345,8 @@ isActive\(volumeType: AudioVolumeType\): Promise<boolean\><sup>7+</sup><a name="
Checks whether a stream is active. This method uses a promise to return the query result. Checks whether a stream is active. This method uses a promise to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
<a name="table18041954171217"></a> <a name="table18041954171217"></a>
...@@ -1351,6 +1404,8 @@ setRingerMode\(mode: AudioRingMode, callback: AsyncCallback<void\>\): void<sup>7 ...@@ -1351,6 +1404,8 @@ setRingerMode\(mode: AudioRingMode, callback: AsyncCallback<void\>\): void<sup>7
Sets the ringer mode. This method uses an asynchronous callback to return the result. Sets the ringer mode. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Communication
**Parameters** **Parameters**
<a name="table157219143361"></a> <a name="table157219143361"></a>
...@@ -1408,6 +1463,8 @@ setRingerMode\(mode: AudioRingMode\): Promise<void\><sup>7+</sup><a name="sectio ...@@ -1408,6 +1463,8 @@ setRingerMode\(mode: AudioRingMode\): Promise<void\><sup>7+</sup><a name="sectio
Sets the ringer mode. This method uses a promise to return the result. Sets the ringer mode. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Communication
**Parameters** **Parameters**
<a name="table55743147369"></a> <a name="table55743147369"></a>
...@@ -1465,6 +1522,8 @@ getRingerMode\(callback: AsyncCallback<AudioRingMode\>\): void<sup>7+</sup><a na ...@@ -1465,6 +1522,8 @@ getRingerMode\(callback: AsyncCallback<AudioRingMode\>\): void<sup>7+</sup><a na
Obtains the ringer mode. This method uses an asynchronous callback to return the query result. Obtains the ringer mode. This method uses an asynchronous callback to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Communication
**Parameters** **Parameters**
<a name="table139051710191611"></a> <a name="table139051710191611"></a>
...@@ -1513,6 +1572,8 @@ getRingerMode\(\): Promise<AudioRingMode\><sup>7+</sup><a name="section139082101 ...@@ -1513,6 +1572,8 @@ getRingerMode\(\): Promise<AudioRingMode\><sup>7+</sup><a name="section139082101
Obtains the ringer mode. This method uses a promise to return the query result. Obtains the ringer mode. This method uses a promise to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Communication
**Parameters** **Parameters**
None None
...@@ -1549,6 +1610,8 @@ setAudioParameter\(key: string, value: string, callback: AsyncCallback<void\>\): ...@@ -1549,6 +1610,8 @@ setAudioParameter\(key: string, value: string, callback: AsyncCallback<void\>\):
Sets an audio parameter. This method uses an asynchronous callback to return the result. Sets an audio parameter. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Core
**Parameters** **Parameters**
<a name="table59175774814"></a> <a name="table59175774814"></a>
...@@ -1615,6 +1678,8 @@ setAudioParameter\(key: string, value: string\): Promise<void\><sup>7+</sup><a n ...@@ -1615,6 +1678,8 @@ setAudioParameter\(key: string, value: string\): Promise<void\><sup>7+</sup><a n
Sets an audio parameter. This method uses a promise to return the result. Sets an audio parameter. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Core
**Parameters** **Parameters**
<a name="table18121957164810"></a> <a name="table18121957164810"></a>
...@@ -1681,6 +1746,8 @@ getAudioParameter\(key: string, callback: AsyncCallback<string\>\): void<sup>7+< ...@@ -1681,6 +1746,8 @@ getAudioParameter\(key: string, callback: AsyncCallback<string\>\): void<sup>7+<
Obtains the value of an audio parameter. This method uses an asynchronous callback to return the query result. Obtains the value of an audio parameter. This method uses an asynchronous callback to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Core
**Parameters** **Parameters**
<a name="table1315657114817"></a> <a name="table1315657114817"></a>
...@@ -1738,6 +1805,8 @@ getAudioParameter\(key: string\): Promise<string\><sup>7+</sup><a name="section3 ...@@ -1738,6 +1805,8 @@ getAudioParameter\(key: string\): Promise<string\><sup>7+</sup><a name="section3
Obtains the value of an audio parameter. This method uses a promise to return the query result. Obtains the value of an audio parameter. This method uses a promise to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Core
**Parameters** **Parameters**
<a name="table5180572488"></a> <a name="table5180572488"></a>
...@@ -1795,6 +1864,8 @@ getDevices\(deviceFlag: DeviceFlag, callback: AsyncCallback<AudioDeviceDescripto ...@@ -1795,6 +1864,8 @@ getDevices\(deviceFlag: DeviceFlag, callback: AsyncCallback<AudioDeviceDescripto
Obtains the audio devices with a specific flag. This method uses an asynchronous callback to return the query result. Obtains the audio devices with a specific flag. This method uses an asynchronous callback to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
**Parameters** **Parameters**
<a name="table8653191616249"></a> <a name="table8653191616249"></a>
...@@ -1853,6 +1924,8 @@ getDevices\(deviceFlag: DeviceFlag\): Promise<AudioDeviceDescriptors\><a name="s ...@@ -1853,6 +1924,8 @@ getDevices\(deviceFlag: DeviceFlag\): Promise<AudioDeviceDescriptors\><a name="s
Obtains the audio devices with a specific flag. This method uses a promise to return the query result. Obtains the audio devices with a specific flag. This method uses a promise to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
**Parameters** **Parameters**
<a name="table17655516132411"></a> <a name="table17655516132411"></a>
...@@ -1910,6 +1983,8 @@ setDeviceActive\(deviceType: DeviceType, active: boolean, callback: AsyncCallbac ...@@ -1910,6 +1983,8 @@ setDeviceActive\(deviceType: DeviceType, active: boolean, callback: AsyncCallbac
Sets a device to the active state. This method uses an asynchronous callback to return the result. Sets a device to the active state. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
**Parameters** **Parameters**
<a name="table5355740142213"></a> <a name="table5355740142213"></a>
...@@ -1977,6 +2052,8 @@ setDeviceActive\(deviceType: DeviceType, active: boolean\): Promise<void\><sup>7 ...@@ -1977,6 +2052,8 @@ setDeviceActive\(deviceType: DeviceType, active: boolean\): Promise<void\><sup>7
Sets a device to the active state. This method uses a promise to return the result. Sets a device to the active state. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
**Parameters** **Parameters**
<a name="table1335914018225"></a> <a name="table1335914018225"></a>
...@@ -2043,6 +2120,8 @@ isDeviceActive\(deviceType: DeviceType, callback: AsyncCallback<boolean\>\): voi ...@@ -2043,6 +2120,8 @@ isDeviceActive\(deviceType: DeviceType, callback: AsyncCallback<boolean\>\): voi
Checks whether a device is active. This method uses an asynchronous callback to return the query result. Checks whether a device is active. This method uses an asynchronous callback to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
**Parameters** **Parameters**
<a name="table13638406221"></a> <a name="table13638406221"></a>
...@@ -2100,6 +2179,8 @@ isDeviceActive\(deviceType: DeviceType\): Promise<boolean\><sup>7+</sup><a name= ...@@ -2100,6 +2179,8 @@ isDeviceActive\(deviceType: DeviceType\): Promise<boolean\><sup>7+</sup><a name=
Checks whether a device is active. This method uses a promise to return the query result. Checks whether a device is active. This method uses a promise to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
**Parameters** **Parameters**
<a name="table10366184019222"></a> <a name="table10366184019222"></a>
...@@ -2157,6 +2238,8 @@ setMicrophoneMute\(mute: boolean, callback: AsyncCallback<void\>\): void<sup>7+< ...@@ -2157,6 +2238,8 @@ setMicrophoneMute\(mute: boolean, callback: AsyncCallback<void\>\): void<sup>7+<
Mutes or unmutes the microphone. This method uses an asynchronous callback to return the result. Mutes or unmutes the microphone. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
**Parameters** **Parameters**
<a name="table6703123691210"></a> <a name="table6703123691210"></a>
...@@ -2214,6 +2297,8 @@ setMicrophoneMute\(mute: boolean\): Promise<void\><sup>7+</sup><a name="section5 ...@@ -2214,6 +2297,8 @@ setMicrophoneMute\(mute: boolean\): Promise<void\><sup>7+</sup><a name="section5
Mutes or unmutes the microphone. This method uses a promise to return the result. Mutes or unmutes the microphone. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
**Parameters** **Parameters**
<a name="table36281411997"></a> <a name="table36281411997"></a>
...@@ -2271,6 +2356,8 @@ isMicrophoneMute\(callback: AsyncCallback<boolean\>\): void<sup>7+</sup><a name= ...@@ -2271,6 +2356,8 @@ isMicrophoneMute\(callback: AsyncCallback<boolean\>\): void<sup>7+</sup><a name=
Checks whether the microphone is muted. This method uses an asynchronous callback to return the query result. Checks whether the microphone is muted. This method uses an asynchronous callback to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
**Parameters** **Parameters**
<a name="table263341115910"></a> <a name="table263341115910"></a>
...@@ -2319,6 +2406,8 @@ isMicrophoneMute\(\): Promise<boolean\><sup>7+</sup><a name="section196363111918 ...@@ -2319,6 +2406,8 @@ isMicrophoneMute\(\): Promise<boolean\><sup>7+</sup><a name="section196363111918
Checks whether the microphone is muted. This method uses a promise to return the query result. Checks whether the microphone is muted. This method uses a promise to return the query result.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
**Parameters** **Parameters**
None None
...@@ -2355,6 +2444,8 @@ on(type: 'volumeChange', callback: Callback<VolumeEvent\>): void<sup>8+</sup><a ...@@ -2355,6 +2444,8 @@ on(type: 'volumeChange', callback: Callback<VolumeEvent\>): void<sup>8+</sup><a
Listens for system volume change events. This method uses a callback to get volume change events. Listens for system volume change events. This method uses a callback to get volume change events.
**System capabilities**: SystemCapability.Multimedia.Audio.Volume
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -2383,6 +2474,8 @@ on(type: 'ringerModeChange', callback: Callback<AudioRingMode\>): void<sup>8+</s ...@@ -2383,6 +2474,8 @@ on(type: 'ringerModeChange', callback: Callback<AudioRingMode\>): void<sup>8+</s
Listens for ringer mode change events. This method uses a callback to get ringer mode changes. Listens for ringer mode change events. This method uses a callback to get ringer mode changes.
**System capabilities**: SystemCapability.Multimedia.Audio.Communication
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -2405,12 +2498,16 @@ audioManager.on('ringerModeChange', (ringerMode) => { ...@@ -2405,12 +2498,16 @@ audioManager.on('ringerModeChange', (ringerMode) => {
# AudioDeviceDescriptor<a name="section164657411927"></a> # AudioDeviceDescriptor<a name="section164657411927"></a>
Describes an audio device. Describes an audio device.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
## AudioDeviceDescriptors<a name="section5181155710523"></a> ## AudioDeviceDescriptors<a name="section5181155710523"></a>
type AudioDeviceDescriptors = Array<Readonly<AudioDeviceDescriptor\>\> : void<a name="audiodevicedescriptors"></a>\ type AudioDeviceDescriptors = Array<Readonly<AudioDeviceDescriptor\>\> : void<a name="audiodevicedescriptors"></a>\
<br> <br>
Array of AudioDeviceDescriptors, which is read-only. Array of AudioDeviceDescriptors, which is read-only.
**System capabilities**: SystemCapability.Multimedia.Audio.Device
## audioDeviceDescriptor.deviceRole ## audioDeviceDescriptor.deviceRole
readonly deviceRole: DeviceRole <a name="devicerole-getter"></a> readonly deviceRole: DeviceRole <a name="devicerole-getter"></a>
...@@ -2459,6 +2556,7 @@ promise.then(async function (audioDeviceDescriptors) { ...@@ -2459,6 +2556,7 @@ promise.then(async function (audioDeviceDescriptors) {
# AudioRenderer<a name="audiorenderer"></a> # AudioRenderer<a name="audiorenderer"></a>
Provides audio playback APIs. Provides audio playback APIs.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
## audioRenderer.state ## audioRenderer.state
...@@ -2466,6 +2564,8 @@ readonly state: AudioState <sup>8+</sup><a name="rendererstate-getter"></a> ...@@ -2466,6 +2564,8 @@ readonly state: AudioState <sup>8+</sup><a name="rendererstate-getter"></a>
Defines the current render state. Defines the current render state.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
| Name | Type | Readable | Writable | Description | | Name | Type | Readable | Writable | Description |
| :---- | :--------- | :------- | :------- | :------------------ | | :---- | :--------- | :------- | :------- | :------------------ |
| state | AudioState | Yes | No | Audio render state. | | state | AudioState | Yes | No | Audio render state. |
...@@ -2482,12 +2582,13 @@ getRendererInfo(callback: AsyncCallback<AudioRendererInfo\>): void<sup>8+</sup>< ...@@ -2482,12 +2582,13 @@ getRendererInfo(callback: AsyncCallback<AudioRendererInfo\>): void<sup>8+</sup><
Gets the renderer information provided while creating a renderer instance. This method uses an asynchronous callback to return the result. Gets the renderer information provided while creating a renderer instance. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| :------- | :--------------------------------- | :-------- | :------------------------------------------------ | | :------- | :--------------------------------- | :-------- | :------------------------------------------------ |
| callback | AsyncCallback<AudioRendererInfo\> | Yes | Callback used to return the renderer information. | | callback | AsyncCallback<AudioRendererInfo\> | Yes | Callback used to return the renderer information. |
| | | | |
**Return value** **Return value**
...@@ -2511,6 +2612,8 @@ getParams(): Promise<AudioRendererInfo\><sup>8+</sup><a name="getrendererinfo-pr ...@@ -2511,6 +2612,8 @@ getParams(): Promise<AudioRendererInfo\><sup>8+</sup><a name="getrendererinfo-pr
Gets the renderer information provided while creating a renderer instance. This method uses a promise to return the result. Gets the renderer information provided while creating a renderer instance. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
...@@ -2537,12 +2640,13 @@ getStreamInfo(callback: AsyncCallback<AudioStreamInfo\>): void<sup>8+</sup><a na ...@@ -2537,12 +2640,13 @@ getStreamInfo(callback: AsyncCallback<AudioStreamInfo\>): void<sup>8+</sup><a na
Gets the renderer stream information. This method uses an asynchronous callback to return the result. Gets the renderer stream information. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| :------- | :--------------------------------- | :-------- | :---------------------------------------------- | | :------- | :--------------------------------- | :-------- | :---------------------------------------------- |
| callback | AsyncCallback<AudioStreamInfo\> | Yes | Callback used to return the stream information. | | callback | AsyncCallback<AudioStreamInfo\> | Yes | Callback used to return the stream information. |
| | | | |
**Return value** **Return value**
...@@ -2566,15 +2670,17 @@ getStreamInfo(): Promise<AudioStreamInfo\><sup>8+</sup><a name="getstreaminfo-pr ...@@ -2566,15 +2670,17 @@ getStreamInfo(): Promise<AudioStreamInfo\><sup>8+</sup><a name="getstreaminfo-pr
Gets the renderer stream information. This method uses a promise to return the result. Gets the renderer stream information. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
**Return value** **Return value**
| Type | Description | | Type | Description |
| :---------------------------- | :----------------------------------------------- | | :---------------------------- | :--------------------------------------------- |
| Promise<AudioStreamInfo\> | Promise used to return the stream information. | | Promise<AudioStreamInfo\> | Promise used to return the stream information. |
**Example** **Example**
...@@ -2593,6 +2699,8 @@ start(callback: AsyncCallback<void\>): void<sup>8+</sup><a name="start-asynccall ...@@ -2593,6 +2699,8 @@ start(callback: AsyncCallback<void\>): void<sup>8+</sup><a name="start-asynccall
Starts the renderer. This method uses an asynchronous callback to return the result. Starts the renderer. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -2623,6 +2731,8 @@ start(): Promise<void\><a name="start-promise"><sup>8+</sup></a> ...@@ -2623,6 +2731,8 @@ start(): Promise<void\><a name="start-promise"><sup>8+</sup></a>
Starts the renderer. This method uses a promise to return the result. Starts the renderer. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
...@@ -2646,6 +2756,8 @@ pause(callback: AsyncCallback<void\>): void<sup>8+</sup><a name="pause-asynccall ...@@ -2646,6 +2756,8 @@ pause(callback: AsyncCallback<void\>): void<sup>8+</sup><a name="pause-asynccall
Pauses rendering. This method uses an asynchronous callback to return the result. Pauses rendering. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -2677,6 +2789,8 @@ pause(): Promise<void\><sup>8+</sup><a name="pause-promise"></a> ...@@ -2677,6 +2789,8 @@ pause(): Promise<void\><sup>8+</sup><a name="pause-promise"></a>
Pauses rendering. This method uses a promise to return the result. Pauses rendering. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
...@@ -2701,6 +2815,8 @@ drain(callback: AsyncCallback<void\>): void<sup>8+</sup><a name="drain-asynccall ...@@ -2701,6 +2815,8 @@ drain(callback: AsyncCallback<void\>): void<sup>8+</sup><a name="drain-asynccall
Drains the playback buffer. This method uses an asynchronous callback to return the result. Drains the playback buffer. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -2731,6 +2847,8 @@ drain(): Promise<void\><sup>8+</sup><a name="drain-promise"></a> ...@@ -2731,6 +2847,8 @@ drain(): Promise<void\><sup>8+</sup><a name="drain-promise"></a>
Drains the playback buffer. This method uses a promise to return the result. Drains the playback buffer. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
...@@ -2754,6 +2872,8 @@ stop(callback: AsyncCallback<void\>): void<sup>8+</sup><a name="stop-asynccallba ...@@ -2754,6 +2872,8 @@ stop(callback: AsyncCallback<void\>): void<sup>8+</sup><a name="stop-asynccallba
Stops rendering. This method uses an asynchronous callback to return the result. Stops rendering. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -2784,6 +2904,8 @@ stop(): Promise<void\><sup>8+</sup><a name="stop-promise"></a> ...@@ -2784,6 +2904,8 @@ stop(): Promise<void\><sup>8+</sup><a name="stop-promise"></a>
Stops rendering. This method uses a promise to return the result. Stops rendering. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
...@@ -2807,6 +2929,8 @@ release(callback: AsyncCallback<void\>): void<sup>8+</sup><a name="release-async ...@@ -2807,6 +2929,8 @@ release(callback: AsyncCallback<void\>): void<sup>8+</sup><a name="release-async
Releases the renderer. This method uses an asynchronous callback to return the result. Releases the renderer. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -2838,6 +2962,8 @@ release(): Promise<void\><sup>8+</sup><a name="release-promise"></a> ...@@ -2838,6 +2962,8 @@ release(): Promise<void\><sup>8+</sup><a name="release-promise"></a>
Releases the renderer. This method uses a promise to return the result. Releases the renderer. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
...@@ -2862,6 +2988,8 @@ write(buffer: ArrayBuffer, callback: AsyncCallback<number\>): void<sup>8+</sup>< ...@@ -2862,6 +2988,8 @@ write(buffer: ArrayBuffer, callback: AsyncCallback<number\>): void<sup>8+</sup><
Writes the buffer. This method uses an asynchronous callback to return the result. Writes the buffer. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -2896,6 +3024,8 @@ write(buffer: ArrayBuffer): Promise<number\><sup>8+</sup><a name="write-promise" ...@@ -2896,6 +3024,8 @@ write(buffer: ArrayBuffer): Promise<number\><sup>8+</sup><a name="write-promise"
Writes the buffer. This method uses a promise to return the result. Writes the buffer. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
...@@ -2928,6 +3058,8 @@ getAudioTime(callback: AsyncCallback<number\>): void<sup>8+</sup><a name="getaud ...@@ -2928,6 +3058,8 @@ getAudioTime(callback: AsyncCallback<number\>): void<sup>8+</sup><a name="getaud
Obtains the timestamp. This method uses an asynchronous callback to return the result. Obtains the timestamp. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -2954,6 +3086,8 @@ getAudioTime(): Promise<number\><sup>8+</sup><a name="getaudiotime-promise"></a> ...@@ -2954,6 +3086,8 @@ getAudioTime(): Promise<number\><sup>8+</sup><a name="getaudiotime-promise"></a>
Obtains the timestamp. This method uses a promise to return the result. Obtains the timestamp. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
...@@ -2978,6 +3112,8 @@ getBufferSize(callback: AsyncCallback<number\>): void<sup>8+</sup><a name="getbu ...@@ -2978,6 +3112,8 @@ getBufferSize(callback: AsyncCallback<number\>): void<sup>8+</sup><a name="getbu
Obtains a reasonable minimum buffer size for rendering. This method uses an asynchronous callback to return the result. Obtains a reasonable minimum buffer size for rendering. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -3008,6 +3144,8 @@ getBufferSize(): Promise<number\><sup>8+</sup><a name="getbuffersize-promise"></ ...@@ -3008,6 +3144,8 @@ getBufferSize(): Promise<number\><sup>8+</sup><a name="getbuffersize-promise"></
Obtains a reasonable minimum buffer size for rendering. This method uses a promise to return the result. Obtains a reasonable minimum buffer size for rendering. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
...@@ -3033,13 +3171,14 @@ setRenderRate(rate: AudioRendererRate, callback: AsyncCallback<void\>): void<sup ...@@ -3033,13 +3171,14 @@ setRenderRate(rate: AudioRendererRate, callback: AsyncCallback<void\>): void<sup
Sets the render rate. This method uses an asynchronous callback to return the result. Sets the render rate. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| :------- | :------------------- | :-------- | :---------------------------------- | | :------- | :------------------- | :-------- | :------------------------------------ |
| rate | AudioRendererRate | Yes | Audio render rate. | | rate | AudioRendererRate | Yes | Audio render rate. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
| | | | |
**Return value** **Return value**
...@@ -3064,6 +3203,8 @@ setRenderRate(rate: AudioRendererRate): Promise<void\><sup>8+</sup><a name="setr ...@@ -3064,6 +3203,8 @@ setRenderRate(rate: AudioRendererRate): Promise<void\><sup>8+</sup><a name="setr
Sets the render rate. This method uses a promise to return the result. Sets the render rate. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
...@@ -3089,11 +3230,12 @@ getRenderRate(callback: AsyncCallback<AudioRendererRate\>): void<sup>8+</sup><a ...@@ -3089,11 +3230,12 @@ getRenderRate(callback: AsyncCallback<AudioRendererRate\>): void<sup>8+</sup><a
Obtains the current render rate. This method uses an asynchronous callback to return the result. Obtains the current render rate. This method uses an asynchronous callback to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| :------- | :-------------------------------- | :-------- | :--------------------------------------------- | | :------- | :-------------------------------- | :-------- | :--------------------------------------------- |
| callback | AsyncCallback<AudioRendererRate\> | Yes | Callback used to return the audio render rate. | | callback | AsyncCallback<AudioRendererRate\> | Yes | Callback used to return the audio render rate. |
| | | | |
**Return value** **Return value**
...@@ -3114,6 +3256,8 @@ getRenderRate(): Promise<AudioRendererRate\><a name="getrenderrate-promise"><sup ...@@ -3114,6 +3256,8 @@ getRenderRate(): Promise<AudioRendererRate\><a name="getrenderrate-promise"><sup
Obtains the current render rate. This method uses a promise to return the result. Obtains the current render rate. This method uses a promise to return the result.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
None None
...@@ -3138,6 +3282,8 @@ on(type: 'interrupt', callback: Callback<InterruptEvent\>): void<sup>8+</sup><a ...@@ -3138,6 +3282,8 @@ on(type: 'interrupt', callback: Callback<InterruptEvent\>): void<sup>8+</sup><a
Listens for audio interrupt events. This method uses a callback to get interrupt events. The interrupt event is triggered when audio playback is interrupted. Listens for audio interrupt events. This method uses a callback to get interrupt events. The interrupt event is triggered when audio playback is interrupted.
**System capabilities**: SystemCapability.Multimedia.Audio.Renderer
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| :------- | :------------------------ | :-------- | :---------------------------------------------- | | :------- | :------------------------ | :-------- | :---------------------------------------------- |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册