From 9ab2b237c6aead8edea267e4d33aa625d32b6227 Mon Sep 17 00:00:00 2001 From: ccfriend Date: Thu, 31 Jul 2025 14:40:11 +0800 Subject: [PATCH] Revert "add more error code comments" This reverts commit b7feb5b6a964af57c42e7bc05a6099f5481b461c. Signed-off-by: ccfriend --- api/@ohos.multimedia.avsession.d.ts | 317 ++++++---------------------- 1 file changed, 62 insertions(+), 255 deletions(-) diff --git a/api/@ohos.multimedia.avsession.d.ts b/api/@ohos.multimedia.avsession.d.ts index f38483480b..9821b8a601 100644 --- a/api/@ohos.multimedia.avsession.d.ts +++ b/api/@ohos.multimedia.avsession.d.ts @@ -51,7 +51,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ @@ -1116,7 +1115,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -1143,7 +1141,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1158,7 +1155,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 11 @@ -1172,7 +1168,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 11 @@ -1186,7 +1181,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -1211,7 +1205,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1226,7 +1219,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 11 @@ -1240,7 +1232,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 11 @@ -1254,7 +1245,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -1279,7 +1269,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1295,12 +1284,11 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ - dispatchSessionEvent(event: string, args: {[key: string]: Object}, callback: AsyncCallback): void; + dispatchSessionEvent(event: string, args: Record, callback: AsyncCallback): void; /** * Dispatch the session event of this session. @@ -1322,13 +1310,12 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - dispatchSessionEvent(event: string, args: {[key: string]: Object}): Promise; + dispatchSessionEvent(event: string, args: Record): Promise; /** * Set the playlist of queueItem. Identifies the content of the playlist presented by this session. @@ -1337,7 +1324,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -1362,7 +1348,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1377,7 +1362,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -1402,7 +1386,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1417,12 +1400,11 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ - setExtras(extras: {[key: string]: Object}, callback: AsyncCallback): void; + setExtras(extras: Record, callback: AsyncCallback): void; /** * Set the custom media packets for this session. @@ -1442,19 +1424,17 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - setExtras(extras: {[key: string]: Object}): Promise; + setExtras(extras: Record): Promise; /** * Get the current session's own controller * @param { AsyncCallback } callback - async callback for the AVSessionController. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -1473,7 +1453,6 @@ declare namespace avSession { * Get the current session's own controller * @returns { Promise } Promise for the AVSessionController * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1517,7 +1496,6 @@ declare namespace avSession { * Get output device information * @param { AsyncCallback } callback - async callback for the OutputDeviceInfo. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -1536,7 +1514,6 @@ declare namespace avSession { * Get output device information * @returns { Promise } Promise for the OutputDeviceInfo * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1556,7 +1533,6 @@ declare namespace avSession { * Get output device information * @returns { OutputDeviceInfo } the OutputDeviceInfo * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1568,7 +1544,6 @@ declare namespace avSession { * Get all the current virtual display information for extended display. * @returns { Promise> } Promise for the CastDisplayInfo * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice @@ -1604,7 +1579,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1640,7 +1614,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1676,7 +1649,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1712,7 +1684,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1748,7 +1719,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1784,7 +1754,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1820,7 +1789,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1848,7 +1816,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1876,7 +1843,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1904,7 +1870,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1932,7 +1897,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1960,7 +1924,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -1988,7 +1951,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2016,7 +1978,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2052,7 +2013,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2080,7 +2040,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2095,7 +2054,6 @@ declare namespace avSession { * @param { 'playWithAssetId' } type - Event type. * @param { Callback } callback - Callback used to handle the 'playWithAssetId' command. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2108,7 +2066,6 @@ declare namespace avSession { * @param { 'playWithAssetId' } type - Event type. * @param { Callback } callback - Callback used to handle the 'playWithAssetId' command. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2134,7 +2091,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2160,7 +2116,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2186,7 +2141,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2212,7 +2166,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2238,7 +2191,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2264,7 +2216,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2278,7 +2229,6 @@ declare namespace avSession { * @param { 'setTargetLoopMode' } type - Registration Type 'setTargetLoopMode' * @param { Callback } callback - Used to handle setTargetLoopMode command.The callback provides the {@link LoopMode} * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2291,7 +2241,6 @@ declare namespace avSession { * @param { 'setTargetLoopMode' } type - Registration Type 'setTargetLoopMode' * @param { Callback } callback - Used to handle setTargetLoopMode command.The callback provides the {@link LoopMode} * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2319,7 +2268,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2347,7 +2295,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2373,7 +2320,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2399,7 +2345,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2426,8 +2371,7 @@ declare namespace avSession { * The callback provide the new device info {@link OutputDeviceInfo} and related connection state {@link ConnectionState}. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @throws { BusinessError } 6600102 - The session does not exist * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2454,8 +2398,7 @@ declare namespace avSession { * The callback provide the new device info {@link OutputDeviceInfo} and related connection state {@link ConnectionState}. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @throws { BusinessError } 6600102 - The session does not exist * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2483,13 +2426,12 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - on(type: 'commonCommand', callback: (command: string, args: {[key: string]: Object}) => void): void; + on(type: 'commonCommand', callback: (command: string, args: Record) => void): void; /** * Unregister session custom command change callback @@ -2511,13 +2453,12 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - off(type: 'commonCommand', callback?: (command: string, args: {[key: string]: Object}) => void): void; + off(type: 'commonCommand', callback?: (command: string, args: Record) => void): void; /** * Register the item to play from the playlist change callback @@ -2539,7 +2480,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2567,7 +2507,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2597,7 +2536,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2623,7 +2561,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2653,7 +2590,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2679,7 +2615,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2709,7 +2644,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2733,7 +2667,6 @@ declare namespace avSession { * @param { Callback } callback - Used to handle ('toggleCallMute') command * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2747,8 +2680,7 @@ declare namespace avSession { * @param { Callback } callback - Callback used to return cast display information. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @throws { BusinessError } 6600102 - The session does not exist * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice @@ -2762,8 +2694,7 @@ declare namespace avSession { * @param { Callback } callback - Callback used to return cast display information. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @throws { BusinessError } 6600102 - The session does not exist * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice @@ -2840,7 +2771,6 @@ declare namespace avSession { * Activate the session, indicating that the session can accept control commands * @param { AsyncCallback } callback - The asyncCallback triggered when the session is activated. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -2859,7 +2789,6 @@ declare namespace avSession { * Activate the session, indicating that the session can accept control commands * @returns { Promise } void result promise when executed successfully * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2871,7 +2800,6 @@ declare namespace avSession { * Deactivate the session, indicating that the session not ready to accept control commands * @param { AsyncCallback } callback - The asyncCallback triggered when the session is deactivated. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -2890,7 +2818,6 @@ declare namespace avSession { * Deactivate the session, indicating that the session not ready to accept control commands * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -2902,7 +2829,6 @@ declare namespace avSession { * Destroy this session, the server will clean up the session resources * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -2921,7 +2847,6 @@ declare namespace avSession { * Destroy this session, the server will clean up the session resources * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -3050,8 +2975,7 @@ declare namespace avSession { /** * Get the playback status of the current player * @param { AsyncCallback } callback - The triggered asyncCallback when (getAVPlaybackState). - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 */ @@ -3067,8 +2991,7 @@ declare namespace avSession { /** * Get the playback status of the current player * @returns { Promise } (AVPlaybackState) returned through promise - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3078,8 +3001,7 @@ declare namespace avSession { /** * Get supported decoders of remote player. * @returns { Promise> } (DecoderType) returned through promise - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 19 @@ -3090,8 +3012,7 @@ declare namespace avSession { * Get recommended resolution of remote player based on each decoder. * @param { DecoderType } decoderType - The decoder type. * @returns { Promise } ResolutionLevel returned through promise - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 19 @@ -3101,8 +3022,7 @@ declare namespace avSession { /** * Get supported hdr capabilities of remote player. * @returns { Promise> } HDRFormat returned through promise - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 19 @@ -3112,8 +3032,7 @@ declare namespace avSession { /** * Get supported speed of remote player. * @returns { Promise> } supported speed returned through promise - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 19 @@ -3126,10 +3045,8 @@ declare namespace avSession { * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. - * @throws { BusinessError } 6600105 - Invalid session command. - * Stop sending the command or event,sending commands supported by the controlled end. + * @throws { BusinessError } 6600101 - Session service exception + * @throws { BusinessError } 6600105 - Invalid session command * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 @@ -3154,10 +3071,8 @@ declare namespace avSession { * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. - * @throws { BusinessError } 6600105 - Invalid session command. - * Stop sending the command or event,sending commands supported by the controlled end. + * @throws { BusinessError } 6600101 - Session service exception + * @throws { BusinessError } 6600105 - Invalid session command * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice @@ -3171,8 +3086,7 @@ declare namespace avSession { * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. - * @throws {BusinessError} 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws {BusinessError} 6600101 - Session service exception * @throws {BusinessError} 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 @@ -3196,8 +3110,7 @@ declare namespace avSession { * @returns { Promise } Promise used to return the result. * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. - * @throws {BusinessError} 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws {BusinessError} 6600101 - Session service exception * @throws {BusinessError} 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice @@ -3211,8 +3124,7 @@ declare namespace avSession { * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. - * @throws {BusinessError} 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws {BusinessError} 6600101 - Session service exception * @throws {BusinessError} 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 @@ -3236,8 +3148,7 @@ declare namespace avSession { * @returns { Promise } Promise used to return the result. * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. - * @throws {BusinessError} 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws {BusinessError} 6600101 - Session service exception * @throws {BusinessError} 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice @@ -3248,8 +3159,7 @@ declare namespace avSession { /** * Get the current playing item * @param { AsyncCallback } callback - The triggered asyncCallback. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 */ @@ -3265,8 +3175,7 @@ declare namespace avSession { /** * Get the current playing item * @returns { Promise } (AVQueueItem) returned through promise - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3277,7 +3186,6 @@ declare namespace avSession { * Get commands supported by the current cast controller * @param { AsyncCallback> } callback - The triggered asyncCallback when (getValidCommands). * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it.. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ @@ -3287,7 +3195,6 @@ declare namespace avSession { * Get commands supported by the current cast controller * @returns { Promise> } array of AVCastControlCommandType promise * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it.. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ @@ -3300,8 +3207,7 @@ declare namespace avSession { * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3324,7 +3230,6 @@ declare namespace avSession { * Destroy the controller * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it.. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ @@ -3341,7 +3246,6 @@ declare namespace avSession { * Destroy the controller * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it.. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3368,8 +3272,7 @@ declare namespace avSession { * The callback function provides the {@link AVPlaybackState} parameter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3394,8 +3297,7 @@ declare namespace avSession { * The callback function provides the {@link AVPlaybackState} parameter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3418,8 +3320,7 @@ declare namespace avSession { * @param { Callback } callback Callback used to listen for current item changed. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3440,8 +3341,7 @@ declare namespace avSession { * @param { 'mediaItemChange' } type Type of the playback event to listen for. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3466,8 +3366,7 @@ declare namespace avSession { * @param { Callback } callback - Used to handle 'playNext' command * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3490,8 +3389,7 @@ declare namespace avSession { * @param { 'playNext' } type - Type of the 'playNext' event to listen for. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3516,8 +3414,7 @@ declare namespace avSession { * @param { Callback } callback - Used to handle 'playPrevious' command * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3540,8 +3437,7 @@ declare namespace avSession { * @param { 'playPrevious' } type - Type of the 'playPrevious' to listen for. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3555,8 +3451,7 @@ declare namespace avSession { * @param { Callback } callback - Used to handle 'requestPlay' command * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ @@ -3568,8 +3463,7 @@ declare namespace avSession { * @param { Callback } callback - Used to handle 'requestPlay' command * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ @@ -3582,8 +3476,7 @@ declare namespace avSession { * @param { Callback } callback - Used to handle 'endOfStream' command * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ @@ -3595,8 +3488,7 @@ declare namespace avSession { * @param { Callback } callback - Used to handle 'endOfStream' command * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ @@ -3618,8 +3510,7 @@ declare namespace avSession { * @param { Callback } callback - Callback used to listen for the playback seekDone event. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3640,8 +3531,7 @@ declare namespace avSession { * @param { 'seekDone' } type - Type of the 'seekDone' to listen for. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3656,12 +3546,11 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it.. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ - on(type: 'validCommandChange', callback: Callback>); + on(type: 'validCommandChange', callback: Callback>) : void; /** * Unregister the valid commands of the casted session changed callback @@ -3671,7 +3560,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it.. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 @@ -3684,8 +3572,7 @@ declare namespace avSession { * @param { function } callback - Callback used to return video size. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 12 */ @@ -3696,8 +3583,7 @@ declare namespace avSession { * @param { 'videoSizeChange' } type - Type of the 'videoSizeChange' to listen for. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 12 */ @@ -3731,8 +3617,7 @@ declare namespace avSession { * @throws { BusinessError } 5400104 - Time out. * @throws { BusinessError } 5400105 - Service died. * @throws { BusinessError } 5400106 - Unsupport format. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3765,8 +3650,7 @@ declare namespace avSession { * @throws { BusinessError } 5400104 - Time out. * @throws { BusinessError } 5400105 - Service died. * @throws { BusinessError } 5400106 - Unsupport format. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3980,8 +3864,7 @@ declare namespace avSession { * @param { KeyRequestCallback } callback - Callback used to request drm key. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -3994,8 +3877,7 @@ declare namespace avSession { * @param { KeyRequestCallback } callback - Callback used to request drm key. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 12 @@ -4042,7 +3924,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 14 @@ -4069,7 +3950,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 14 @@ -4083,7 +3963,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice * @since 14 @@ -6337,7 +6216,6 @@ declare namespace avSession { * Get the playback status of the current session * @param { AsyncCallback } callback - The triggered asyncCallback when (getAVPlaybackState). * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6358,7 +6236,6 @@ declare namespace avSession { * Get the playback status of the current session * @returns { Promise } (AVPlaybackState) returned through promise * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6380,7 +6257,6 @@ declare namespace avSession { * Get the playback status of the current session * @returns { AVPlaybackState } (AVPlaybackState) returned * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6393,7 +6269,6 @@ declare namespace avSession { * Get the metadata of the current session * @param { AsyncCallback } callback - The triggered asyncCallback when (getAVMetadata). * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6414,7 +6289,6 @@ declare namespace avSession { * Get the metadata of the current session * @returns { Promise } (AVMetadata) returned through promise * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6436,7 +6310,6 @@ declare namespace avSession { * Get the metadata of the current session * @returns { AVMetadata } (AVMetadata) returned * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6449,7 +6322,6 @@ declare namespace avSession { * Get the call status of the current session * @param { AsyncCallback } callback - The triggered asyncCallback when (getAVCallState). * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6461,7 +6333,6 @@ declare namespace avSession { * Get the call status of the current session * @returns { Promise } (AVCallState) returned through promise * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6473,7 +6344,6 @@ declare namespace avSession { * Get the call metadata of the current session * @param { AsyncCallback } callback - The triggered asyncCallback when (getCallMetadata). * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6485,7 +6355,6 @@ declare namespace avSession { * Get the call metadata of the current session * @returns { Promise } (CallMetadata) returned through promise * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6497,7 +6366,6 @@ declare namespace avSession { * Get the name of the playlist of the current session * @param { AsyncCallback } callback - The triggered asyncCallback when (getAVQueueTitle). * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6518,7 +6386,6 @@ declare namespace avSession { * Get the name of the playlist of the current session * @returns { Promise } (string) returned through promise * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6540,7 +6407,6 @@ declare namespace avSession { * Get the name of the playlist of the current session * @returns { string } (string) returned * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6553,7 +6419,6 @@ declare namespace avSession { * Get the playlist of the current session * @param { AsyncCallback> } callback - The triggered asyncCallback when (getAVQueueItems). * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6574,7 +6439,6 @@ declare namespace avSession { * Get the playlist of the current session * @returns { Promise> } (Array) returned through promise * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6596,7 +6460,6 @@ declare namespace avSession { * Get the playlist of the current session * @returns { Array } (Array) returned * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6612,7 +6475,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6639,7 +6501,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6689,7 +6550,6 @@ declare namespace avSession { * Get output device information * @returns { OutputDeviceInfo } (OutputDeviceInfo) returned * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -6748,7 +6608,6 @@ declare namespace avSession { * Get the {@link WantAgent} of this session that can launch the session ability * @param { AsyncCallback } callback - The asyncCallback triggered when getting the WantAgent. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6769,7 +6628,6 @@ declare namespace avSession { * Get the {@link WantAgent} of this session that can launch the session ability * @returns { Promise } WantAgent promise * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6792,7 +6650,6 @@ declare namespace avSession { * taking into account factors such as playback status, playback speed, and application update time. * @returns { number } current playback position in ms.Note that the returns value of each call will be different. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -6804,7 +6661,6 @@ declare namespace avSession { * Check if the current session is active * @param { AsyncCallback } callback - The triggered asyncCallback when (isActive). * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6825,7 +6681,6 @@ declare namespace avSession { * Check if the current session is active * @returns { Promise } boolean promise * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6847,7 +6702,6 @@ declare namespace avSession { * Check if the current session is active * @returns { boolean } boolean * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6860,7 +6714,6 @@ declare namespace avSession { * Destroy the server controller * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 @@ -6879,7 +6732,6 @@ declare namespace avSession { * Destroy the server controller * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -6891,7 +6743,6 @@ declare namespace avSession { * Get commands supported by the current session * @param { AsyncCallback> } callback - The triggered asyncCallback when (getValidCommands). * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6912,7 +6763,6 @@ declare namespace avSession { * Get commands supported by the current session * @returns { Promise> } array of AVControlCommandType promise * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6934,7 +6784,6 @@ declare namespace avSession { * Get commands supported by the current session * @returns {Array } array of AVControlCommandType * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6950,14 +6799,11 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @throws { BusinessError } 6600105 - Invalid session command. - * Stop sending the command or event,sending commands supported by the controlled end. * @throws { BusinessError } 6600106 - The session is not activated. * @throws { BusinessError } 6600107 - Too many commands or events. - * Controls the frequency of sending self-query and control commands. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ @@ -6985,14 +6831,11 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @throws { BusinessError } 6600105 - Invalid session command. - * Stop sending the command or event,sending commands supported by the controlled end. * @throws { BusinessError } 6600106 - The session is not activated. * @throws { BusinessError } 6600107 - Too many commands or events. - * Controls the frequency of sending self-query and control commands. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 @@ -7007,18 +6850,15 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @throws { BusinessError } 6600105 - Invalid session command. - * Stop sending the command or event,sending commands supported by the controlled end. * @throws { BusinessError } 6600106 - The session is not activated. * @throws { BusinessError } 6600107 - Too many commands or events. - * Controls the frequency of sending self-query and control commands. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ - sendCommonCommand(command: string, args: {[key: string]: Object}, callback: AsyncCallback): void; + sendCommonCommand(command: string, args: Record, callback: AsyncCallback): void; /** * Send common commands to this session @@ -7044,41 +6884,35 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @throws { BusinessError } 6600105 - Invalid session command. - * Stop sending the command or event,sending commands supported by the controlled end. * @throws { BusinessError } 6600106 - The session is not activated. * @throws { BusinessError } 6600107 - Too many commands or events. - * Controls the frequency of sending self-query and control commands. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - sendCommonCommand(command: string, args: {[key: string]: Object}): Promise; + sendCommonCommand(command: string, args: Record): Promise; /** * Get custom media packets provided by the corresponding session - * @param { AsyncCallback<{[key: string]: Object}> } callback - The triggered asyncCallback when (getExtras). + * @param { AsyncCallback> } callback - The triggered asyncCallback when (getExtras). * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @throws { BusinessError } 6600105 - Invalid session command. - * Stop sending the command or event,sending commands supported by the controlled end. * @throws { BusinessError } 6600107 - Too many commands or events. - * Controls the frequency of sending self-query and control commands. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ - getExtras(callback: AsyncCallback<{[key: string]: Object}>): void; + getExtras(callback: AsyncCallback>): void; /** * Get custom media packets provided by the corresponding session - * @returns { Promise<{[key: string]: Object}> } the parameters of extras + * @returns { Promise> } the parameters of extras * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. @@ -7091,33 +6925,28 @@ declare namespace avSession { */ /** * Get custom media packets provided by the corresponding session - * @returns { Promise<{[key: string]: Object}> } the parameters of extras + * @returns { Promise> } the parameters of extras * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @throws { BusinessError } 6600105 - Invalid session command. - * Stop sending the command or event,sending commands supported by the controlled end. * @throws { BusinessError } 6600107 - Too many commands or events. - * Controls the frequency of sending self-query and control commands. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - getExtras(): Promise<{[key: string]: Object}>; + getExtras(): Promise>; /** * Get extra information for remote device, such as volume level, connected devices. * @param { string } extraEvent - the event name to get * @returns { Promise } the value returned for such event * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @throws { BusinessError } 6600105 - Invalid session command. - * Stop sending the command or event,sending commands supported by the controlled end. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 18 */ @@ -7147,7 +6976,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7177,7 +7005,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7207,7 +7034,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7235,7 +7061,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7267,7 +7092,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7297,7 +7121,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7327,7 +7150,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7355,7 +7177,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7381,13 +7202,12 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - on(type: 'sessionDestroy', callback: () => void); + on(type: 'sessionDestroy', callback: () => void): void; /** * Unregister current session destroyed callback @@ -7407,13 +7227,12 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - off(type: 'sessionDestroy', callback?: () => void); + off(type: 'sessionDestroy', callback?: () => void): void; /** * Register the active state of this session changed callback @@ -7435,7 +7254,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7463,7 +7281,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7491,13 +7308,12 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - on(type: 'validCommandChange', callback: (commands: Array) => void); + on(type: 'validCommandChange', callback: (commands: Array) => void): void; /** * Unregister the valid commands of the session changed callback @@ -7519,7 +7335,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7601,13 +7416,12 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - on(type: 'sessionEvent', callback: (sessionEvent: string, args: {[key: string]: Object}) => void): void; + on(type: 'sessionEvent', callback: (sessionEvent: string, args: Record) => void): void; /** * Unregister session event callback @@ -7629,13 +7443,12 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - off(type: 'sessionEvent', callback?: (sessionEvent: string, args: {[key: string]: Object}) => void): void; + off(type: 'sessionEvent', callback?: (sessionEvent: string, args: Record) => void): void; /** * Register session playlist change callback @@ -7657,7 +7470,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7685,7 +7497,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7713,7 +7524,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7741,7 +7551,6 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice @@ -7769,13 +7578,12 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - on(type: 'extrasChange', callback: (extras: {[key: string]: Object}) => void): void; + on(type: 'extrasChange', callback: (extras: Record) => void): void; /** * Unregister the custom media packets change callback @@ -7797,13 +7605,12 @@ declare namespace avSession { * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. - * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - off(type: 'extrasChange', callback?: (extras: {[key: string]: Object}) => void): void; + off(type: 'extrasChange', callback?: (extras: Record) => void): void; /** * Send custom data to this avsession. -- Gitee