| context | [WorkSchedulerExtensionContext](js-apis-inner-application-WorkSchedulerExtensionContext.md) | Yes| No| Context of the **WorkSchedulerExtension**. This context is inherited from **ExtensionContext**.|
| context<sup>10+</sup> | [WorkSchedulerExtensionContext](js-apis-inner-application-WorkSchedulerExtensionContext.md) | Yes| No| Context of the **WorkSchedulerExtension**. This context is inherited from **ExtensionContext**.|
| content | [ContentType](#contenttype) | No | Audio content type.<br>This parameter is mandatory in API versions 8 and 9 and optional since API version 10.|
| privacyType<sup>10+</sup> | [AudioPrivacyType](#audioprivacytype) | No| Whether the audio stream can be recorded by other applications. The default value is **0**.<br>**System capability**: SystemCapability.Multimedia.Audio.PlaybackCapture|
This permission is required when an application wants to record a played audio stream for which **StreamUsage** is set to **SOURCE_TYPE_VOICE_COMMUNICATION**.
| usages | Array<[StreamUsage](#streamusage)> | Yes | [StreamUsage](#streamusage) of the audio stream to be recorded. You can specify zero or more stream usages. If the array is empty, the audio stream for which **StreamUsage** is **STREAM_USAGE_MEDIA** is recorded by default.|
| VOLUME_UP | 0 | Adjusts the volume upwards.<br>This is a system API. |
| VOLUME_DOWN | 1 | Adjusts the volume downwards.<br>This is a system API. |
## AudioManager
Implements audio volume and audio device management. Before calling any API in **AudioManager**, you must use [getAudioManager](#audiogetaudiomanager) to create an **AudioManager** instance.
> You are advised to use [on('volumeChange')](#onvolumechange9) in **AudioVolumeManager**.
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [on('volumeChange')](#onvolumechange9) in **AudioVolumeManager**.
Checks whether the fixed volume mode is enabled. When the fixed volume mode is enabled, the volume cannot be adjusted. This API returns the result synchronously.
| boolean | Returns the status of the fixed volume mode. The value **true** means that the fixed volume mode is enabled, and **false** means the opposite.|
console.info(`Success to get the volume DB. ${value}`);
}).catch((error)=>{
console.error(`Fail to adjust the system volume by step. ${error}`);
});
```
## AudioStreamManager<sup>9+</sup>
Implements audio stream management. Before calling any API in **AudioStreamManager**, you must use [getStreamManager](#getstreammanager9) to obtain an **AudioStreamManager** instance.
...
...
@@ -3195,7 +3523,7 @@ async function getCurrentAudioCapturerInfoArray(){
| name<sup>9+</sup> | string | Yes | No | Device name.<br>For a Bluetooth device, you must request the **ohos.permission.USE_BLUETOOTH** permission.|
| address<sup>9+</sup> | string | Yes | No | Device address.<br>For a Bluetooth device, you must request the **ohos.permission.USE_BLUETOOTH** permission.|
Subscribes to period reached events. When the number of frames rendered reaches the value of the **frame** parameter, a callback is triggered and the specified value is returned.
| type | string | Yes | Event type. The value **'outputDeviceChange'** means the audio output device change event, which is triggered when the audio output device changes.|
| callback | Callback\<[AudioDeviceDescriptors](#audiodevicedescriptors)> | Yes | Callback used to return the audio output device change. |
| type | string | Yes | Event type. The value **'outputDeviceChange'** means the audio output device change event, which is triggered when the audio output device changes.|
| callback | Callback\<[AudioDeviceDescriptors](#audiodevicedescriptors)> | No | Callback used for unsubscription. |
Provides APIs for audio capture. Before calling any API in **AudioCapturer**, you must use [createAudioCapturer](#audiocreateaudiocapturer8) to create an **AudioCapturer** instance.
...
...
@@ -6092,10 +6712,38 @@ async function onAudioInterrupt(){
| type | string | Yes | Event type. The value **'audioInterrupt'** means the audio interruption event, which is triggered when audio capturing is interrupted.|
**Error codes**
For details about the error codes, see [Audio Error Codes](../errorcodes/errorcode-audio.md).
Subscribes to period reached events. When the number of frames captured reaches the value of the **frame** parameter, a callback is triggered and the specified value is returned.
Immersive window: System windows such as the status bar and navigation bar are controlled in such a way that they are unobtrusive and natural looking in the entire screen, thereby engaging users more deeply with the content displayed.
The immersive window feature is valid only when the main window of an application is displayed in full-screen mode. It does not apply to a main window in free window mode or a subwindow (for example, a dialog box or a floating window).
## When to Use
...
...
@@ -164,7 +165,7 @@ To create a better video watching and gaming experience, you can use the immersi
2. Implement the immersive effect. You can use either of the following methods:
- Method 1: When the main window of the application is a full-screen window, call **setWindowSystemBarEnable** to hide the status bar and navigation bar.
- Method 2: Call **setWindowLayoutFullScreen** to enable the full-screen mode for the main window layout. Call **setSystemProperties** to set the opacity, background color, text color, and highlighted icon of the status bar and navigation bar to ensure that their display effect is consistent with that of the main window.
- Method 2: Call **setWindowLayoutFullScreen** to enable the full-screen mode for the main window layout. Call **setWindowSystemBarProperties** to set the opacity, background color, text color, and highlighted icon of the status bar and navigation bar to ensure that their display effect is consistent with that of the main window.