diff --git a/en/application-dev/file-management/Readme-EN.md b/en/application-dev/file-management/Readme-EN.md
index bdc1bc7c1b00195bc24c71396f4fed78b93de15a..e96bf81837a170a61796100c3f1e0080687f39ec 100644
--- a/en/application-dev/file-management/Readme-EN.md
+++ b/en/application-dev/file-management/Readme-EN.md
@@ -15,8 +15,8 @@
- Selecting and Saving User Files (FilePicker)
- [Selecting User Files](select-user-file.md)
- [Saving User Files](save-user-file.md)
- - [Developing a FileManager Application (Available Only for System Applications)](dev-user-file-manager.md)
- - [Managing External Storage Devices (Available Only for System Applications)](manage-external-storage.md)
+ - [Developing a FileManager Application (for System Applications Only)](dev-user-file-manager.md)
+ - [Managing External Storage Devices (for System Applications Only)](manage-external-storage.md)
- Distributed File System
- [Distributed File System Overview](distributed-fs-overview.md)
- [Setting the Security Level of a Distributed File](set-security-label.md)
diff --git a/en/application-dev/file-management/dev-user-file-manager.md b/en/application-dev/file-management/dev-user-file-manager.md
index e048ad7fefa3cf5ddf26ad3764403231cc3045dd..26181bb321310d1261ce2b87138b7fd2aa118552 100644
--- a/en/application-dev/file-management/dev-user-file-manager.md
+++ b/en/application-dev/file-management/dev-user-file-manager.md
@@ -1,4 +1,4 @@
-# Developing a FileManager Application (Available Only for System Applications)
+# Developing a FileManager Application (for System Applications Only)
OpenHarmony is prebuilt with the **FileManager** application. You can also develop your own **FileManager** as required.
diff --git a/en/application-dev/file-management/manage-external-storage.md b/en/application-dev/file-management/manage-external-storage.md
index 9889b4f8f0f6caaf49f0801c6d92ffe2f8bfc11f..bd5c01712cb48d6b8ac151b67a5b747967882870 100644
--- a/en/application-dev/file-management/manage-external-storage.md
+++ b/en/application-dev/file-management/manage-external-storage.md
@@ -1,4 +1,4 @@
-# Managing External Storage Devices (Available Only for System Applications)
+# Managing External Storage Devices (for System Applications Only)
External storage devices are pluggable. OpenHarmony provides the functions of listening for the device insertion and removal events and mounting/unmounting an external storage device.
@@ -28,13 +28,13 @@ The following table describes the broadcast related parameters.
**Table 1** Broadcast parameters
-| Broadcast| Parameter|
+| Broadcast| Parameter|
| -------- | -------- |
-| usual.event.data.VOLUME_REMOVED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.|
-| usual.event.data.VOLUME_UNMOUNTED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.|
-| usual.event.data.VOLUME_MOUNTED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.
**fsUuid**: universally unique identifier (UUID) of the volume.
**path**: path where the volume is mounted.|
-| usual.event.data.VOLUME_BAD_REMOVAL | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.|
-| usual.event.data.VOLUME_EJECT | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.|
+| usual.event.data.VOLUME_REMOVED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.|
+| usual.event.data.VOLUME_UNMOUNTED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.|
+| usual.event.data.VOLUME_MOUNTED | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.
**fsUuid**: universally unique identifier (UUID) of the volume.
**path**: path where the volume is mounted.|
+| usual.event.data.VOLUME_BAD_REMOVAL | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.|
+| usual.event.data.VOLUME_EJECT | **id**: ID of the volume.
**diskId**: ID of the disk to which the volume belongs.
**volumeState**: state of the volume.|
## How to Develop
diff --git a/en/application-dev/media/Readme-EN.md b/en/application-dev/media/Readme-EN.md
index efc78832291fda395506dc0864af4fae0f068621..a9fe35694fd7458fe31cf6a5d2473f5d93757bd1 100755
--- a/en/application-dev/media/Readme-EN.md
+++ b/en/application-dev/media/Readme-EN.md
@@ -28,7 +28,7 @@
- [Developing Audio Call](audio-call-development.md)
- [Video Playback](video-playback.md)
- [Video Recording](video-recording.md)
-- AVSession (for System Applications Only)
+- AVSession
- [AVSession Overview](avsession-overview.md)
- Local AVSession
- [Local AVSession Overview](local-avsession-overview.md)
@@ -37,7 +37,7 @@
- Distributed AVSession
- [Distributed AVSession Overview](distributed-avsession-overview.md)
- [Using Distributed AVSession](using-distributed-avsession.md)
-- Camera (for System Applications Only)
+- Camera
- [Camera Overview](camera-overview.md)
- Camera Development
- [Camera Development Preparations](camera-preparation.md)
diff --git a/en/application-dev/media/using-avsession-controller.md b/en/application-dev/media/using-avsession-controller.md
index 958661d90cec031cbbca1bb7c11ccb80e4dc0e66..d1569d6dc055a5d604c54e0f8970e779cddfb721 100644
--- a/en/application-dev/media/using-avsession-controller.md
+++ b/en/application-dev/media/using-avsession-controller.md
@@ -26,11 +26,7 @@ For details, see [AVSession Management](../reference/apis/js-apis-avsession.md).
| -------- | -------- |
| getAllSessionDescriptors(callback: AsyncCallback<Array<Readonly<AVSessionDescriptor>>>): void | Obtains the descriptors of all AVSessions in the system.|
| createController(sessionId: string, callback: AsyncCallback<AVSessionController>): void | Creates an AVSessionController.|
-| getValidCommands(callback: AsyncCallback<Array<AVControlCommandType>>): void | Obtains valid commands supported by the AVSession.
Playback control commands listened by an audio and video application when it accesses the AVSession are considered as valid commands supported by the AVSession. For details, see [Provider of AVSession](using-avsession-developer.md).|
-| getLaunchAbility(callback: AsyncCallback<WantAgent>): void | Obtains the UIAbility that is configured in the AVSession and can be started.
The UIAbility configured here is started when a user operates the UI of the controller, for example, clicking a widget in Media Controller.|
-| sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void | Sends a key event to an AVSession through the AVSessionController object.|
| sendSystemAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void | Sends a key event to the top session.|
-| sendControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void | Sends a playback control command to an AVSession through the AVSessionController object.|
| sendSystemControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void | Sends a playback control command to the top session.|
| getHistoricalSessionDescriptors(maxSize: number, callback: AsyncCallback\>>): void10+ | Obtains the descriptors of historical sessions.|
@@ -38,15 +34,15 @@ For details, see [AVSession Management](../reference/apis/js-apis-avsession.md).
| API| Description|
| -------- | -------- |
-| getAVPlaybackState(callback: AsyncCallback<AVPlaybackState>): void | Obtains the information related to the playback state.|
-| getAVMetadata(callback: AsyncCallback<AVMetadata>): void | Obtains the session metadata.|
-| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void | Obtains the output device information.|
-| sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void | Sends a key event to the session corresponding to this controller.|
-| getLaunchAbility(callback: AsyncCallback<WantAgent>): void | Obtains the **WantAgent** object saved by the application in the session.|
-| isActive(callback: AsyncCallback<boolean>): void | Checks whether the session is activated.|
-| destroy(callback: AsyncCallback<void>): void | Destroys this controller. A controller can no longer be used after being destroyed.|
-| getValidCommands(callback: AsyncCallback<Array<AVControlCommandType>>): void | Obtains valid commands supported by the session.|
-| sendControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void | Sends a playback control command to the session through the controller.|
+| getAVPlaybackState(callback: AsyncCallback<AVPlaybackState>): void10+ | Obtains the information related to the playback state.|
+| getAVMetadata(callback: AsyncCallback<AVMetadata>): void10+ | Obtains the session metadata.|
+| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void10+ | Obtains the output device information.|
+| sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void10+ | Sends a key event to the session corresponding to this controller.|
+| getLaunchAbility(callback: AsyncCallback<WantAgent>): void10+ | Obtains the **WantAgent** object saved by the application in the session.|
+| isActive(callback: AsyncCallback<boolean>): void10+ | Checks whether the session is activated.|
+| destroy(callback: AsyncCallback<void>): void10+ | Destroys this controller. A controller can no longer be used after being destroyed.|
+| getValidCommands(callback: AsyncCallback<Array<AVControlCommandType>>): void10+ | Obtains valid commands supported by the session.|
+| sendControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void10+ | Sends a playback control command to the session through the controller.|
| sendCommonCommand(command: string, args: {[key: string]: Object}, callback: AsyncCallback<void>): void10+ | Sends a custom playback control command to the session through the controller.|
| getAVQueueItems(callback: AsyncCallback<Array<AVQueueItem>>): void10+ | Obtains the information related to the items in the playlist.|
| getAVQueueTitle(callback: AsyncCallback<string>): void10+ | Obtains the name of the playlist.|
diff --git a/en/application-dev/media/using-avsession-developer.md b/en/application-dev/media/using-avsession-developer.md
index bf0b914647b9c364bea0ac86a30def88fe3c0f52..eef132d493091f6041450b7d3a42249fc081ce05 100644
--- a/en/application-dev/media/using-avsession-developer.md
+++ b/en/application-dev/media/using-avsession-developer.md
@@ -16,15 +16,15 @@ For details, see [AVSession Management](../reference/apis/js-apis-avsession.md).
| API| Description|
| -------- | -------- |
-| createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback<AVSession>): void | Creates an AVSession.
Only one AVSession can be created for a UIAbility.|
-| setAVMetadata(data: AVMetadata, callback: AsyncCallback<void>): void | Sets AVSession metadata.|
-| setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback<void>): void | Sets the AVSession playback state.|
-| setLaunchAbility(ability: WantAgent, callback: AsyncCallback<void>): void | Starts a UIAbility.|
-| getController(callback: AsyncCallback<AVSessionController>): void | Obtains the controller of the AVSession.|
-| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void | Obtains the output device information.|
-| activate(callback: AsyncCallback<void>): void | Activates the AVSession.|
-| deactivate(callback: AsyncCallback<void>): void | Deactivates this session.|
-| destroy(callback: AsyncCallback<void>): void | Destroys the AVSession.|
+| createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback<AVSession>): void10+ | Creates an AVSession.
Only one AVSession can be created for a UIAbility.|
+| setAVMetadata(data: AVMetadata, callback: AsyncCallback<void>): void10+ | Sets AVSession metadata.|
+| setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback<void>): void10+ | Sets the AVSession playback state.|
+| setLaunchAbility(ability: WantAgent, callback: AsyncCallback<void>): void10+ | Starts a UIAbility.|
+| getController(callback: AsyncCallback<AVSessionController>): void10+ | Obtains the controller of the AVSession.|
+| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void10+ | Obtains the output device information.|
+| activate(callback: AsyncCallback<void>): void10+ | Activates the AVSession.|
+| deactivate(callback: AsyncCallback<void>): void10+ | Deactivates this session.|
+| destroy(callback: AsyncCallback<void>): void10+ | Destroys the AVSession.|
| setAVQueueItems(items: Array<AVQueueItem>, callback: AsyncCallback<void>): void 10+ | Sets a playlist.|
| setAVQueueTitle(title: string, callback: AsyncCallback<void>): void10+ | Sets a name for the playlist.|
| dispatchSessionEvent(event: string, args: {[key: string]: Object}, callback: AsyncCallback<void>): void10+ | Dispatches a custom session event.|
@@ -343,21 +343,20 @@ To enable an audio and video application to access the AVSession service as a pr
session.off('commonCommand');
}
```
-
-
+
The code snippet below is used for destroying the AVSession object:
- ```ts
+ ```ts
async destroySession() {
- // It is assumed that an AVSession object has been created. For details about how to create an AVSession object, see the node snippet in step 1.
- let session: AVSessionManager.AVSession = ALREADY_CREATE_A_SESSION;
- // Destroy the AVSession object.
- session.destroy(function (err) {
- if (err) {
- console.error(`Failed to destroy session. Code: ${err.code}, message: ${err.message}`);
- } else {
- console.info(`Destroy : SUCCESS `);
- }
- });
+ // It is assumed that an AVSession object has been created. For details about how to create an AVSession object, see the node snippet in step 1.
+ let session: AVSessionManager.AVSession = ALREADY_CREATE_A_SESSION;
+ // Destroy the AVSession object.
+ session.destroy(function (err) {
+ if (err) {
+ console.error(`Failed to destroy session. Code: ${err.code}, message: ${err.message}`);
+ } else {
+ console.info(`Destroy : SUCCESS `);
+ }
+ });
}
- ```
\ No newline at end of file
+ ```
diff --git a/en/application-dev/quick-start/Readme-EN.md b/en/application-dev/quick-start/Readme-EN.md
index 631a5334c3fb783f84c4ca253f058fc386b6bc8d..3e8812f2a7ecfee12b8314572b563ce323a4ad1b 100644
--- a/en/application-dev/quick-start/Readme-EN.md
+++ b/en/application-dev/quick-start/Readme-EN.md
@@ -24,7 +24,7 @@
- [HAR](har-package.md)
- HSP
- [In-Application HSP Development](in-app-hsp.md)
- - [Inter-Application HSP Development (for System Applications Only)](cross-app-hsp.md)
+ - [Inter-Application HSP Development](cross-app-hsp.md)
- Atomic Service
- [Atomic Service Development](atomicService.md)
- [Atomic Service Space Management (for System Applications Only)](atomicService-aging.md)
diff --git a/en/application-dev/reference/apis/common_event/Readme-EN.md b/en/application-dev/reference/apis/common_event/Readme-EN.md
index 9c61482c2e615aa50161c5482c8c46bb91027d1a..adae88f06be7be491c51e03e795a22031b170e33 100644
--- a/en/application-dev/reference/apis/common_event/Readme-EN.md
+++ b/en/application-dev/reference/apis/common_event/Readme-EN.md
@@ -3,6 +3,7 @@
- [Common Events of the Ability Subsystem](commonEvent-ability.md)
- [Common Events of the Bundle Management Subsystem](commonEvent-bundleManager.md)
- [Common Events of the Notification Service](commonEvent-ans.md)
-- [Common Events of the Resource Scheduling Subsystem](commonEvent-resourceschedule.md)
+- [Common Events of the Resource Scheduler Subsystem](commonEvent-resourceschedule.md)
- [Common Events of the Telephony Subsystem](commonEvent-telephony.md)
- [Common Events of the USB Subsystem](commonEvent-usb.md)
+
diff --git a/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md b/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md
index 41e7e2adae16d45e83fc527010939bdb5cfe119c..191c38c2d5896caccbd688e43db37a0301ed0c3c 100644
--- a/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md
+++ b/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md
@@ -1,5 +1,5 @@
-# Common Events of the Resource Scheduling Subsystem
-This document lists the common system events provided by the resource scheduling subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
+# Common Events of the Resource Scheduler Subsystem
+This document lists the common system events provided by the resource scheduler subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
## COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED
Indicates that the system idle mode has changed.
diff --git a/en/application-dev/reference/apis/js-apis-avsession.md b/en/application-dev/reference/apis/js-apis-avsession.md
index d9a98b7c17e79f588e60b199f8bf4530e781ce83..d70b0712fa9df71eb1ca31a3a03970a714c03f91 100644
--- a/en/application-dev/reference/apis/js-apis-avsession.md
+++ b/en/application-dev/reference/apis/js-apis-avsession.md
@@ -4,14 +4,12 @@ The **avSession** module provides APIs for media playback control so that applic
This module provides the following typical features related to media sessions:
-- [AVSession](#avsession): used to set session metadata, playback state information, and more.
-- [AVSessionController](#avsessioncontroller): used to obtain session IDs, send commands and events to sessions, and obtain the session metadata and playback state information.
+- [AVSession](#avsession10): used to set session metadata, playback state information, and more.
+- [AVSessionController](#avsessioncontroller10): used to obtain session IDs, send commands and events to sessions, and obtain the session metadata and playback state information.
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
->
-> All the APIs provided by this module are system APIs.
## Modules to Import
@@ -19,7 +17,7 @@ This module provides the following typical features related to media sessions:
import avSession from '@ohos.multimedia.avsession';
```
-## avSession.createAVSession
+## avSession.createAVSession10+
createAVSession(context: Context, tag: string, type: AVSessionType): Promise\
@@ -27,22 +25,19 @@ Creates a media session. This API uses a promise to return the result. An abilit
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------------------------------- | ---- | ------------------------------ |
| context| [Context](js-apis-inner-app-context.md) | Yes| Application context, which provides application environment information.|
| tag | string | Yes | Custom session name. |
-| type | [AVSessionType](#avsessiontype) | Yes | Session type, which can be audio or video.|
-
+| type | [AVSessionType](#avsessiontype10) | Yes | Session type, which can be audio or video.|
**Return value**
| Type | Description |
| --------------------------------- | ------------------------------------------------------------ |
-| Promise<[AVSession](#avsession)\> | Promise used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.|
+| Promise<[AVSession](#avsession10)\> | Promise used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.|
**Error codes**
@@ -69,7 +64,7 @@ await avSession.createAVSession(context, tag, "audio").then((data) => {
});
```
-## avSession.createAVSession
+## avSession.createAVSession10+
createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void
@@ -77,16 +72,14 @@ Creates a media session. This API uses an asynchronous callback to return the re
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| context| [Context](js-apis-inner-app-context.md) | Yes| Application context, which provides application environment information. |
| tag | string | Yes | Custom session name. |
-| type | [AVSessionType](#avsessiontype) | Yes | Session type, which can be audio or video. |
-| callback | AsyncCallback<[AVSession](#avsession)\> | Yes | Callback used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.|
+| type | [AVSessionType](#avsessiontype10) | Yes | Session type, which can be audio or video. |
+| callback | AsyncCallback<[AVSession](#avsession10)\> | Yes | Callback used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.|
**Error codes**
@@ -316,7 +309,7 @@ Creates a session controller based on the session ID. Multiple session controlle
| Type | Description |
| ----------------------------------------------------- | ------------------------------------------------------------ |
-| Promise<[AVSessionController](#avsessioncontroller)\> | Promise used to return the session controller created, which can be used to obtain the session ID,
send commands and events to sessions, and obtain metadata and playback state information.|
+| Promise<[AVSessionController](#avsessioncontroller10)\> | Promise used to return the session controller created, which can be used to obtain the session ID,
send commands and events to sessions, and obtain metadata and playback state information.|
**Error codes**
@@ -369,7 +362,7 @@ Creates a session controller based on the session ID. Multiple session controlle
| Name | Type | Mandatory| Description |
| --------- | ----------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| sessionId | string | Yes | Session ID. |
-| callback | AsyncCallback<[AVSessionController](#avsessioncontroller)\> | Yes | Callback used to return the session controller created, which can be used to obtain the session ID,
send commands and events to sessions, and obtain metadata and playback state information.|
+| callback | AsyncCallback<[AVSessionController](#avsessioncontroller10)\> | Yes | Callback used to return the session controller created, which can be used to obtain the session ID,
send commands and events to sessions, and obtain metadata and playback state information.|
**Error codes**
@@ -777,7 +770,7 @@ Sends a system control command to the top session. This API uses a promise to re
| Name | Type | Mandatory| Description |
| ------- | ------------------------------------- | ---- | ----------------------------------- |
-| command | [AVControlCommand](#avcontrolcommand) | Yes | Command to send.|
+| command | [AVControlCommand](#avcontrolcommand10) | Yes | Command to send.|
**Return value**
@@ -837,7 +830,7 @@ Sends a system control command to the top session. This API uses an asynchronous
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------- | ---- | ------------------------------------- |
-| command | [AVControlCommand](#avcontrolcommand) | Yes | Command to send. |
+| command | [AVControlCommand](#avcontrolcommand10) | Yes | Command to send. |
| callback | AsyncCallback\ | Yes | Callback used to return the result. If the command is sent, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes**
@@ -878,17 +871,14 @@ avSession.sendSystemControlCommand(avcommand, function (err) {
});
```
-## AVSession
+## AVSession10+
-An **AVSession** object is created by calling [avSession.createAVSession](#avsessioncreateavsession). The object enables you to obtain the session ID and set the metadata and playback state.
+An **AVSession** object is created by calling [avSession.createAVSession](#avsessioncreateavsession10). The object enables you to obtain the session ID and set the metadata and playback state.
### Attributes
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
-
| Name | Type | Readable| Writable| Description |
| :-------- | :----- | :--- | :--- | :---------------------------- |
| sessionId | string | Yes | No | Unique session ID of the **AVSession** object.|
@@ -899,7 +889,7 @@ An **AVSession** object is created by calling [avSession.createAVSession](#avses
let sessionId = session.sessionId;
```
-### setAVMetadata
+### setAVMetadata10+
setAVMetadata(data: AVMetadata): Promise\
@@ -907,13 +897,11 @@ Sets session metadata. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------------------------- | ---- | ------------ |
-| data | [AVMetadata](#avmetadata) | Yes | Session metadata.|
+| data | [AVMetadata](#avmetadata10) | Yes | Session metadata.|
**Return value**
@@ -956,7 +944,7 @@ session.setAVMetadata(metadata).then(() => {
});
```
-### setAVMetadata
+### setAVMetadata10+
setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void
@@ -964,13 +952,11 @@ Sets session metadata. This API uses an asynchronous callback to return the resu
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ------------------------------------- |
-| data | [AVMetadata](#avmetadata) | Yes | Session metadata. |
+| data | [AVMetadata](#avmetadata10) | Yes | Session metadata. |
| callback | AsyncCallback\ | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes**
@@ -1010,7 +996,7 @@ session.setAVMetadata(metadata, function (err) {
});
```
-### setAVPlaybackState
+### setAVPlaybackState10+
setAVPlaybackState(state: AVPlaybackState): Promise\
@@ -1018,13 +1004,11 @@ Sets information related to the session playback state. This API uses a promise
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ----------------------------------- | ---- | ---------------------------------------------- |
-| data | [AVPlaybackState](#avplaybackstate) | Yes | Information related to the session playback state.|
+| data | [AVPlaybackState](#avplaybackstate10) | Yes | Information related to the session playback state.|
**Return value**
@@ -1033,6 +1017,7 @@ Sets information related to the session playback state. This API uses a promise
| Promise\ | Promise used to return the result. If the setting is successful, no value is returned; otherwise, an error object is returned.|
**Error codes**
+
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message|
@@ -1058,7 +1043,7 @@ session.setAVPlaybackState(playbackState).then(() => {
});
```
-### setAVPlaybackState
+### setAVPlaybackState10+
setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void
@@ -1066,13 +1051,11 @@ Sets information related to the session playback state. This API uses an asynchr
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------- | ---- | ---------------------------------------------- |
-| data | [AVPlaybackState](#avplaybackstate) | Yes | Information related to the session playback state.|
+| data | [AVPlaybackState](#avplaybackstate10) | Yes | Information related to the session playback state.|
| callback | AsyncCallback\ | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes**
@@ -1112,8 +1095,6 @@ Sets a playlist. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1182,8 +1163,6 @@ Sets a playlist. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1249,8 +1228,6 @@ Sets a name for the playlist. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1291,8 +1268,6 @@ Sets a name for the playlist. This API uses an asynchronous callback to return t
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1322,7 +1297,7 @@ session.setAVQueueTitle(queueTitle, function (err) {
});
```
-### setLaunchAbility
+### setLaunchAbility10+
setLaunchAbility(ability: WantAgent): Promise\
@@ -1330,8 +1305,6 @@ Sets a launcher ability. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1395,7 +1368,7 @@ wantAgent.getWantAgent(wantAgentInfo).then((agent) => {
});
```
-### setLaunchAbility
+### setLaunchAbility10+
setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void
@@ -1403,8 +1376,6 @@ Sets a launcher ability. This API uses an asynchronous callback to return the re
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1473,8 +1444,6 @@ Dispatches a custom event in the session, including the event name and event con
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1521,8 +1490,6 @@ Dispatches a custom event in the session, including the event name and event con
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1566,8 +1533,6 @@ Sets a custom media packet in the form of key-value pairs. This API uses a promi
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1645,7 +1610,7 @@ await session.setExtras(extras, (err) => {
})
```
-### getController
+### getController10+
getController(): Promise\
@@ -1653,13 +1618,11 @@ Obtains the controller corresponding to this session. This API uses a promise to
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
| ---------------------------------------------------- | ----------------------------- |
-| Promise<[AVSessionController](#avsessioncontroller)> | Promise used to return the session controller.|
+| Promise<[AVSessionController](#avsessioncontroller10)> | Promise used to return the session controller.|
**Error codes**
@@ -1682,7 +1645,7 @@ session.getController().then((avcontroller) => {
});
```
-### getController
+### getController10+
getController(callback: AsyncCallback\): void
@@ -1690,13 +1653,11 @@ Obtains the controller corresponding to this session. This API uses an asynchron
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------------- | ---- | -------------------------- |
-| callback | AsyncCallback<[AVSessionController](#avsessioncontroller)\> | Yes | Callback used to return the session controller.|
+| callback | AsyncCallback<[AVSessionController](#avsessioncontroller10)\> | Yes | Callback used to return the session controller.|
**Error codes**
@@ -1721,7 +1682,7 @@ session.getController(function (err, avcontroller) {
});
```
-### getOutputDevice
+### getOutputDevice10+
getOutputDevice(): Promise\
@@ -1729,13 +1690,11 @@ Obtains information about the output device for this session. This API uses a pr
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
| ---------------------------------------------- | --------------------------------- |
-| Promise<[OutputDeviceInfo](#outputdeviceinfo)> | Promise used to return the output device information.|
+| Promise<[OutputDeviceInfo](#outputdeviceinfo10)> | Promise used to return the output device information.|
**Error codes**
@@ -1756,7 +1715,7 @@ session.getOutputDevice().then((outputDeviceInfo) => {
});
```
-### getOutputDevice
+### getOutputDevice10+
getOutputDevice(callback: AsyncCallback\): void
@@ -1764,13 +1723,11 @@ Obtains information about the output device for this session. This API uses an a
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | ------------------------------ |
-| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo)\> | Yes | Callback used to return the information obtained.|
+| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo10)\> | Yes | Callback used to return the information obtained.|
**Error codes**
@@ -1793,7 +1750,7 @@ session.getOutputDevice(function (err, outputDeviceInfo) {
});
```
-### activate
+### activate10+
activate(): Promise\
@@ -1801,8 +1758,6 @@ Activates this session. A session can be used only after being activated. This A
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
@@ -1828,7 +1783,7 @@ session.activate().then(() => {
});
```
-### activate
+### activate10+
activate(callback: AsyncCallback\): void
@@ -1836,8 +1791,6 @@ Activates this session. A session can be used only after being activated. This A
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1865,16 +1818,14 @@ session.activate(function (err) {
});
```
-### deactivate
+### deactivate10+
deactivate(): Promise\
-Deactivates this session. You can use [activate](#activate) to activate the session again. This API uses a promise to return the result.
+Deactivates this session. You can use [activate](#activate10) to activate the session again. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
@@ -1900,18 +1851,16 @@ session.deactivate().then(() => {
});
```
-### deactivate
+### deactivate10+
deactivate(callback: AsyncCallback\): void
Deactivates this session. This API uses an asynchronous callback to return the result.
-Deactivates this session. You can use [activate](#activate) to activate the session again.
+Deactivates this session. You can use [activate](#activate10) to activate the session again.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -1939,7 +1888,7 @@ session.deactivate(function (err) {
});
```
-### destroy
+### destroy10+
destroy(): Promise\
@@ -1947,8 +1896,6 @@ Destroys this session. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
@@ -1974,7 +1921,7 @@ session.destroy().then(() => {
});
```
-### destroy
+### destroy10+
destroy(callback: AsyncCallback\): void
@@ -1982,8 +1929,6 @@ Destroys this session. This API uses an asynchronous callback to return the resu
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2011,7 +1956,7 @@ session.destroy(function (err) {
});
```
-### on('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind')
+### on('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind')10+
on(type: 'play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind', callback: () => void): void
@@ -2019,8 +1964,6 @@ Subscribes to playback command events.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2063,7 +2006,7 @@ session.on('rewind', () => {
});
```
-### on('seek')
+### on('seek')10+
on(type: 'seek', callback: (time: number) => void): void
@@ -2071,8 +2014,6 @@ Subscribes to the seek event.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2097,7 +2038,7 @@ session.on('seek', (time) => {
});
```
-### on('setSpeed')
+### on('setSpeed')10+
on(type: 'setSpeed', callback: (speed: number) => void): void
@@ -2105,8 +2046,6 @@ Subscribes to the event for setting the playback speed.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2131,7 +2070,7 @@ session.on('setSpeed', (speed) => {
});
```
-### on('setLoopMode')
+### on('setLoopMode')10+
on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void
@@ -2139,14 +2078,12 @@ Subscribes to the event for setting the loop mode.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------- | ---- | ---- |
| type | string | Yes | Event type. The event **'setLoopMode'** is reported when the command for setting the loop mode is sent to the session.|
-| callback | (mode: [LoopMode](#loopmode)) => void | Yes | Callback used for subscription. The **mode** parameter in the callback indicates the loop mode. |
+| callback | (mode: [LoopMode](#loopmode10)) => void | Yes | Callback used for subscription. The **mode** parameter in the callback indicates the loop mode. |
**Error codes**
@@ -2165,7 +2102,7 @@ session.on('setLoopMode', (mode) => {
});
```
-### on('toggleFavorite')
+### on('toggleFavorite')10+
on(type: 'toggleFavorite', callback: (assetId: string) => void): void
@@ -2173,8 +2110,6 @@ Subscribes to the event for favoriting a media asset.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2207,8 +2142,6 @@ Subscribes to the event that indicates an item in the playlist is selected. The
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2233,7 +2166,7 @@ session.on('skipToQueueItem', (itemId) => {
});
```
-### on('handleKeyEvent')
+### on('handleKeyEvent')10+
on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void
@@ -2241,8 +2174,6 @@ Subscribes to the key event.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2267,7 +2198,7 @@ session.on('handleKeyEvent', (event) => {
});
```
-### on('outputDeviceChange')
+### on('outputDeviceChange')10+
on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void
@@ -2275,14 +2206,12 @@ Subscribes to output device changes.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Event type. The event **'outputDeviceChange'** is reported when the output device changes.|
-| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. |
+| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. |
**Error codes**
@@ -2309,8 +2238,6 @@ Subscribes to custom control command changes.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2335,7 +2262,7 @@ session.on('commonCommand', (commonCommand, args) => {
});
```
-### off('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind')
+### off('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind')10+
off(type: 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind', callback?: () => void): void
@@ -2343,8 +2270,6 @@ Unsubscribes from playback command events.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2373,7 +2298,7 @@ session.off('fastForward');
session.off('rewind');
```
-### off('seek')
+### off('seek')10+
off(type: 'seek', callback?: (time: number) => void): void
@@ -2381,8 +2306,6 @@ Unsubscribes from the seek event.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2405,7 +2328,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
session.off('seek');
```
-### off('setSpeed')
+### off('setSpeed')10+
off(type: 'setSpeed', callback?: (speed: number) => void): void
@@ -2413,8 +2336,6 @@ Unsubscribes from the event for setting the playback speed.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2437,7 +2358,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
session.off('setSpeed');
```
-### off('setLoopMode')
+### off('setLoopMode')10+
off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void
@@ -2445,14 +2366,12 @@ Unsubscribes from the event for setting loop mode.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------- | ---- | ----- |
| type | string | Yes | Event type. The value is fixed at **'setLoopMode'**.|
-| callback | (mode: [LoopMode](#loopmode)) => void | No | Callback used for unsubscription. The **mode** parameter in the callback indicates the loop mode.
If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session.|
+| callback | (mode: [LoopMode](#loopmode10)) => void | No | Callback used for unsubscription. The **mode** parameter in the callback indicates the loop mode.
If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session.|
**Error codes**
@@ -2469,7 +2388,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
session.off('setLoopMode');
```
-### off('toggleFavorite')
+### off('toggleFavorite')10+
off(type: 'toggleFavorite', callback?: (assetId: string) => void): void
@@ -2477,8 +2396,6 @@ Unsubscribes from the event for favoriting a media asset.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2509,8 +2426,6 @@ Unsubscribes from the event that indicates an item in the playlist is selected.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2533,7 +2448,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
session.off('skipToQueueItem');
```
-### off('handleKeyEvent')
+### off('handleKeyEvent')10+
off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void
@@ -2541,8 +2456,6 @@ Unsubscribes from the key event.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2565,7 +2478,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
session.off('handleKeyEvent');
```
-### off('outputDeviceChange')
+### off('outputDeviceChange')10+
off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void
@@ -2573,14 +2486,12 @@ Unsubscribes from playback device changes.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------ |
| type | string | Yes | Event type. The value is fixed at **'outputDeviceChange'**. |
-| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.
If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. |
+| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.
If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. |
**Error codes**
@@ -2606,8 +2517,6 @@ Unsubscribes from custom control command changes.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2631,7 +2540,7 @@ session.off('commonCommand');
-## AVSessionController
+## AVSessionController10+
An AV session controller is created by calling [avSession.createController](#avsessioncreatecontroller). Through the AV session controller, you can query the session ID, send commands and events to a session, and obtain session metadata and playback state information.
@@ -2639,9 +2548,6 @@ An AV session controller is created by calling [avSession.createController](#avs
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
-
| Name | Type | Readable| Writable| Description |
| :-------- | :----- | :--- | :--- | :-------------------------------------- |
| sessionId | string | Yes | No | Unique session ID of the **AVSessionController** object.|
@@ -2657,7 +2563,7 @@ await avSession.createController(session.sessionId).then((controller) => {
});
```
-### getAVPlaybackState
+### getAVPlaybackState10+
getAVPlaybackState(): Promise\
@@ -2665,13 +2571,11 @@ Obtains the information related to the playback state. This API uses a promise t
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
| --------------------------------------------- | --------------------------- |
-| Promise<[AVPlaybackState](#avplaybackstate)\> | Promise used to return the **AVPlaybackState** object.|
+| Promise<[AVPlaybackState](#avplaybackstate10)\> | Promise used to return the **AVPlaybackState** object.|
**Error codes**
@@ -2692,7 +2596,7 @@ controller.getAVPlaybackState().then((playbackState) => {
});
```
-### getAVPlaybackState
+### getAVPlaybackState10+
getAVPlaybackState(callback: AsyncCallback\): void
@@ -2700,13 +2604,11 @@ Obtains the information related to the playback state. This API uses an asynchro
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------- | ---- | ---------------------------- |
-| callback | AsyncCallback<[AVPlaybackState](#avplaybackstate)\> | Yes | Callback used to return the **AVPlaybackState** object.|
+| callback | AsyncCallback<[AVPlaybackState](#avplaybackstate10)\> | Yes | Callback used to return the **AVPlaybackState** object.|
**Error codes**
@@ -2737,8 +2639,6 @@ Obtains the information related to the items in the queue. This API uses a promi
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
@@ -2772,8 +2672,6 @@ Obtains the information related to the items in the playlist. This API uses an a
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2809,8 +2707,6 @@ Obtains the name of the playlist. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
@@ -2844,8 +2740,6 @@ Obtains the name of the playlist. This API uses an asynchronous callback to retu
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2881,8 +2775,6 @@ Sends the ID of an item in the playlist to the session for processing. The sessi
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2923,8 +2815,6 @@ Sends the ID of an item in the playlist to the session for processing. The sessi
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -2954,7 +2844,7 @@ controller.skipToQueueItem(queueItemId, function (err) {
});
```
-### getAVMetadata
+### getAVMetadata10+
getAVMetadata(): Promise\
@@ -2962,13 +2852,11 @@ Obtains the session metadata. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
| ----------------------------------- | ----------------------------- |
-| Promise<[AVMetadata](#avmetadata)\> | Promise used to return the metadata obtained.|
+| Promise<[AVMetadata](#avmetadata10)\> | Promise used to return the metadata obtained.|
**Error codes**
@@ -2989,7 +2877,7 @@ controller.getAVMetadata().then((metadata) => {
});
```
-### getAVMetadata
+### getAVMetadata10+
getAVMetadata(callback: AsyncCallback\): void
@@ -2997,13 +2885,11 @@ Obtains the session metadata. This API uses an asynchronous callback to return t
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------- | ---- | -------------------------- |
-| callback | AsyncCallback<[AVMetadata](#avmetadata)\> | Yes | Callback used to return the metadata obtained.|
+| callback | AsyncCallback<[AVMetadata](#avmetadata10)\> | Yes | Callback used to return the metadata obtained.|
**Error codes**
@@ -3026,7 +2912,7 @@ controller.getAVMetadata(function (err, metadata) {
});
```
-### getOutputDevice
+### getOutputDevice10+
getOutputDevice(): Promise\
@@ -3034,13 +2920,11 @@ Obtains the output device information. This API uses a promise to return the res
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
| ----------------------------------------------- | --------------------------------- |
-| Promise<[OutputDeviceInfo](#outputdeviceinfo)\> | Promise used to return the information obtained.|
+| Promise<[OutputDeviceInfo](#outputdeviceinfo10)\> | Promise used to return the information obtained.|
**Error codes**
@@ -3060,7 +2944,7 @@ controller.getOutputDevice().then((deviceInfo) => {
});
```
-### getOutputDevice
+### getOutputDevice10+
getOutputDevice(callback: AsyncCallback\): void
@@ -3068,13 +2952,11 @@ Obtains the output device information. This API uses an asynchronous callback to
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | ------------------------------ |
-| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo)\> | Yes | Callback used to return the information obtained.|
+| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo10)\> | Yes | Callback used to return the information obtained.|
**Error codes**
@@ -3105,8 +2987,6 @@ Obtains the custom media packet set by the provider. This API uses a promise to
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
@@ -3138,8 +3018,6 @@ Obtains the custom media packet set by the provider. This API uses an asynchrono
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -3183,7 +3061,7 @@ controller.getExtras(function (err, extras) {
});
```
-### sendAVKeyEvent
+### sendAVKeyEvent10+
sendAVKeyEvent(event: KeyEvent): Promise\
@@ -3191,8 +3069,6 @@ Sends a key event to the session corresponding to this controller. This API uses
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name| Type | Mandatory| Description |
@@ -3230,7 +3106,7 @@ controller.sendAVKeyEvent(event).then(() => {
});
```
-### sendAVKeyEvent
+### sendAVKeyEvent10+
sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void
@@ -3238,8 +3114,6 @@ Sends a key event to the session corresponding to this controller. This API uses
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -3274,7 +3148,7 @@ controller.sendAVKeyEvent(event, function (err) {
});
```
-### getLaunchAbility
+### getLaunchAbility10+
getLaunchAbility(): Promise\
@@ -3282,13 +3156,11 @@ Obtains the **WantAgent** object saved by the application in the session. This A
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
| ------------------------------------------------------- | ------------------------------------------------------------ |
-| Promise<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Promise used to return the object saved by calling [setLaunchAbility](#setlaunchability). The object includes the application attribute, such as the bundle name, ability name, and device ID.|
+| Promise<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Promise used to return the object saved by calling [setLaunchAbility](#setlaunchability10). The object includes the application attribute, such as the bundle name, ability name, and device ID.|
**Error codes**
@@ -3312,7 +3184,7 @@ controller.getLaunchAbility().then((agent) => {
});
```
-### getLaunchAbility
+### getLaunchAbility10+
getLaunchAbility(callback: AsyncCallback\): void
@@ -3320,13 +3192,11 @@ Obtains the **WantAgent** object saved by the application in the session. This A
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
-| callback | AsyncCallback<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Yes | Callback used to return the object saved by calling [setLaunchAbility](#setlaunchability). The object includes the application attribute, such as the bundle name, ability name, and device ID.|
+| callback | AsyncCallback<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Yes | Callback used to return the object saved by calling [setLaunchAbility](#setlaunchability10). The object includes the application attribute, such as the bundle name, ability name, and device ID.|
**Error codes**
@@ -3352,7 +3222,7 @@ controller.getLaunchAbility(function (err, agent) {
});
```
-### getRealPlaybackPositionSync
+### getRealPlaybackPositionSync10+
getRealPlaybackPositionSync(): number
@@ -3360,8 +3230,6 @@ Obtains the playback position.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
@@ -3383,7 +3251,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
let time = controller.getRealPlaybackPositionSync();
```
-### isActive
+### isActive10+
isActive(): Promise\
@@ -3391,8 +3259,6 @@ Checks whether the session is activated. This API uses a promise to return the r
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
@@ -3419,7 +3285,7 @@ controller.isActive().then((isActive) => {
});
```
-### isActive
+### isActive10+
isActive(callback: AsyncCallback\): void
@@ -3427,8 +3293,6 @@ Checks whether the session is activated. This API uses an asynchronous callback
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -3457,7 +3321,7 @@ controller.isActive(function (err, isActive) {
});
```
-### destroy
+### destroy10+
destroy(): Promise\
@@ -3465,8 +3329,6 @@ Destroys this controller. A controller can no longer be used after being destroy
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
@@ -3492,7 +3354,7 @@ controller.destroy().then(() => {
});
```
-### destroy
+### destroy10+
destroy(callback: AsyncCallback\): void
@@ -3500,8 +3362,6 @@ Destroys this controller. A controller can no longer be used after being destroy
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -3529,7 +3389,7 @@ controller.destroy(function (err) {
});
```
-### getValidCommands
+### getValidCommands10+
getValidCommands(): Promise\>
@@ -3537,13 +3397,11 @@ Obtains valid commands supported by the session. This API uses a promise to retu
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Return value**
| Type | Description |
| ------------------------------------------------------------ | --------------------------------- |
-| Promise\> | Promise used to return a set of valid commands.|
+| Promise\> | Promise used to return a set of valid commands.|
**Error codes**
@@ -3565,7 +3423,7 @@ controller.getValidCommands.then((validCommands) => {
});
```
-### getValidCommands
+### getValidCommands10+
getValidCommands(callback: AsyncCallback\>): void
@@ -3573,13 +3431,11 @@ Obtains valid commands supported by the session. This API uses an asynchronous c
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------ |
-| callback | AsyncCallback\\> | Yes | Callback used to return a set of valid commands.|
+| callback | AsyncCallback\\> | Yes | Callback used to return a set of valid commands.|
**Error codes**
@@ -3603,7 +3459,7 @@ controller.getValidCommands(function (err, validCommands) {
});
```
-### sendControlCommand
+### sendControlCommand10+
sendControlCommand(command: AVControlCommand): Promise\
@@ -3611,17 +3467,15 @@ Sends a control command to the session through the controller. This API uses a p
> **NOTE**
>
-> Before using **sendControlCommand**, the controller must ensure that the AVSession has registered with the corresponding listener. For details about how to register the listener, see [Registering AVSession Listeners](#onplaypausestopplaynextplaypreviousfastforwardrewind).
+> Before using **sendControlCommand**, the controller must ensure that the AVSession has registered with the corresponding listener. For details about how to register the listener, see [Registering AVSession Listeners](#onplaypausestopplaynextplaypreviousfastforwardrewind10).
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| ------- | ------------------------------------- | ---- | ------------------------------ |
-| command | [AVControlCommand](#avcontrolcommand) | Yes | Command to send.|
+| command | [AVControlCommand](#avcontrolcommand10) | Yes | Command to send.|
**Return value**
@@ -3663,7 +3517,7 @@ controller.sendControlCommand(avCommand).then(() => {
});
```
-### sendControlCommand
+### sendControlCommand10+
sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void
@@ -3671,17 +3525,15 @@ Sends a control command to the session through the controller. This API uses an
> **NOTE**
>
-> Before using **sendControlCommand**, the controller must ensure that the AVSession has registered with the corresponding listener. For details about how to register the listener, see [Registering AVSession Listeners](#onplaypausestopplaynextplaypreviousfastforwardrewind).
+> Before using **sendControlCommand**, the controller must ensure that the AVSession has registered with the corresponding listener. For details about how to register the listener, see [Registering AVSession Listeners](#onplaypausestopplaynextplaypreviousfastforwardrewind10).
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------- | ---- | ------------------------------ |
-| command | [AVControlCommand](#avcontrolcommand) | Yes | Command to send.|
+| command | [AVControlCommand](#avcontrolcommand10) | Yes | Command to send.|
| callback | AsyncCallback\ | Yes | Callback used to return the result. If the command is sent, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes**
@@ -3728,8 +3580,6 @@ Sends a custom control command to the session through the controller. This API u
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -3780,8 +3630,6 @@ Sends a custom control command to the session through the controller. This API u
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -3795,6 +3643,7 @@ Sends a custom control command to the session through the controller. This API u
> The **args** parameter supports the following data types: string, number, Boolean, object, array, and file descriptor. For details, see [@ohos.app.ability.Want(Want)](./js-apis-app-ability-want.md).
**Error codes**
+
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message|
@@ -3820,7 +3669,7 @@ controller.sendCommonCommand(commandName, args, (err) => {
})
```
-### on('metadataChange')
+### on('metadataChange')10+
on(type: 'metadataChange', filter: Array\ | 'all', callback: (data: AVMetadata) => void)
@@ -3828,15 +3677,13 @@ Subscribes to the metadata change event.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Event type. The event **'metadataChange'** is reported when the session metadata changes.|
-| filter | Array\ | 'all' | Yes | The value **'all'** indicates that any metadata field change will trigger the event, and **Array** indicates that only changes to the listed metadata field will trigger the event.|
-| callback | (data: [AVMetadata](#avmetadata)) => void | Yes | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata. |
+| filter | Array\ | 'all' | Yes | The value **'all'** indicates that any metadata field change will trigger the event, and **Array** indicates that only changes to the listed metadata field will trigger the event.|
+| callback | (data: [AVMetadata](#avmetadata10)) => void | Yes | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata. |
**Error codes**
@@ -3860,7 +3707,7 @@ controller.on('metadataChange', metaFilter, (metadata) => {
});
```
-### on('playbackStateChange')
+### on('playbackStateChange')10+
on(type: 'playbackStateChange', filter: Array\ | 'all', callback: (state: AVPlaybackState) => void)
@@ -3868,15 +3715,13 @@ Subscribes to the playback state change event.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Event type. The event **'playbackStateChange'** is reported when the playback state changes.|
-| filter | Array\ | 'all' | Yes | The value **'all'** indicates that any playback state field change will trigger the event, and **Array** indicates that only changes to the listed playback state field will trigger the event.|
-| callback | (state: [AVPlaybackState](#avplaybackstate)) => void | Yes | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state. |
+| filter | Array\ | 'all' | Yes | The value **'all'** indicates that any playback state field change will trigger the event, and **Array** indicates that only changes to the listed playback state field will trigger the event.|
+| callback | (state: [AVPlaybackState](#avplaybackstate10)) => void | Yes | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state. |
**Error codes**
@@ -3908,8 +3753,6 @@ Subscribes to session event changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -3942,8 +3785,6 @@ Subscribes to playlist item changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -3976,8 +3817,6 @@ Subscribes to playlist name changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -4010,8 +3849,6 @@ Subscribes to custom media packet changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -4037,7 +3874,7 @@ controller.on('extrasChange', (extras) => {
});
```
-### on('sessionDestroy')
+### on('sessionDestroy')10+
on(type: 'sessionDestroy', callback: () => void)
@@ -4045,8 +3882,6 @@ Subscribes to the session destruction event.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -4071,7 +3906,7 @@ controller.on('sessionDestroy', () => {
});
```
-### on('activeStateChange')
+### on('activeStateChange')10+
on(type: 'activeStateChange', callback: (isActive: boolean) => void)
@@ -4079,8 +3914,6 @@ Subscribes to the session activation state change event.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -4105,7 +3938,7 @@ controller.on('activeStateChange', (isActive) => {
});
```
-### on('validCommandChange')
+### on('validCommandChange')10+
on(type: 'validCommandChange', callback: (commands: Array\) => void)
@@ -4113,14 +3946,12 @@ Subscribes to valid command changes.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Event type. The event **'validCommandChange'** is reported when the valid commands supported by the session changes.|
-| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype)\>) => void | Yes | Callback used for subscription. The **commands** parameter in the callback is a set of valid commands. |
+| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype10)\>) => void | Yes | Callback used for subscription. The **commands** parameter in the callback is a set of valid commands. |
**Error codes**
@@ -4140,7 +3971,7 @@ controller.on('validCommandChange', (validCommands) => {
});
```
-### on('outputDeviceChange')
+### on('outputDeviceChange')10+
on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void
@@ -4148,14 +3979,12 @@ Subscribes to output device changes.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Event type. The event **'outputDeviceChange'** is reported when the output device changes.|
-| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. |
+| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. |
**Error codes**
@@ -4174,7 +4003,7 @@ controller.on('outputDeviceChange', (device) => {
});
```
-### off('metadataChange')
+### off('metadataChange')10+
off(type: 'metadataChange', callback?: (data: AVMetadata) => void)
@@ -4182,14 +4011,12 @@ Unsubscribes from metadata changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------ | ---- | ------------------------------------------------------ |
| type | string | Yes | Event type. The event **'metadataChange'** is reported when the session metadata changes. |
-| callback | (data: [AVMetadata](#avmetadata)) => void | No | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. |
+| callback | (data: [AVMetadata](#avmetadata10)) => void | No | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. |
**Error codes**
@@ -4205,7 +4032,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
controller.off('metadataChange');
```
-### off('playbackStateChange')
+### off('playbackStateChange')10+
off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void)
@@ -4213,14 +4040,12 @@ Unsubscribes from playback state changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ----------------------------------------------------- |
| type | string | Yes | Event type. The event **'playbackStateChange'** is reported when the playback state changes. |
-| callback | (state: [AVPlaybackState](#avplaybackstate)) => void | No | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. |
+| callback | (state: [AVPlaybackState](#avplaybackstate10)) => void | No | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. |
**Error codes**
@@ -4244,8 +4069,6 @@ Unsubscribes from session event changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -4275,8 +4098,6 @@ Unsubscribes from playback item changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -4306,8 +4127,6 @@ Unsubscribes from playlist name changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -4337,8 +4156,6 @@ Unsubscribes from custom media packet changes. This API is called by the control
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -4362,7 +4179,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
controller.off('extrasChange');
```
-### off('sessionDestroy')
+### off('sessionDestroy')10+
off(type: 'sessionDestroy', callback?: () => void)
@@ -4370,8 +4187,6 @@ Unsubscribes from the session destruction event. This API is called by the contr
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -4393,7 +4208,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
controller.off('sessionDestroy');
```
-### off('activeStateChange')
+### off('activeStateChange')10+
off(type: 'activeStateChange', callback?: (isActive: boolean) => void)
@@ -4401,8 +4216,6 @@ Unsubscribes from session activation state changes. This API is called by the co
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
@@ -4424,7 +4237,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
controller.off('activeStateChange');
```
-### off('validCommandChange')
+### off('validCommandChange')10+
off(type: 'validCommandChange', callback?: (commands: Array\) => void)
@@ -4432,14 +4245,12 @@ Unsubscribes from valid command changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | -------------------------------------------------------- |
| type | string | Yes | Event type. The event **'validCommandChange'** is reported when the supported commands change. |
-| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype)\>) => void | No | Callback used for unsubscription. The **commands** parameter in the callback is a set of valid commands.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. |
+| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype10)\>) => void | No | Callback used for unsubscription. The **commands** parameter in the callback is a set of valid commands.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. |
**Error codes**
@@ -4455,7 +4266,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
controller.off('validCommandChange');
```
-### off('outputDeviceChange')
+### off('outputDeviceChange')10+
off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void
@@ -4463,14 +4274,12 @@ Unsubscribes from output device changes. This API is called by the controller.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------ |
| type | string | Yes | Event type. The event **'outputDeviceChange'** is reported when the output device changes. |
-| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. |
+| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.
The **callback** parameter is optional. If it is not specified, all the subscriptions to the specified event are canceled for this session. |
**Error codes**
@@ -4502,13 +4311,11 @@ Describes the information about a session token.
| pid | number | Yes | Process ID of the session.|
| uid | number | Yes | User ID. |
-## AVSessionType
+## AVSessionType10+
Enumerates the session types supported by the session.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
| Name | Type | Description|
| ----- | ------ | ---- |
| audio | string | Audio session.|
@@ -4525,21 +4332,19 @@ Declares the session descriptor.
| Name | Type | Readable| Writable| Description |
| ------------ | ------------------------------------------------------------ | ---- | --------------------------------------------------- | --------------------------------------------------- |
| sessionId | string | Yes | No| Session ID. |
-| type | [AVSessionType](#avsessiontype) | Yes | No | Session type. |
+| type | [AVSessionType](#avsessiontype10) | Yes | No | Session type. |
| sessionTag | string | Yes | No | Custom session name. |
| elementName | [ElementName](js-apis-bundle-ElementName.md) | Yes | No | Information about the application to which the session belongs, including the bundle name and ability name.|
| isActive | boolean | Yes | No | Whether the session is activated. |
| isTopSession | boolean | Yes | No | Whether the session is the top session. |
-| outputDevice | [OutputDeviceInfo](#outputdeviceinfo) | Yes | No | Information about the output device. |
+| outputDevice | [OutputDeviceInfo](#outputdeviceinfo10) | Yes | No | Information about the output device. |
-## AVControlCommandType
+## AVControlCommandType10+
Enumerates the commands that can be sent to a session.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
| Name | Type | Description |
| -------------- | ------ | ------------ |
| play | string | Play the media. |
@@ -4554,27 +4359,23 @@ Enumerates the commands that can be sent to a session.
| setLoopMode | string | Set the loop mode.|
| toggleFavorite | string | Favorite the media asset. |
-## AVControlCommand
+## AVControlCommand10+
Describes the command that can be sent to the session.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
| Name | Type | Mandatory| Description |
| --------- | ------------------------------------------------- | ---- | -------------- |
-| command | [AVControlCommandType](#avcontrolcommandtype) | Yes | Command. |
-| parameter | [LoopMode](#loopmode) | string | number | No | Parameters carried in the command.|
+| command | [AVControlCommandType](#avcontrolcommandtype10) | Yes | Command. |
+| parameter | [LoopMode](#loopmode10) | string | number | No | Parameters carried in the command.|
-## AVMetadata
+## AVMetadata10+
Describes the media metadata.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
| Name | Type | Mandatory| Description |
| --------------- |-------------------------| ---- |---------------------------------------------------------------------|
| assetId | string | Yes | Media ID. |
@@ -4621,60 +4422,52 @@ Describes the attributes of an item in the playlist.
| itemId | number | Yes | ID of an item in the playlist. |
| description | [AVMediaDescription](#avmediadescription10) | Yes | Media metadata of the item in the playlist. |
-## AVPlaybackState
+## AVPlaybackState10+
Describes the information related to the media playback state.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
| Name | Type | Mandatory| Description |
| ------------ | ------------------------------------- | ---- | ------- |
| state | [PlaybackState](#playbackstate) | No | Playback state.|
| speed | number | No | Playback speed.|
| position | [PlaybackPosition](#playbackposition) | No | Playback position.|
| bufferedTime | number | No | Buffered time.|
-| loopMode | [LoopMode](#loopmode) | No | Loop mode.|
+| loopMode | [LoopMode](#loopmode10) | No | Loop mode.|
| isFavorite | boolean | No | Whether the media asset is favorited.|
| activeItemId10+ | number | No | ID of the item that is being played.|
| extras10+ | {[key: string]: Object} | No | Custom media data.|
-## PlaybackPosition
+## PlaybackPosition10+
Describes the information related to the playback position.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
| Name | Type | Mandatory| Description |
| ----------- | ------ | ---- | ------------------ |
| elapsedTime | number | Yes | Elapsed time, in ms.|
| updateTime | number | Yes | Updated time, in ms.|
-## OutputDeviceInfo
+## OutputDeviceInfo10+
Describes the information related to the output device.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
| Name | Type | Mandatory| Description |
| ---------- | -------------- | ---- | ---------------------- |
| isRemote | boolean | Yes | Whether the device is connected. |
| audioDeviceId | Array | Yes | IDs of output devices. |
| deviceName | Array | Yes | Names of output devices. |
-## PlaybackState
+## PlaybackState10+
Enumerates the media playback states.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
| Name | Value | Description |
| --------------------------- | ---- | ----------- |
| PLAYBACK_STATE_INITIAL | 0 | Initial. |
@@ -4686,14 +4479,12 @@ Enumerates the media playback states.
| PLAYBACK_STATE_STOP | 6 | Stopped. |
-## LoopMode
+## LoopMode10+
Enumerates the loop modes of media playback.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
| Name | Value | Description |
| ------------------ | ---- | -------- |
| LOOP_MODE_SEQUENCE | 0 | Sequential playback.|
@@ -4701,14 +4492,12 @@ Enumerates the loop modes of media playback.
| LOOP_MODE_LIST | 2 | Playlist loop.|
| LOOP_MODE_SHUFFLE | 3 | Shuffle.|
-## AVSessionErrorCode
+## AVSessionErrorCode10+
Enumerates the error codes used in the media session.
**System capability**: SystemCapability.Multimedia.AVSession.Core
-**System API**: This is a system API.
-
| Name | Value | Description |
| ------------------------------ | ------- | ------------------------------- |
| ERR_CODE_SERVICE_EXCEPTION | 6600101 | Session service exception. |
@@ -4719,4 +4508,4 @@ Enumerates the error codes used in the media session.
| ERR_CODE_SESSION_INACTIVE | 6600106 | The session is not activated. |
| ERR_CODE_MESSAGE_OVERLOAD | 6600107 | Too many commands or events. |
-
\ No newline at end of file
+
diff --git a/en/application-dev/website.md b/en/application-dev/website.md
index d5c8e0b5f522b298c4321ad0ead08b96f12b1f04..09e9f806d9b4808477b7db7b281ae7d3e1668b36 100644
--- a/en/application-dev/website.md
+++ b/en/application-dev/website.md
@@ -26,7 +26,7 @@
- [HAR](quick-start/har-package.md)
- HSP
- [In-Application HSP Development](quick-start/in-app-hsp.md)
- - [Inter-Application HSP Development (for System Applications Only)](quick-start/cross-app-hsp.md)
+ - [Inter-Application HSP Development](quick-start/cross-app-hsp.md)
- Quick Fix
- [Quick Fix Overview](quick-start/quickfix-principles.md)
- [CLI-based Quick Fix Development](quick-start/quickfix-debug.md)
@@ -98,7 +98,7 @@
- [AccessibilityExtensionAbility](application-models/accessibilityextensionability.md)
- [EnterpriseAdminExtensionAbility](application-models/enterprise-extensionAbility.md)
- [InputMethodExtensionAbility](application-models/inputmethodextentionability.md)
- - [WindowExtensionAbility](application-models/windowextensionability.md)
+ - [WindowExtensionAbility (for System Applications Only)](application-models/windowextensionability.md)
- Service Widget Development in Stage Model
- [Service Widget Overview](application-models/service-widget-overview.md)
- Developing an ArkTS Widget
@@ -150,7 +150,7 @@
- [Subscribing to Common Events in Static Mode (for System Applications Only)](application-models/common-event-static-subscription.md)
- [Unsubscribing from Common Events](application-models/common-event-unsubscription.md)
- [Publishing Common Events](application-models/common-event-publish.md)
- - [Removing Sticky Common Events](application-models/common-event-remove-sticky.md)
+ - [Removing Sticky Common Events (for System Applications Only)](application-models/common-event-remove-sticky.md)
- [Background Services](application-models/background-services.md)
- Thread Model
- [Thread Model Overview](application-models/thread-model-stage.md)
@@ -434,7 +434,7 @@
- [Developing Audio Call](media/audio-call-development.md)
- [Video Playback](media/video-playback.md)
- [Video Recording](media/video-recording.md)
- - AVSession (for System Applications Only)
+ - AVSession
- [AVSession Overview](media/avsession-overview.md)
- Local AVSession
- [Local AVSession Overview](media/local-avsession-overview.md)
@@ -443,7 +443,7 @@
- Distributed AVSession
- [Distributed AVSession Overview](media/distributed-avsession-overview.md)
- [Using Distributed AVSession](media/using-distributed-avsession.md)
- - Camera (for System Applications Only)
+ - Camera
- [Camera Overview](media/camera-overview.md)
- Camera Development
- [Camera Development Preparations](media/camera-preparation.md)
@@ -542,8 +542,8 @@
- Selecting and Saving User Files (FilePicker)
- [Selecting User Files](file-management/select-user-file.md)
- [Saving User Files](file-management/save-user-file.md)
- - [Developing a FileManager Application (Available Only for System Applications)](file-management/dev-user-file-manager.md)
- - [Managing External Storage Devices (Available Only for System Applications)](file-management/manage-external-storage.md)
+ - [Developing a FileManager Application (for System Applications Only)](file-management/dev-user-file-manager.md)
+ - [Managing External Storage Devices (for System Applications Only)](file-management/manage-external-storage.md)
- Distributed File System
- [Distributed File System Overview](file-management/distributed-fs-overview.md)
- [Setting the Security Level of a Distributed File](file-management/set-security-label.md)
@@ -603,7 +603,6 @@
- [wukong User Guide](application-test/wukong-guidelines.md)
- [OpenHarmony IDL Specifications and User Guide](IDL/idl-guidelines.md)
- Native APIs
- - [Introduction to Native APIs](napi/introduction.md)
- [Using Native APIs in Application Projects](napi/napi-guidelines.md)
- [Drawing Development](napi/drawing-guidelines.md)
- [Raw File Development](napi/rawfile-guidelines.md)
@@ -669,12 +668,8 @@
- [Touch Target](reference/arkui-ts/ts-universal-attributes-touch-target.md)
- [Polymorphic Style](reference/arkui-ts/ts-universal-attributes-polymorphic-style.md)
- [Hit Test Control](reference/arkui-ts/ts-universal-attributes-hit-test-behavior.md)
- - [Background Blur](reference/arkui-ts/ts-universal-attributes-backgroundBlurStyle.md)
- [restoreId](reference/arkui-ts/ts-universal-attributes-restoreId.md)
- [Foreground Color](reference/arkui-ts/ts-universal-attributes-foreground-color.md)
- - [Spherical Effect](reference/arkui-ts/ts-universal-attributes-sphericalEffect.md)
- - [Light Up Effect](reference/arkui-ts/ts-universal-attributes-lightUpEffect.md)
- - [Pixel Stretch Effect](reference/arkui-ts/ts-universal-attributes-pixelStretchEffect.md)
- [Text Style](reference/arkui-ts/ts-universal-attributes-text-style.md)
- Gesture Processing
- [Gesture Binding Methods](reference/arkui-ts/ts-gesture-settings.md)
@@ -780,7 +775,6 @@
- [ImageData](reference/arkui-ts/ts-components-canvas-imagedata.md)
- [OffscreenCanvasRenderingConxt2D](reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md)
- [Path2D](reference/arkui-ts/ts-components-canvas-path2d.md)
- - [Lottie](reference/arkui-ts/ts-components-canvas-lottie.md)
- Animation
- [AnimatorProperty](reference/arkui-ts/ts-animatorproperty.md)
- [Explicit Animation](reference/arkui-ts/ts-explicit-animation.md)
@@ -1123,9 +1117,12 @@
- [NotificationTemplate](reference/apis/js-apis-inner-notification-notificationTemplate.md)
- [NotificationUserInput](reference/apis/js-apis-inner-notification-notificationUserInput.md)
- Common Events
+ - [Common Events of the Ability Subsystem](reference/apis/common_event/commonEvent-ability.md)
- [Common Events of the Bundle Management Subsystem](reference/apis/common_event/commonEvent-bundleManager.md)
- [Common Events of the Notification Service](reference/apis/common_event/commonEvent-ans.md)
+ - [Common Events of the Resource Scheduler Subsystem](reference/apis/common_event/commonEvent-resourceschedule.md)
- [Common Events of the Telephony Subsystem](reference/apis/common_event/commonEvent-telephony.md)
+ - [Common Events of the USB Subsystem](reference/apis/common_event/commonEvent-usb.md)
- Bundle Management
- [@ohos.bundle.appControl(appControl)](reference/apis/js-apis-appControl.md)
- [@ohos.bundle.bundleManager (bundleManager)](reference/apis/js-apis-bundleManager.md)
@@ -1212,6 +1209,7 @@
- security
- [PermissionRequestResult](reference/apis/js-apis-permissionrequestresult.md)
- Data Management
+ - [@ohos.data.cloudData (Device-Cloud Synergy)](reference/apis/js-apis-data-cloudData.md)
- [@ohos.data.dataAbility (DataAbility Predicates)](reference/apis/js-apis-data-ability.md)
- [@ohos.data.dataShare (DataShare)](reference/apis/js-apis-data-dataShare.md)
- [@ohos.data.dataSharePredicates (DataShare Predicates)](reference/apis/js-apis-data-dataSharePredicates.md)