提交 dd612f1e 编写于 作者: G Gloria

Update docs against 12203+12744+12508+12364+13130

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 f0681588
# AVSession Management
# @ohos.multimedia.avsession (AVSession Management)
The **avSession** module provides APIs for media playback control so that applications can access the system's Media Controller.
This module provides the following common features related to media sessions:
- [AVSession](#section652893): used to set session metadata, playback state information, and more.
- [AVSessionController](#section974602): used to obtain session IDs, send commands and events to sessions, and obtain the session metadata and playback state information.
- [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.
> **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
......@@ -28,7 +30,7 @@ Creates a media session. This API uses a promise to return the result. An abilit
| Name| Type | Mandatory| Description |
| ------ | ------------------------------- | ---- | ------------------------------ |
| context| [Context](../../ability/context-userguide.md) | Yes| Application context, which provides application environment information.|
| 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.|
......@@ -45,7 +47,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -76,7 +78,7 @@ Creates a media session. This API uses an asynchronous callback to return the re
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| context| [Context](../../ability/context-userguide.md) | Yes| Application context, which provides application environment information. |
| 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.|
......@@ -87,7 +89,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -132,7 +134,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -173,7 +175,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 |Session service exception |
| 6600101 |Session service exception. |
**Example**
......@@ -222,8 +224,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -275,8 +277,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -338,9 +340,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600104 | The remote session connection failed |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600104 | The remote session connection failed. |
**Example**
......@@ -391,9 +393,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600104 | The remote session connection failed |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600104 | The remote session connection failed. |
**Example**
......@@ -443,7 +445,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -492,7 +494,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -523,7 +525,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -554,7 +556,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -592,8 +594,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600105 | Invalid session command |
| 6600101 | Session service exception. |
| 6600105 | Invalid session command. |
**Example**
......@@ -635,8 +637,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600105 | Invalid session command |
| 6600101 | Session service exception. |
| 6600105 | Invalid session command. |
**Example**
......@@ -683,9 +685,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600105 | Invalid session command |
| 6600107 | Command or event overload |
| 6600101 | Session service exception. |
| 6600105 | Invalid session command. |
| 6600107 | Too many commands or events. |
**Example**
......@@ -738,9 +740,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600105 | Invalid session command |
| 6600107 | Command or event overload |
| 6600101 | Session service exception. |
| 6600105 | Invalid session command. |
| 6600107 | Too many commands or events. |
**Example**
......@@ -770,7 +772,7 @@ avSession.sendSystemControlCommand(avcommand, function (err) {
});
```
## AVSession<a name="section652893"></a>
## AVSession
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.
......@@ -815,8 +817,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -865,8 +867,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -922,8 +924,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -964,8 +966,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -998,8 +1000,8 @@ Sets a launcher ability. This API uses a promise to return the result.
**Parameters**
| Name | Type | Mandatory| Description |
| ------- | --------------------------------- | ---- | ----------------------------------------------------------- |
| ability | [WantAgent](js-apis-wantAgent.md) | Yes | Application attributes, such as the bundle name, ability name, and deviceID.|
| ------- | --------------------------------------------- | ---- | ----------------------------------------------------------- |
| ability | [WantAgent](js-apis-app-ability-wantAgent.md) | Yes | Application attributes, such as the bundle name, ability name, and deviceID.|
**Return value**
......@@ -1013,8 +1015,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1069,8 +1071,8 @@ Sets a launcher ability. This API uses an asynchronous callback to return the re
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------------------- | ---- | ----------------------------------------------------------- |
| ability | [WantAgent](js-apis-wantAgent.md) | Yes | Application attributes, such as the bundle name, ability name, and deviceID.|
| -------- | --------------------------------------------- | ---- | ------------------------------------------------------------ |
| ability | [WantAgent](js-apis-app-ability-wantAgent.md) | Yes | Application attributes, such as the bundle name, ability name, and deviceID. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes**
......@@ -1079,8 +1081,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1146,8 +1148,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1181,8 +1183,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1218,8 +1220,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1251,8 +1253,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1286,8 +1288,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1319,8 +1321,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1354,8 +1356,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1389,8 +1391,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1424,8 +1426,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1458,8 +1460,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1494,8 +1496,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1544,8 +1546,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
The session does not exist
......@@ -1576,8 +1578,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1608,8 +1610,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1640,8 +1642,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1672,8 +1674,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1704,8 +1706,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1736,8 +1738,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1772,8 +1774,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1802,8 +1804,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1832,8 +1834,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1862,8 +1864,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1892,8 +1894,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1922,8 +1924,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
**Example**
......@@ -1933,7 +1935,7 @@ session.off('outputDeviceChange');
## AVSessionController<a name="section974602"></a>
## AVSessionController
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.
......@@ -1977,9 +1979,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
**Example**
```js
......@@ -2010,9 +2012,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
**Example**
```js
......@@ -2045,9 +2047,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
**Example**
```js
......@@ -2078,9 +2080,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
**Example**
```js
......@@ -2113,8 +2115,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 | The session controller does not exist. |
**Example**
```js
......@@ -2145,8 +2147,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2180,11 +2182,11 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600105 | Invalid session command |
| 6600106 | The session not active |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
| 6600105 | Invalid session command. |
| 6600106 | The session is not activated. |
**Return value**
......@@ -2218,7 +2220,7 @@ Sends a key event to the session corresponding to this controller. This API uses
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ---------- |
| event | [KeyEvent](js-apis-keyevent.md) | Yes | Key event.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the event is sent, **err** is **undefined**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the event is sent, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes**
......@@ -2226,11 +2228,11 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600105 | Invalid session command |
| 6600106 | The session not active |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
| 6600105 | Invalid session command. |
| 6600106 | The session is not activated. |
**Example**
......@@ -2258,8 +2260,8 @@ Obtains the **WantAgent** object saved by the application in the session. This A
**Return value**
| Type | Description |
| ------------------------------------------- | ------------------------------------------------------------ |
| Promise<[WantAgent](js-apis-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](#setlaunchability). The object includes the application attribute, such as the bundle name, ability name, and device ID.|
**Error codes**
......@@ -2267,9 +2269,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2294,8 +2296,8 @@ Obtains the **WantAgent** object saved by the application in the session. This A
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------- | ---- | ------------------------------------------------------------ |
| callback | AsyncCallback<[WantAgent](js-apis-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](#setlaunchability). The object includes the application attribute, such as the bundle name, ability name, and device ID.|
**Error codes**
......@@ -2303,9 +2305,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2341,8 +2343,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2370,9 +2372,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2404,9 +2406,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2440,8 +2442,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2473,8 +2475,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2508,9 +2510,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2542,9 +2544,9 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2584,12 +2586,12 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600105 | Invalid session command |
| 6600106 | The session not active |
| 6600107 | Command or event overload |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
| 6600105 | Invalid session command. |
| 6600106 | The session is not activated. |
| 6600107 | Too many commands or events. |
**Example**
......@@ -2633,12 +2635,12 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ------------------------------- |
| 6600101 | Session service exception |
| 6600102 | The session does not exist |
| 6600103 | The session controller does not exist |
| 6600105 | Invalid session command |
| 6600106 | The session not active |
| 6600107 | Command or event overload |
| 6600101 | Session service exception. |
| 6600102 | The session does not exist. |
| 6600103 | The session controller does not exist. |
| 6600105 | Invalid session command. |
| 6600106 | The session is not activated. |
| 6600107 | Too many commands or events. |
**Example**
......@@ -2685,8 +2687,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ------------------------------ |
| 6600101 | Session service exception |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2723,8 +2725,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ------------------------------ |
| 6600101 | Session service exception |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2760,8 +2762,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ------------------------------ |
| 6600101 | Session service exception |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2792,8 +2794,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ----------------------------- |
| 6600101 | Session service exception |
| 6600103 |The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 |The session controller does not exist. |
**Example**
......@@ -2824,8 +2826,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ------------------------------ |
| 6600101 | Session service exception |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2857,8 +2859,8 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ----------------------- |
| 6600101 | Session service exception |
| 6600103 | The session controller does not exist |
| 6600101 | Session service exception. |
| 6600103 | The session controller does not exist. |
**Example**
......@@ -2889,7 +2891,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -2918,7 +2920,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -2947,7 +2949,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -2976,7 +2978,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message|
| -------- | ---------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -3005,7 +3007,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID| Error Message |
| -------- | ---------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -3034,7 +3036,7 @@ For details about the error codes, see [AVSession Management Error Codes](../err
| ID | Error Message |
| -------- | ---------------- |
| 6600101 | Session service exception |
| 6600101 | Session service exception. |
**Example**
......@@ -3132,7 +3134,7 @@ Describes the media metadata.
| album | string | No | Album name. |
| writer | string | No | Writer. |
| composer | string | No | composer. |
| duration | string | No | Media duration, in ms. |
| duration | number | No | Media duration, in ms. |
| mediaImage | image.PixelMap &#124; string | No | Pixel map or image path (local path or network path) of the image. |
| publishDate | Date | No | Release date. |
| subtitle | string | No | Subtitle. |
......@@ -3217,10 +3219,10 @@ Enumerates the error codes used in the media session.
| Name | Value | Description |
| ------------------------------ | ------- | ------------------------------- |
| ERR_CODE_SERVICE_EXCEPTION | 6600101 | Session service exception |
| ERR_CODE_SESSION_NOT_EXIST | 6600102 | The session does not exist |
| ERR_CODE_CONTROLLER_NOT_EXIST | 6600103 | The session controller does not exist |
| ERR_CODE_REMOTE_CONNECTION_ERR | 6600104 | The remote session connection failed |
| ERR_CODE_COMMAND_INVALID | 6600105 | Invalid session command |
| ERR_CODE_SESSION_INACTIVE | 6600106 | The session not active |
| ERR_CODE_MESSAGE_OVERLOAD | 6600107 | Command or event overload |
| ERR_CODE_SERVICE_EXCEPTION | 6600101 | Session service exception. |
| ERR_CODE_SESSION_NOT_EXIST | 6600102 | The session does not exist. |
| ERR_CODE_CONTROLLER_NOT_EXIST | 6600103 | The session controller does not exist. |
| ERR_CODE_REMOTE_CONNECTION_ERR | 6600104 | The remote session connection failed. |
| ERR_CODE_COMMAND_INVALID | 6600105 | Invalid session command. |
| ERR_CODE_SESSION_INACTIVE | 6600106 | The session is not activated. |
| ERR_CODE_MESSAGE_OVERLOAD | 6600107 | Too many commands or events. |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册