161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci* Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci* you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci* You may obtain a copy of the License at
661847f8eSopenharmony_ci*
761847f8eSopenharmony_ci* http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci*
961847f8eSopenharmony_ci* Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci* distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci* See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci* limitations under the License.
1461847f8eSopenharmony_ci*/
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit AVSessionKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport type { ErrorCallback, AsyncCallback, Callback } from './@ohos.base';
2261847f8eSopenharmony_ciimport { WantAgent } from './@ohos.wantAgent';
2361847f8eSopenharmony_ciimport { KeyEvent } from './@ohos.multimodalInput.keyEvent';
2461847f8eSopenharmony_ciimport { ElementName } from './bundleManager/ElementName';
2561847f8eSopenharmony_ciimport image from './@ohos.multimedia.image';
2661847f8eSopenharmony_ciimport audio from './@ohos.multimedia.audio';
2761847f8eSopenharmony_ciimport type media from './@ohos.multimedia.media';
2861847f8eSopenharmony_ciimport type Context from './application/BaseContext';
2961847f8eSopenharmony_ci
3061847f8eSopenharmony_ci/**
3161847f8eSopenharmony_ci * @namespace avSession
3261847f8eSopenharmony_ci * @syscap SystemCapability.Multimedia.AVSession.Core
3361847f8eSopenharmony_ci * @since 9
3461847f8eSopenharmony_ci */
3561847f8eSopenharmony_ci/**
3661847f8eSopenharmony_ci * @namespace avSession
3761847f8eSopenharmony_ci * @syscap SystemCapability.Multimedia.AVSession.Core
3861847f8eSopenharmony_ci * @atomicservice
3961847f8eSopenharmony_ci * @since 12
4061847f8eSopenharmony_ci */
4161847f8eSopenharmony_ci
4261847f8eSopenharmony_cideclare namespace avSession {
4361847f8eSopenharmony_ci  /**
4461847f8eSopenharmony_ci   * Create an AVSession instance. An ability can only create one AVSession
4561847f8eSopenharmony_ci   * @param { Context } context - The context of application
4661847f8eSopenharmony_ci   * @param { string } tag - A user-defined name for this session
4761847f8eSopenharmony_ci   * @param { AVSessionType } type - The type of session {@link AVSessionType}
4861847f8eSopenharmony_ci   * @param { AsyncCallback<AVSession> } callback - async callback for AVSession.
4961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
5061847f8eSopenharmony_ci   * 2.Parameter verification failed.
5161847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
5261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
5361847f8eSopenharmony_ci   * @since 10
5461847f8eSopenharmony_ci   */
5561847f8eSopenharmony_ci  function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback<AVSession>): void;
5661847f8eSopenharmony_ci
5761847f8eSopenharmony_ci  /**
5861847f8eSopenharmony_ci   * Create an AVSession instance. An ability can only create one AVSession
5961847f8eSopenharmony_ci   * @param { Context } context - The context of application
6061847f8eSopenharmony_ci   * @param { string } tag - A user-defined name for this session
6161847f8eSopenharmony_ci   * @param { AVSessionType } type - The type of session {@link AVSessionType}
6261847f8eSopenharmony_ci   * @returns { Promise<AVSession> } Promise for AVSession
6361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
6461847f8eSopenharmony_ci   * 2.Parameter verification failed.
6561847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
6661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
6761847f8eSopenharmony_ci   * @since 10
6861847f8eSopenharmony_ci   */
6961847f8eSopenharmony_ci  /**
7061847f8eSopenharmony_ci   * Create an AVSession instance. An ability can only create one AVSession
7161847f8eSopenharmony_ci   * @param { Context } context - The context of application
7261847f8eSopenharmony_ci   * @param { string } tag - A user-defined name for this session
7361847f8eSopenharmony_ci   * @param { AVSessionType } type - The type of session {@link AVSessionType}
7461847f8eSopenharmony_ci   * @returns { Promise<AVSession> } Promise for AVSession
7561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
7661847f8eSopenharmony_ci   * 2.Parameter verification failed.
7761847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
7861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
7961847f8eSopenharmony_ci   * @atomicservice
8061847f8eSopenharmony_ci   * @since 12
8161847f8eSopenharmony_ci   */
8261847f8eSopenharmony_ci  function createAVSession(context: Context, tag: string, type: AVSessionType): Promise<AVSession>;
8361847f8eSopenharmony_ci
8461847f8eSopenharmony_ci  /**
8561847f8eSopenharmony_ci   * Get all avsession descriptors of the system
8661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
8761847f8eSopenharmony_ci   * @param { AsyncCallback<Array<Readonly<AVSessionDescriptor>>> } callback - async callback for an array of AVSessionDescriptors.
8861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
8961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
9061847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
9161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
9261847f8eSopenharmony_ci   * @systemapi
9361847f8eSopenharmony_ci   * @since 9
9461847f8eSopenharmony_ci   */
9561847f8eSopenharmony_ci  function getAllSessionDescriptors(callback: AsyncCallback<Array<Readonly<AVSessionDescriptor>>>): void;
9661847f8eSopenharmony_ci  
9761847f8eSopenharmony_ci  /**
9861847f8eSopenharmony_ci   * Get all avsession descriptors of the system
9961847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
10061847f8eSopenharmony_ci   * @returns { Promise<Array<Readonly<AVSessionDescriptor>>> } Promise for an array of AVSessionDescriptors
10161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
10261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
10361847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
10461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
10561847f8eSopenharmony_ci   * @systemapi
10661847f8eSopenharmony_ci   * @since 9
10761847f8eSopenharmony_ci   */
10861847f8eSopenharmony_ci  function getAllSessionDescriptors(): Promise<Array<Readonly<AVSessionDescriptor>>>;
10961847f8eSopenharmony_ci
11061847f8eSopenharmony_ci  /**
11161847f8eSopenharmony_ci   * Get history avsession records. These sessions have been destroyed.
11261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
11361847f8eSopenharmony_ci   * @param { number } maxSize - Specifies the maximum size of the returned value array.
11461847f8eSopenharmony_ci   * @param { AsyncCallback<Array<Readonly<AVSessionDescriptor>>> } callback - async callback for an array of AVSessionDescriptors.
11561847f8eSopenharmony_ci   * If provided '0' or not provided, the maximum value is determined by the system.
11661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
11761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App
11861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. Possible causes: 1.Mandatory parameters are left unspecified.
11961847f8eSopenharmony_ci   * 2.Incorrect parameter types.
12061847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
12161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
12261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use
12361847f8eSopenharmony_ci   * @since 10
12461847f8eSopenharmony_ci   */
12561847f8eSopenharmony_ci  function getHistoricalSessionDescriptors(maxSize: number, callback: AsyncCallback<Array<Readonly<AVSessionDescriptor>>>): void;
12661847f8eSopenharmony_ci
12761847f8eSopenharmony_ci  /**
12861847f8eSopenharmony_ci   * Get history avsession records. These sessions have been destroyed.
12961847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
13061847f8eSopenharmony_ci   * @param { number } maxSize - Specifies the maximum size of the returned value array.
13161847f8eSopenharmony_ci   * If provided '0' or not provided, the maximum value is determined by the system.
13261847f8eSopenharmony_ci   * @returns { Promise<Array<Readonly<AVSessionDescriptor>>> } Promise for an array of AVSessionDescriptors
13361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
13461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App
13561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
13661847f8eSopenharmony_ci   * 2.Incorrect parameter types.
13761847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
13861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
13961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use
14061847f8eSopenharmony_ci   * @since 10
14161847f8eSopenharmony_ci   */
14261847f8eSopenharmony_ci  function getHistoricalSessionDescriptors(maxSize?: number): Promise<Array<Readonly<AVSessionDescriptor>>>;
14361847f8eSopenharmony_ci
14461847f8eSopenharmony_ci  /**
14561847f8eSopenharmony_ci   * Get history play list information records.
14661847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
14761847f8eSopenharmony_ci   * @param { number } maxSize - Specifies the maximum size of the returned value array.
14861847f8eSopenharmony_ci   * @param { number } maxAppSize - Specifies the maximum app size of the returned value array.
14961847f8eSopenharmony_ci   * @param { AsyncCallback<Array<Readonly<AVQueueInfo>>> } callback - async callback for an array of AVQueueInfo.
15061847f8eSopenharmony_ci   * If provided '0' or not provided, the maximum value is determined by the system.
15161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
15261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
15361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
15461847f8eSopenharmony_ci   * 2.Incorrect parameter types.
15561847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
15661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
15761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use
15861847f8eSopenharmony_ci   * @since 11
15961847f8eSopenharmony_ci   */
16061847f8eSopenharmony_ci  function getHistoricalAVQueueInfos(maxSize: number, maxAppSize: number, callback: AsyncCallback<Array<Readonly<AVQueueInfo>>>): void;
16161847f8eSopenharmony_ci
16261847f8eSopenharmony_ci  /**
16361847f8eSopenharmony_ci   * Get history play list information records.
16461847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
16561847f8eSopenharmony_ci   * @param { number } maxSize - Specifies the maximum size of the returned value array.
16661847f8eSopenharmony_ci   * @param { number } maxAppSize - Specifies the maximum app size of the returned value array.
16761847f8eSopenharmony_ci   * @returns { Promise<Array<Readonly<AVQueueInfo>>> } Promise for an array of AVQueueInfo
16861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
16961847f8eSopenharmony_ci   * 2.Incorrect parameter types.
17061847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
17161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
17261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use
17361847f8eSopenharmony_ci   * @since 11
17461847f8eSopenharmony_ci   */
17561847f8eSopenharmony_ci  function getHistoricalAVQueueInfos(maxSize: number, maxAppSize: number): Promise<Array<Readonly<AVQueueInfo>>>;
17661847f8eSopenharmony_ci
17761847f8eSopenharmony_ci  /**
17861847f8eSopenharmony_ci   * Create an avsession controller
17961847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
18061847f8eSopenharmony_ci   * @param { string } sessionId - Specifies the sessionId to create the controller.
18161847f8eSopenharmony_ci   * @param { AsyncCallback<AVSessionController> } callback - async callback for AVSessionController.
18261847f8eSopenharmony_ci   * If provided 'default', the system will create a default controller, Used to control the system default session
18361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
18461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
18561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
18661847f8eSopenharmony_ci   * 2.Parameter verification failed.
18761847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
18861847f8eSopenharmony_ci   * @throws { BusinessError } 6600102 - The session does not exist.
18961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
19061847f8eSopenharmony_ci   * @systemapi
19161847f8eSopenharmony_ci   * @since 9
19261847f8eSopenharmony_ci   */
19361847f8eSopenharmony_ci  function createController(sessionId: string, callback: AsyncCallback<AVSessionController>): void;
19461847f8eSopenharmony_ci
19561847f8eSopenharmony_ci  /**
19661847f8eSopenharmony_ci   * Create an avsession controller
19761847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
19861847f8eSopenharmony_ci   * @param { string } sessionId - Specifies the sessionId to create the controller.
19961847f8eSopenharmony_ci   * If provided 'default', the system will create a default controller, Used to control the system default session
20061847f8eSopenharmony_ci   * @returns { Promise<AVSessionController> } Promise for AVSessionController
20161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
20261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
20361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
20461847f8eSopenharmony_ci   * 2.Parameter verification failed.
20561847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
20661847f8eSopenharmony_ci   * @throws { BusinessError } 6600102 - The session does not exist.
20761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
20861847f8eSopenharmony_ci   * @systemapi
20961847f8eSopenharmony_ci   * @since 9
21061847f8eSopenharmony_ci   */
21161847f8eSopenharmony_ci  function createController(sessionId: string): Promise<AVSessionController>;
21261847f8eSopenharmony_ci
21361847f8eSopenharmony_ci  /**
21461847f8eSopenharmony_ci   * Cast Audio to the remote devices or cast back local device
21561847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
21661847f8eSopenharmony_ci   * @param { SessionToken | 'all' } session - Specifies the sessionId which to send to remote.
21761847f8eSopenharmony_ci   * @param { Array<audio.AudioDeviceDescriptor> } audioDevices - Specifies the audio devices to cast.
21861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
21961847f8eSopenharmony_ci   * 'all' means cast all the media audio of this device to remote.
22061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
22161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
22261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
22361847f8eSopenharmony_ci   * 2.Parameter verification failed.
22461847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
22561847f8eSopenharmony_ci   * @throws { BusinessError } 6600102 - The session does not exist.
22661847f8eSopenharmony_ci   * @throws { BusinessError } 6600104 - The remote session connection failed.
22761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
22861847f8eSopenharmony_ci   * @systemapi
22961847f8eSopenharmony_ci   * @since 9
23061847f8eSopenharmony_ci   */
23161847f8eSopenharmony_ci  function castAudio(session: SessionToken | 'all', audioDevices: Array<audio.AudioDeviceDescriptor>, callback: AsyncCallback<void>): void;
23261847f8eSopenharmony_ci
23361847f8eSopenharmony_ci  /**
23461847f8eSopenharmony_ci   * Cast Audio to the remote devices or cast back local device
23561847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
23661847f8eSopenharmony_ci   * @param { SessionToken | 'all' } session - Specifies the sessionId which to send to remote.
23761847f8eSopenharmony_ci   * @param { Array<audio.AudioDeviceDescriptor> } audioDevices - Specifies the audio devices to cast.
23861847f8eSopenharmony_ci   * @returns { Promise<void> } void promise when executed successfully
23961847f8eSopenharmony_ci   * 'all' means cast all the media audio of this device to remote.
24061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
24161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
24261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
24361847f8eSopenharmony_ci   * 2.Parameter verification failed.
24461847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
24561847f8eSopenharmony_ci   * @throws { BusinessError } 6600102 - The session does not exist.
24661847f8eSopenharmony_ci   * @throws { BusinessError } 6600104 - The remote session  connection failed.
24761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
24861847f8eSopenharmony_ci   * @systemapi
24961847f8eSopenharmony_ci   * @since 9
25061847f8eSopenharmony_ci   */
25161847f8eSopenharmony_ci  function castAudio(session: SessionToken | 'all', audioDevices: Array<audio.AudioDeviceDescriptor>): Promise<void>;
25261847f8eSopenharmony_ci
25361847f8eSopenharmony_ci  /**
25461847f8eSopenharmony_ci   * Start an application for media playback.
25561847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
25661847f8eSopenharmony_ci   * @param { string } bundleName - Specifies the bundleName which to be started.
25761847f8eSopenharmony_ci   * @param { string } assetId - Specifies the assetId to be started.
25861847f8eSopenharmony_ci   * @returns { Promise<void> } void promise when executed successfully
25961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
26061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app.
26161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
26261847f8eSopenharmony_ci   * 2.Incorrect parameter types. 3.Parameter verification failed.
26361847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
26461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
26561847f8eSopenharmony_ci   * @systemapi
26661847f8eSopenharmony_ci   * @since 11
26761847f8eSopenharmony_ci   */
26861847f8eSopenharmony_ci  function startAVPlayback(bundleName: string, assetId: string): Promise<void>;
26961847f8eSopenharmony_ci
27061847f8eSopenharmony_ci  /**
27161847f8eSopenharmony_ci   * Session token. Used to judge the legitimacy of the session.
27261847f8eSopenharmony_ci   * @typedef SessionToken
27361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
27461847f8eSopenharmony_ci   * @systemapi
27561847f8eSopenharmony_ci   * @since 9
27661847f8eSopenharmony_ci   */
27761847f8eSopenharmony_ci  interface SessionToken {
27861847f8eSopenharmony_ci    /**
27961847f8eSopenharmony_ci     * The unique session id of the avsession object
28061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
28161847f8eSopenharmony_ci     * @type { string }
28261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Manager
28361847f8eSopenharmony_ci     * @systemapi
28461847f8eSopenharmony_ci     * @since 9
28561847f8eSopenharmony_ci     */
28661847f8eSopenharmony_ci    sessionId: string;
28761847f8eSopenharmony_ci
28861847f8eSopenharmony_ci    /**
28961847f8eSopenharmony_ci     * Process id of session
29061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
29161847f8eSopenharmony_ci     * @type { ?number }
29261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Manager
29361847f8eSopenharmony_ci     * @systemapi
29461847f8eSopenharmony_ci     * @since 9
29561847f8eSopenharmony_ci     */
29661847f8eSopenharmony_ci    pid?: number;
29761847f8eSopenharmony_ci
29861847f8eSopenharmony_ci    /**
29961847f8eSopenharmony_ci     * User id
30061847f8eSopenharmony_ci     * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
30161847f8eSopenharmony_ci     * @type { ?number }
30261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Manager
30361847f8eSopenharmony_ci     * @systemapi
30461847f8eSopenharmony_ci     * @since 9
30561847f8eSopenharmony_ci     */
30661847f8eSopenharmony_ci    uid?: number;
30761847f8eSopenharmony_ci  }
30861847f8eSopenharmony_ci
30961847f8eSopenharmony_ci  /**
31061847f8eSopenharmony_ci   * Register session create callback
31161847f8eSopenharmony_ci   * @param { 'sessionCreate' } type - Registration Type, 'sessionCreate'
31261847f8eSopenharmony_ci   * @param { function } callback - Used to handle ('sessionCreate' command)
31361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
31461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
31561847f8eSopenharmony_ci   * 2.Incorrect parameter types.
31661847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
31761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
31861847f8eSopenharmony_ci   * @systemapi
31961847f8eSopenharmony_ci   * @since 9
32061847f8eSopenharmony_ci   */
32161847f8eSopenharmony_ci  function on(type: 'sessionCreate', callback: (session: AVSessionDescriptor) => void): void;
32261847f8eSopenharmony_ci
32361847f8eSopenharmony_ci  /**
32461847f8eSopenharmony_ci   * Register session destroy callback
32561847f8eSopenharmony_ci   * @param { 'sessionDestroy' } type - Registration Type, 'sessionDestroy'
32661847f8eSopenharmony_ci   * @param { function } callback - Used to handle ('sessionDestroy' command)
32761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
32861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
32961847f8eSopenharmony_ci   * 2.Incorrect parameter types.
33061847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
33161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
33261847f8eSopenharmony_ci   * @systemapi
33361847f8eSopenharmony_ci   * @since 9
33461847f8eSopenharmony_ci   */
33561847f8eSopenharmony_ci  function on(type: 'sessionDestroy', callback: (session: AVSessionDescriptor) => void): void;
33661847f8eSopenharmony_ci
33761847f8eSopenharmony_ci  /**
33861847f8eSopenharmony_ci   * Register top session changed callback
33961847f8eSopenharmony_ci   * @param { 'topSessionChange' } type - Registration Type, top priority session change, 'topSessionChange'
34061847f8eSopenharmony_ci   * @param { function } callback - Used to handle ('topSessionChange' command)
34161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
34261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
34361847f8eSopenharmony_ci   * 2.Incorrect parameter types.
34461847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
34561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
34661847f8eSopenharmony_ci   * @systemapi
34761847f8eSopenharmony_ci   * @since 9
34861847f8eSopenharmony_ci   */
34961847f8eSopenharmony_ci  function on(type: 'topSessionChange', callback: (session: AVSessionDescriptor) => void): void;
35061847f8eSopenharmony_ci
35161847f8eSopenharmony_ci  /**
35261847f8eSopenharmony_ci   * Unregister session create callback
35361847f8eSopenharmony_ci   * @param { 'sessionCreate' } type - Registration Type, session creation, 'sessionCreate'
35461847f8eSopenharmony_ci   * @param { function } callback - Used to unregister listener for ('sessionCreate') command
35561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
35661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
35761847f8eSopenharmony_ci   * 2.Incorrect parameter types.
35861847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
35961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
36061847f8eSopenharmony_ci   * @systemapi
36161847f8eSopenharmony_ci   * @since 9
36261847f8eSopenharmony_ci   */
36361847f8eSopenharmony_ci  function off(type: 'sessionCreate', callback?: (session: AVSessionDescriptor) => void): void;
36461847f8eSopenharmony_ci
36561847f8eSopenharmony_ci  /**
36661847f8eSopenharmony_ci   * Unregister session destroy callback
36761847f8eSopenharmony_ci   * @param { 'sessionDestroy' } type - Registration Type, session deletion, 'sessionDestroy'
36861847f8eSopenharmony_ci   * @param { function } callback - Used to unregister listener for ('sessionDestroy') command
36961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
37061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
37161847f8eSopenharmony_ci   * 2.Incorrect parameter types.
37261847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
37361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
37461847f8eSopenharmony_ci   * @systemapi
37561847f8eSopenharmony_ci   * @since 9
37661847f8eSopenharmony_ci   */
37761847f8eSopenharmony_ci  function off(type: 'sessionDestroy', callback?: (session: AVSessionDescriptor) => void): void;
37861847f8eSopenharmony_ci
37961847f8eSopenharmony_ci  /**
38061847f8eSopenharmony_ci   * Unregister top session changed callback
38161847f8eSopenharmony_ci   * @param { 'topSessionChange' } type - Registration Type, top priority session change, 'topSessionChange'
38261847f8eSopenharmony_ci   * @param { function } callback - Used to unregister listener for ('topSessionChange') command
38361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
38461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
38561847f8eSopenharmony_ci   * 2.Incorrect parameter types.
38661847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
38761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
38861847f8eSopenharmony_ci   * @systemapi
38961847f8eSopenharmony_ci   * @since 9
39061847f8eSopenharmony_ci   */
39161847f8eSopenharmony_ci  function off(type: 'topSessionChange', callback?: (session: AVSessionDescriptor) => void): void;
39261847f8eSopenharmony_ci
39361847f8eSopenharmony_ci  /**
39461847f8eSopenharmony_ci   * Register Session service death callback, notifying the application to clean up resources.
39561847f8eSopenharmony_ci   * @param { 'sessionServiceDie' } type - Registration Type, 'sessionServiceDie'
39661847f8eSopenharmony_ci   * @param { function } callback - Used to handle ('sessionServiceDie') command.
39761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
39861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
39961847f8eSopenharmony_ci   * 2.Incorrect parameter types.
40061847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
40161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
40261847f8eSopenharmony_ci   * @systemapi
40361847f8eSopenharmony_ci   * @since 9
40461847f8eSopenharmony_ci   */
40561847f8eSopenharmony_ci  function on(type: 'sessionServiceDie', callback: () => void): void;
40661847f8eSopenharmony_ci
40761847f8eSopenharmony_ci  /**
40861847f8eSopenharmony_ci   * Unregister Session service death callback, notifying the application to clean up resources.
40961847f8eSopenharmony_ci   * @param { 'sessionServiceDie' } type - Registration Type, 'sessionServiceDie'
41061847f8eSopenharmony_ci   * @param { function } callback -  Used to unregister listener for ('sessionServiceDie') command.
41161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
41261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
41361847f8eSopenharmony_ci   * 2.Incorrect parameter types.
41461847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
41561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
41661847f8eSopenharmony_ci   * @systemapi
41761847f8eSopenharmony_ci   * @since 9
41861847f8eSopenharmony_ci   */
41961847f8eSopenharmony_ci  function off(type: 'sessionServiceDie', callback?: () => void): void;
42061847f8eSopenharmony_ci
42161847f8eSopenharmony_ci  /**
42261847f8eSopenharmony_ci   * Send system media key event.The system automatically selects the recipient.
42361847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
42461847f8eSopenharmony_ci   * @param { KeyEvent } event - The key event to be sent
42561847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
42661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
42761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
42861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
42961847f8eSopenharmony_ci   * 2.Parameter verification failed.
43061847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
43161847f8eSopenharmony_ci   * @throws { BusinessError } 6600105 - Invalid session command.
43261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
43361847f8eSopenharmony_ci   * @systemapi
43461847f8eSopenharmony_ci   * @since 9
43561847f8eSopenharmony_ci   */
43661847f8eSopenharmony_ci  function sendSystemAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void;
43761847f8eSopenharmony_ci
43861847f8eSopenharmony_ci  /**
43961847f8eSopenharmony_ci   * Send system media key event.The system automatically selects the recipient.
44061847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
44161847f8eSopenharmony_ci   * @param { KeyEvent } event - The key event to be sent
44261847f8eSopenharmony_ci   * @returns { Promise<void> } void promise when executed successfully
44361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
44461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
44561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
44661847f8eSopenharmony_ci   * 2.Parameter verification failed.
44761847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
44861847f8eSopenharmony_ci   * @throws { BusinessError } 6600105 - Invalid session command.
44961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
45061847f8eSopenharmony_ci   * @systemapi
45161847f8eSopenharmony_ci   * @since 9
45261847f8eSopenharmony_ci   */
45361847f8eSopenharmony_ci  function sendSystemAVKeyEvent(event: KeyEvent): Promise<void>;
45461847f8eSopenharmony_ci
45561847f8eSopenharmony_ci  /**
45661847f8eSopenharmony_ci   * Send system control command.The system automatically selects the recipient.
45761847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
45861847f8eSopenharmony_ci   * @param { AVControlCommand } command - The command to be sent. See {@link AVControlCommand}
45961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
46061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
46161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
46261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
46361847f8eSopenharmony_ci   * 2.Parameter verification failed.
46461847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
46561847f8eSopenharmony_ci   * @throws { BusinessError } 6600105 - Invalid session command.
46661847f8eSopenharmony_ci   * @throws { BusinessError } 6600107 - Too many commands or events.
46761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
46861847f8eSopenharmony_ci   * @systemapi
46961847f8eSopenharmony_ci   * @since 9
47061847f8eSopenharmony_ci   */
47161847f8eSopenharmony_ci  function sendSystemControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void;
47261847f8eSopenharmony_ci
47361847f8eSopenharmony_ci  /**
47461847f8eSopenharmony_ci   * Send system control command.The system automatically selects the recipient.
47561847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
47661847f8eSopenharmony_ci   * @param { AVControlCommand } command - The command to be sent. See {@link AVControlCommand}
47761847f8eSopenharmony_ci   * @returns { Promise<void> } void promise when executed successfully
47861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - permission denied
47961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
48061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
48161847f8eSopenharmony_ci   * 2.Parameter verification failed.
48261847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
48361847f8eSopenharmony_ci   * @throws { BusinessError } 6600105 - Invalid session command.
48461847f8eSopenharmony_ci   * @throws { BusinessError } 6600107 - Too many commands or events.
48561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
48661847f8eSopenharmony_ci   * @systemapi
48761847f8eSopenharmony_ci   * @since 9
48861847f8eSopenharmony_ci   */
48961847f8eSopenharmony_ci  function sendSystemControlCommand(command: AVControlCommand): Promise<void>;
49061847f8eSopenharmony_ci
49161847f8eSopenharmony_ci  /**
49261847f8eSopenharmony_ci   * Define different protocol capability
49361847f8eSopenharmony_ci   * @enum { number }
49461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
49561847f8eSopenharmony_ci   * @since 11
49661847f8eSopenharmony_ci   */
49761847f8eSopenharmony_ci  /**
49861847f8eSopenharmony_ci   * Define different protocol capability
49961847f8eSopenharmony_ci   * @enum { number }
50061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
50161847f8eSopenharmony_ci   * @atomicservice
50261847f8eSopenharmony_ci   * @since 12
50361847f8eSopenharmony_ci   */
50461847f8eSopenharmony_ci  enum ProtocolType {
50561847f8eSopenharmony_ci    /**
50661847f8eSopenharmony_ci     * The default cast type "local", media can be routed on the same device, 
50761847f8eSopenharmony_ci     * including internal speakers or audio jack on the device itself, A2DP devices.
50861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
50961847f8eSopenharmony_ci     * @since 11
51061847f8eSopenharmony_ci     */
51161847f8eSopenharmony_ci    /**
51261847f8eSopenharmony_ci     * The default cast type "local", media can be routed on the same device, 
51361847f8eSopenharmony_ci     * including internal speakers or audio jack on the device itself, A2DP devices.
51461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
51561847f8eSopenharmony_ci     * @atomicservice
51661847f8eSopenharmony_ci     * @since 12
51761847f8eSopenharmony_ci     */
51861847f8eSopenharmony_ci    TYPE_LOCAL = 0,
51961847f8eSopenharmony_ci
52061847f8eSopenharmony_ci    /**
52161847f8eSopenharmony_ci     * Cast+ mirror capability
52261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
52361847f8eSopenharmony_ci     * @systemapi
52461847f8eSopenharmony_ci     * @since 10
52561847f8eSopenharmony_ci     */
52661847f8eSopenharmony_ci    TYPE_CAST_PLUS_MIRROR = 1,
52761847f8eSopenharmony_ci
52861847f8eSopenharmony_ci    /**
52961847f8eSopenharmony_ci     * The Cast+ Stream indicating the media is presenting on a different device
53061847f8eSopenharmony_ci     * the application need get an AVCastController to control remote playback.
53161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
53261847f8eSopenharmony_ci     * @since 11
53361847f8eSopenharmony_ci     */
53461847f8eSopenharmony_ci    /**
53561847f8eSopenharmony_ci     * The Cast+ Stream indicating the media is presenting on a different device
53661847f8eSopenharmony_ci     * the application need get an AVCastController to control remote playback.
53761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
53861847f8eSopenharmony_ci     * @atomicservice
53961847f8eSopenharmony_ci     * @since 12
54061847f8eSopenharmony_ci     */
54161847f8eSopenharmony_ci    TYPE_CAST_PLUS_STREAM = 2,
54261847f8eSopenharmony_ci
54361847f8eSopenharmony_ci    /**
54461847f8eSopenharmony_ci     * The DLNA type indicates the device supports DLNA protocol,
54561847f8eSopenharmony_ci     * the application needs to get an AVCastController to control remote playback.
54661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
54761847f8eSopenharmony_ci     * @atomicservice
54861847f8eSopenharmony_ci     * @since 12
54961847f8eSopenharmony_ci     */
55061847f8eSopenharmony_ci    TYPE_DLNA = 4,
55161847f8eSopenharmony_ci  }
55261847f8eSopenharmony_ci
55361847f8eSopenharmony_ci  /**
55461847f8eSopenharmony_ci   * Start device discovery.
55561847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback a callback function
55661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
55761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
55861847f8eSopenharmony_ci   * @systemapi
55961847f8eSopenharmony_ci   * @since 10
56061847f8eSopenharmony_ci   */
56161847f8eSopenharmony_ci  function startCastDeviceDiscovery(callback: AsyncCallback<void>): void;
56261847f8eSopenharmony_ci
56361847f8eSopenharmony_ci  /**
56461847f8eSopenharmony_ci   * Start device discovery.
56561847f8eSopenharmony_ci   * @param { number } filter device filter when discovering, can be an union of {@link ProtocolType}
56661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback a callback function
56761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
56861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
56961847f8eSopenharmony_ci   * 2.Parameter verification failed.
57061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
57161847f8eSopenharmony_ci   * @systemapi
57261847f8eSopenharmony_ci   * @since 10
57361847f8eSopenharmony_ci   */
57461847f8eSopenharmony_ci  function startCastDeviceDiscovery(filter: number, callback: AsyncCallback<void>): void;
57561847f8eSopenharmony_ci
57661847f8eSopenharmony_ci  /**
57761847f8eSopenharmony_ci   * Start device discovery.
57861847f8eSopenharmony_ci   * @param { number } filter device filter when discovering, can be an union of {@link ProtocolType}
57961847f8eSopenharmony_ci   * @returns { Promise<void> } Promise for the result
58061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
58161847f8eSopenharmony_ci   * 2.Parameter verification failed.
58261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
58361847f8eSopenharmony_ci   * @systemapi
58461847f8eSopenharmony_ci   * @since 10
58561847f8eSopenharmony_ci   */
58661847f8eSopenharmony_ci  /**
58761847f8eSopenharmony_ci   * Start device discovery.
58861847f8eSopenharmony_ci   * @param { number } [filter] - device filter when discovering, can be an union of {@link ProtocolType}
58961847f8eSopenharmony_ci   * @param { Array<string> } [drmSchemes] - filter drm-enabled devices which are represented by uuid.
59061847f8eSopenharmony_ci   * It is effective when protocol type is TYPE_CAST_PLUS_STREAM.
59161847f8eSopenharmony_ci   * @returns { Promise<void> } Promise for the result
59261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
59361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
59461847f8eSopenharmony_ci   * 2.Incorrect parameter types. 3.Parameter verification failed.
59561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
59661847f8eSopenharmony_ci   * @systemapi
59761847f8eSopenharmony_ci   * @since 12
59861847f8eSopenharmony_ci   */
59961847f8eSopenharmony_ci  function startCastDeviceDiscovery(filter?: number, drmSchemes?: Array<string>): Promise<void>;
60061847f8eSopenharmony_ci
60161847f8eSopenharmony_ci  /**
60261847f8eSopenharmony_ci   * Stop device discovery.
60361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback a callback function
60461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
60561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
60661847f8eSopenharmony_ci   * @systemapi
60761847f8eSopenharmony_ci   * @since 10
60861847f8eSopenharmony_ci   */
60961847f8eSopenharmony_ci  function stopCastDeviceDiscovery(callback: AsyncCallback<void>): void;
61061847f8eSopenharmony_ci
61161847f8eSopenharmony_ci  /**
61261847f8eSopenharmony_ci   * Stop device discovery.
61361847f8eSopenharmony_ci   * @returns { Promise<void> } Promise for the result
61461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
61561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
61661847f8eSopenharmony_ci   * @systemapi
61761847f8eSopenharmony_ci   * @since 10
61861847f8eSopenharmony_ci   */
61961847f8eSopenharmony_ci  function stopCastDeviceDiscovery(): Promise<void>;
62061847f8eSopenharmony_ci
62161847f8eSopenharmony_ci  /**
62261847f8eSopenharmony_ci   * Enable or disable device to be discoverable, used at sink side.
62361847f8eSopenharmony_ci   * @param { boolean } enable true: can be discoverable, false: cannot be discoverable.
62461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback a callback function
62561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
62661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
62761847f8eSopenharmony_ci   * 2.Parameter verification failed.
62861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
62961847f8eSopenharmony_ci   * @systemapi
63061847f8eSopenharmony_ci   * @since 10
63161847f8eSopenharmony_ci   */
63261847f8eSopenharmony_ci  function setDiscoverable(enable: boolean, callback: AsyncCallback<void>): void;
63361847f8eSopenharmony_ci
63461847f8eSopenharmony_ci  /**
63561847f8eSopenharmony_ci   * Enable or disable device to be discoverable, used at sink side.
63661847f8eSopenharmony_ci   * @param { boolean } enable true: can be discoverable, false: cannot be discoverable.
63761847f8eSopenharmony_ci   * @returns { Promise<void> } Promise for the result
63861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
63961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
64061847f8eSopenharmony_ci   * 2.Parameter verification failed.
64161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
64261847f8eSopenharmony_ci   * @systemapi
64361847f8eSopenharmony_ci   * @since 10
64461847f8eSopenharmony_ci   */
64561847f8eSopenharmony_ci  function setDiscoverable(enable: boolean): Promise<void>;
64661847f8eSopenharmony_ci
64761847f8eSopenharmony_ci  /**
64861847f8eSopenharmony_ci   * Register device discovery callback
64961847f8eSopenharmony_ci   * @param { 'deviceAvailable' } type Registration Type
65061847f8eSopenharmony_ci   * @param { function } callback Used to returns the device info
65161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
65261847f8eSopenharmony_ci   * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
65361847f8eSopenharmony_ci   * 2.Incorrect parameter types.
65461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
65561847f8eSopenharmony_ci   * @systemapi
65661847f8eSopenharmony_ci   * @since 10
65761847f8eSopenharmony_ci   */
65861847f8eSopenharmony_ci  function on(type: 'deviceAvailable', callback: (device: OutputDeviceInfo) => void): void;
65961847f8eSopenharmony_ci
66061847f8eSopenharmony_ci  /**
66161847f8eSopenharmony_ci   * Unregister device discovery callback
66261847f8eSopenharmony_ci   * @param { 'deviceAvailable' } type Registration Type
66361847f8eSopenharmony_ci   * @param { function } callback Used to returns the device info
66461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
66561847f8eSopenharmony_ci   * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
66661847f8eSopenharmony_ci   * 2.Incorrect parameter types.
66761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
66861847f8eSopenharmony_ci   * @systemapi
66961847f8eSopenharmony_ci   * @since 10
67061847f8eSopenharmony_ci   */
67161847f8eSopenharmony_ci  function off(type: 'deviceAvailable', callback?: (device: OutputDeviceInfo) => void): void;
67261847f8eSopenharmony_ci
67361847f8eSopenharmony_ci  /**
67461847f8eSopenharmony_ci   * Register device offline callback
67561847f8eSopenharmony_ci   * @param { 'deviceOffline' } type - Registration Type
67661847f8eSopenharmony_ci   * @param { function } callback - Used to returns the device info
67761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
67861847f8eSopenharmony_ci   * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
67961847f8eSopenharmony_ci   * 2.Incorrect parameter types.
68061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
68161847f8eSopenharmony_ci   * @systemapi
68261847f8eSopenharmony_ci   * @since 11
68361847f8eSopenharmony_ci   */
68461847f8eSopenharmony_ci  function on(type: 'deviceOffline', callback: (deviceId: string) => void): void;
68561847f8eSopenharmony_ci
68661847f8eSopenharmony_ci  /**
68761847f8eSopenharmony_ci   * Unregister device offline callback
68861847f8eSopenharmony_ci   * @param { 'deviceOffline' } type - Registration Type
68961847f8eSopenharmony_ci   * @param { function } callback - Used to returns the device info
69061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
69161847f8eSopenharmony_ci   * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
69261847f8eSopenharmony_ci   * 2.Incorrect parameter types.
69361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
69461847f8eSopenharmony_ci   * @systemapi
69561847f8eSopenharmony_ci   * @since 11
69661847f8eSopenharmony_ci   */
69761847f8eSopenharmony_ci  function off(type: 'deviceOffline', callback?: (deviceId: string) => void): void;
69861847f8eSopenharmony_ci
69961847f8eSopenharmony_ci  /**
70061847f8eSopenharmony_ci   * Register a callback to retrieve an avsession cast controller.
70161847f8eSopenharmony_ci   * This function can be used at both side to get the same controller to do the playback control.
70261847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
70361847f8eSopenharmony_ci   * @param { string } sessionId Specifies the sessionId to get controller.
70461847f8eSopenharmony_ci   * @param { AsyncCallback<AVCastController> } callback - async callback for the AVCastController.
70561847f8eSopenharmony_ci   * @throws {BusinessError} 201 - permission denied
70661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
70761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
70861847f8eSopenharmony_ci   * 2.Parameter verification failed.
70961847f8eSopenharmony_ci   * @throws {BusinessError} 6600101 - Session service exception
71061847f8eSopenharmony_ci   * @throws {BusinessError} 6600102 - session does not exist
71161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
71261847f8eSopenharmony_ci   * @systemapi
71361847f8eSopenharmony_ci   * @since 10
71461847f8eSopenharmony_ci   */
71561847f8eSopenharmony_ci  function getAVCastController(sessionId: string, callback: AsyncCallback<AVCastController>): void;
71661847f8eSopenharmony_ci
71761847f8eSopenharmony_ci  /**
71861847f8eSopenharmony_ci   * Get the current session's remote controller client.
71961847f8eSopenharmony_ci   * If the avsession is not under casting state, the controller will return null.
72061847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
72161847f8eSopenharmony_ci   * @param { string } sessionId Specifies the sessionId to get controller.
72261847f8eSopenharmony_ci   * @returns { Promise<AVCastController> } Promise for the AVCastController
72361847f8eSopenharmony_ci   * @throws {BusinessError} 201 - permission denied
72461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
72561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
72661847f8eSopenharmony_ci   * 2.Parameter verification failed.
72761847f8eSopenharmony_ci   * @throws {BusinessError} 6600101 - server exception
72861847f8eSopenharmony_ci   * @throws {BusinessError} 6600102 - session does not exist
72961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
73061847f8eSopenharmony_ci   * @systemapi
73161847f8eSopenharmony_ci   * @since 10
73261847f8eSopenharmony_ci   */
73361847f8eSopenharmony_ci  function getAVCastController(sessionId: string): Promise<AVCastController>;
73461847f8eSopenharmony_ci
73561847f8eSopenharmony_ci  /**
73661847f8eSopenharmony_ci   * Cast resource to remote device.
73761847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
73861847f8eSopenharmony_ci   * @param { SessionToken } session Specifies the sessionId which is to be casted.
73961847f8eSopenharmony_ci   * @param { OutputDeviceInfo } device Specifies the device to cast.
74061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback A callback instance used to return when start casting.
74161847f8eSopenharmony_ci   * @throws {BusinessError} 201 - permission denied
74261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
74361847f8eSopenharmony_ci   * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
74461847f8eSopenharmony_ci   * 2.Incorrect parameter types. 3.Parameter verification failed.
74561847f8eSopenharmony_ci   * @throws {BusinessError} 6600101 - Session service exception
74661847f8eSopenharmony_ci   * @throws {BusinessError} 6600108 - Device connecting failed
74761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
74861847f8eSopenharmony_ci   * @systemapi
74961847f8eSopenharmony_ci   * @since 10
75061847f8eSopenharmony_ci   */
75161847f8eSopenharmony_ci  function startCasting(session: SessionToken, device: OutputDeviceInfo, callback: AsyncCallback<void>): void;
75261847f8eSopenharmony_ci
75361847f8eSopenharmony_ci  /**
75461847f8eSopenharmony_ci   * Cast resource to remote device.
75561847f8eSopenharmony_ci   * @permission ohos.permission.MANAGE_MEDIA_RESOURCES
75661847f8eSopenharmony_ci   * @param { SessionToken } session Specifies the sessionId which is to be casted.
75761847f8eSopenharmony_ci   * @param { OutputDeviceInfo } device Specifies the device to cast.
75861847f8eSopenharmony_ci   * @returns { Promise<void> } Promise for the result
75961847f8eSopenharmony_ci   * @throws {BusinessError} 201 - permission denied
76061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
76161847f8eSopenharmony_ci   * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
76261847f8eSopenharmony_ci   * 2.Incorrect parameter types. 3.Parameter verification failed.
76361847f8eSopenharmony_ci   * @throws {BusinessError} 6600101 - Session service exception
76461847f8eSopenharmony_ci   * @throws {BusinessError} 6600108 - Device connecting failed
76561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
76661847f8eSopenharmony_ci   * @systemapi
76761847f8eSopenharmony_ci   * @since 10
76861847f8eSopenharmony_ci   */
76961847f8eSopenharmony_ci  function startCasting(session: SessionToken, device: OutputDeviceInfo): Promise<void>;
77061847f8eSopenharmony_ci
77161847f8eSopenharmony_ci  /**
77261847f8eSopenharmony_ci   * Stop current cast and disconnect device connection.
77361847f8eSopenharmony_ci   * @param { SessionToken } session Specifies the sessionId which is to be stopped.
77461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback A callback instance used to return when cast stopped completed.
77561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
77661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
77761847f8eSopenharmony_ci   * 2.Incorrect parameter types. 3.Parameter verification failed.
77861847f8eSopenharmony_ci   * @throws { BusinessError } 6600109 - The remote connection is not established
77961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
78061847f8eSopenharmony_ci   * @systemapi
78161847f8eSopenharmony_ci   * @since 10
78261847f8eSopenharmony_ci   */
78361847f8eSopenharmony_ci  function stopCasting(session: SessionToken, callback: AsyncCallback<void>): void;
78461847f8eSopenharmony_ci
78561847f8eSopenharmony_ci  /**
78661847f8eSopenharmony_ci   * Stop current cast and disconnect device connection.
78761847f8eSopenharmony_ci   * @param { SessionToken } session Specifies the sessionId which is to be stopped.
78861847f8eSopenharmony_ci   * @returns { Promise<void> } Promise for the result
78961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
79061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
79161847f8eSopenharmony_ci   * 2.Incorrect parameter types. 3.Parameter verification failed.
79261847f8eSopenharmony_ci   * @throws { BusinessError } 6600109 - The remote connection is not established
79361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
79461847f8eSopenharmony_ci   * @systemapi
79561847f8eSopenharmony_ci   * @since 10
79661847f8eSopenharmony_ci   */
79761847f8eSopenharmony_ci  function stopCasting(session: SessionToken): Promise<void>;
79861847f8eSopenharmony_ci
79961847f8eSopenharmony_ci  /**
80061847f8eSopenharmony_ci   * Begin to write device logs into a file descriptor for the purpose of problem locating.
80161847f8eSopenharmony_ci   * If the logs exceed max file size, no logs will be written and DEVICE_LOG_FULL event will be omitted.
80261847f8eSopenharmony_ci   * @param { string } url - The file descriptor to be written.
80361847f8eSopenharmony_ci   * @param { number } maxSize - The max size to be written in kilobyte.
80461847f8eSopenharmony_ci   * if not set, then written process will exit when there is no space to write.
80561847f8eSopenharmony_ci   * @returns { Promise<void> } Promise for the result
80661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
80761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
80861847f8eSopenharmony_ci   * 2. Incorrect parameter types.
80961847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
81061847f8eSopenharmony_ci   * @throws { BusinessError } 6600102 - The session does not exist.
81161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
81261847f8eSopenharmony_ci   * @systemapi
81361847f8eSopenharmony_ci   * @since 13
81461847f8eSopenharmony_ci   */
81561847f8eSopenharmony_ci  function startDeviceLogging(url: string, maxSize?: number): Promise<void>;
81661847f8eSopenharmony_ci
81761847f8eSopenharmony_ci  /**
81861847f8eSopenharmony_ci   * Stop the current device written even the discovery is ongoing.
81961847f8eSopenharmony_ci   * @returns { Promise<void> } Promise for the result
82061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
82161847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
82261847f8eSopenharmony_ci   * @throws { BusinessError } 6600102 - The session does not exist.
82361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
82461847f8eSopenharmony_ci   * @systemapi
82561847f8eSopenharmony_ci   * @since 13
82661847f8eSopenharmony_ci   */
82761847f8eSopenharmony_ci  function stopDeviceLogging(): Promise<void>;
82861847f8eSopenharmony_ci
82961847f8eSopenharmony_ci  /**
83061847f8eSopenharmony_ci   * Register log event callback.
83161847f8eSopenharmony_ci   * @param { 'deviceLogEvent' } type - Command to register 'deviceLogEvent'.
83261847f8eSopenharmony_ci   * @param { Callback<DeviceLogEventCode> } callback - Used to handle ('deviceLogEvent') command
83361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
83461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
83561847f8eSopenharmony_ci   * 2. Incorrect parameter types.
83661847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
83761847f8eSopenharmony_ci   * @throws { BusinessError } 6600102 - The session does not exist.
83861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
83961847f8eSopenharmony_ci   * @systemapi
84061847f8eSopenharmony_ci   * @since 13
84161847f8eSopenharmony_ci   */
84261847f8eSopenharmony_ci  function on(type: 'deviceLogEvent', callback: Callback<DeviceLogEventCode>): void;
84361847f8eSopenharmony_ci
84461847f8eSopenharmony_ci  /**
84561847f8eSopenharmony_ci   * UnRegister log event callback.
84661847f8eSopenharmony_ci   * @param { 'deviceLogEvent' } type - Command to register 'deviceLogEvent'.
84761847f8eSopenharmony_ci   * @param { Callback<DeviceLogEventCode> } callback - Used to handle ('deviceLogEvent') command
84861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Not System App.
84961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
85061847f8eSopenharmony_ci   * 2. Incorrect parameter types.
85161847f8eSopenharmony_ci   * @throws { BusinessError } 6600101 - Session service exception.
85261847f8eSopenharmony_ci   * @throws { BusinessError } 6600102 - The session does not exist.
85361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
85461847f8eSopenharmony_ci   * @systemapi
85561847f8eSopenharmony_ci   * @since 13
85661847f8eSopenharmony_ci   */
85761847f8eSopenharmony_ci  function off(type: 'deviceLogEvent', callback?: Callback<DeviceLogEventCode>): void;
85861847f8eSopenharmony_ci
85961847f8eSopenharmony_ci  /**
86061847f8eSopenharmony_ci   * Enumerates device log event code.
86161847f8eSopenharmony_ci   * @enum { number }
86261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
86361847f8eSopenharmony_ci   * @systemapi
86461847f8eSopenharmony_ci   * @since 13
86561847f8eSopenharmony_ci   */
86661847f8eSopenharmony_ci  enum DeviceLogEventCode {
86761847f8eSopenharmony_ci    /**
86861847f8eSopenharmony_ci      * Log is full.
86961847f8eSopenharmony_ci      * @syscap SystemCapability.Multimedia.AVSession.AVCast
87061847f8eSopenharmony_ci      * @systemapi
87161847f8eSopenharmony_ci      * @since 13
87261847f8eSopenharmony_ci      */
87361847f8eSopenharmony_ci    DEVICE_LOG_FULL = 1,
87461847f8eSopenharmony_ci
87561847f8eSopenharmony_ci    /**
87661847f8eSopenharmony_ci      * Log is written with exception, such as the fd cannot be written and so on.
87761847f8eSopenharmony_ci      * @syscap SystemCapability.Multimedia.AVSession.AVCast
87861847f8eSopenharmony_ci      * @systemapi
87961847f8eSopenharmony_ci      * @since 13
88061847f8eSopenharmony_ci      */
88161847f8eSopenharmony_ci    DEVICE_LOG_EXCEPTION = 2,
88261847f8eSopenharmony_ci  }
88361847f8eSopenharmony_ci
88461847f8eSopenharmony_ci  /**
88561847f8eSopenharmony_ci   * Session type, support audio & video
88661847f8eSopenharmony_ci   * @typedef { 'audio' | 'video' } AVSessionType
88761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
88861847f8eSopenharmony_ci   * @since 10
88961847f8eSopenharmony_ci   */
89061847f8eSopenharmony_ci  /**
89161847f8eSopenharmony_ci   * Session type, support audio & video, voice_call
89261847f8eSopenharmony_ci   * @typedef { 'audio' | 'video' | 'voice_call' } AVSessionType
89361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
89461847f8eSopenharmony_ci   * @since 11
89561847f8eSopenharmony_ci   */
89661847f8eSopenharmony_ci  /**
89761847f8eSopenharmony_ci   * Session type supports audio & video, voice_call, video_call
89861847f8eSopenharmony_ci   * @typedef { 'audio' | 'video' | 'voice_call' | 'video_call' } AVSessionType
89961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
90061847f8eSopenharmony_ci   * @atomicservice
90161847f8eSopenharmony_ci   * @since 12
90261847f8eSopenharmony_ci   */
90361847f8eSopenharmony_ci  type AVSessionType = 'audio' | 'video' | 'voice_call' | 'video_call';
90461847f8eSopenharmony_ci
90561847f8eSopenharmony_ci  /**
90661847f8eSopenharmony_ci   * AVSession object.
90761847f8eSopenharmony_ci   * @interface AVSession
90861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
90961847f8eSopenharmony_ci   * @since 10
91061847f8eSopenharmony_ci   */
91161847f8eSopenharmony_ci  /**
91261847f8eSopenharmony_ci   * AVSession object.
91361847f8eSopenharmony_ci   * @interface AVSession
91461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
91561847f8eSopenharmony_ci   * @atomicservice
91661847f8eSopenharmony_ci   * @since 12
91761847f8eSopenharmony_ci   */
91861847f8eSopenharmony_ci  interface AVSession {
91961847f8eSopenharmony_ci    /**
92061847f8eSopenharmony_ci     * unique session Id
92161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
92261847f8eSopenharmony_ci     * @since 10
92361847f8eSopenharmony_ci     */
92461847f8eSopenharmony_ci    /**
92561847f8eSopenharmony_ci     * unique session Id
92661847f8eSopenharmony_ci     * @type { string }
92761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
92861847f8eSopenharmony_ci     * @atomicservice
92961847f8eSopenharmony_ci     * @since 12
93061847f8eSopenharmony_ci     */
93161847f8eSopenharmony_ci    readonly sessionId: string;
93261847f8eSopenharmony_ci
93361847f8eSopenharmony_ci    /**
93461847f8eSopenharmony_ci     * Get current session type
93561847f8eSopenharmony_ci     * @type { AVSessionType }
93661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
93761847f8eSopenharmony_ci     * @since 10
93861847f8eSopenharmony_ci     */
93961847f8eSopenharmony_ci    /**
94061847f8eSopenharmony_ci     * Get current session type
94161847f8eSopenharmony_ci     * @type { AVSessionType }
94261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
94361847f8eSopenharmony_ci     * @atomicservice
94461847f8eSopenharmony_ci     * @since 12
94561847f8eSopenharmony_ci     */
94661847f8eSopenharmony_ci    readonly sessionType: AVSessionType;
94761847f8eSopenharmony_ci
94861847f8eSopenharmony_ci    /**
94961847f8eSopenharmony_ci     * Set the metadata of this session.
95061847f8eSopenharmony_ci     * In addition to the required properties, users can fill in partially supported properties
95161847f8eSopenharmony_ci     * @param { AVMetadata } data {@link AVMetadata}
95261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
95361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
95461847f8eSopenharmony_ci     * 2.Parameter verification failed.
95561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
95661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
95761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
95861847f8eSopenharmony_ci     * @since 10
95961847f8eSopenharmony_ci     */
96061847f8eSopenharmony_ci    setAVMetadata(data: AVMetadata, callback: AsyncCallback<void>): void;
96161847f8eSopenharmony_ci
96261847f8eSopenharmony_ci    /**
96361847f8eSopenharmony_ci     * Set the metadata of this session.
96461847f8eSopenharmony_ci     * In addition to the required properties, users can fill in partially supported properties
96561847f8eSopenharmony_ci     * @param { AVMetadata } data {@link AVMetadata}
96661847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
96761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
96861847f8eSopenharmony_ci     * 2.Parameter verification failed.
96961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
97061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
97161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
97261847f8eSopenharmony_ci     * @since 10
97361847f8eSopenharmony_ci     */
97461847f8eSopenharmony_ci    /**
97561847f8eSopenharmony_ci     * Set the metadata of this session.
97661847f8eSopenharmony_ci     * In addition to the required properties, users can fill in partially supported properties
97761847f8eSopenharmony_ci     * @param { AVMetadata } data {@link AVMetadata}
97861847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
97961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
98061847f8eSopenharmony_ci     * 2.Parameter verification failed.
98161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
98261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
98361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
98461847f8eSopenharmony_ci     * @atomicservice
98561847f8eSopenharmony_ci     * @since 12
98661847f8eSopenharmony_ci     */
98761847f8eSopenharmony_ci    setAVMetadata(data: AVMetadata): Promise<void>;
98861847f8eSopenharmony_ci
98961847f8eSopenharmony_ci    /**
99061847f8eSopenharmony_ci     * Set the metadata related with current call.
99161847f8eSopenharmony_ci     * @param { CallMetadata } data - {@link CallMetadata}
99261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
99361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
99461847f8eSopenharmony_ci     * 2.Incorrect parameter types. 3.Parameter verification failed.
99561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
99661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
99761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
99861847f8eSopenharmony_ci     * @since 11
99961847f8eSopenharmony_ci     */
100061847f8eSopenharmony_ci    setCallMetadata(data: CallMetadata, callback: AsyncCallback<void>): void;
100161847f8eSopenharmony_ci
100261847f8eSopenharmony_ci    /**
100361847f8eSopenharmony_ci     * Set the metadata related with current call.
100461847f8eSopenharmony_ci     * @param { CallMetadata } data - {@link CallMetadata}
100561847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
100661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
100761847f8eSopenharmony_ci     * 2.Incorrect parameter types. 3.Parameter verification failed.
100861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
100961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
101061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
101161847f8eSopenharmony_ci     * @since 11
101261847f8eSopenharmony_ci     */
101361847f8eSopenharmony_ci    setCallMetadata(data: CallMetadata): Promise<void>;
101461847f8eSopenharmony_ci
101561847f8eSopenharmony_ci    /**
101661847f8eSopenharmony_ci     * Set the playback state of this session.
101761847f8eSopenharmony_ci     * @param { AVPlaybackState } state {@link AVPlaybackState}
101861847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
101961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
102061847f8eSopenharmony_ci     * 2.Parameter verification failed.
102161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
102261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
102361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
102461847f8eSopenharmony_ci     * @since 10
102561847f8eSopenharmony_ci     */
102661847f8eSopenharmony_ci    setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback<void>): void;
102761847f8eSopenharmony_ci
102861847f8eSopenharmony_ci    /**
102961847f8eSopenharmony_ci     * Set the playback state of this session.
103061847f8eSopenharmony_ci     * @param { AVPlaybackState } state {@link AVPlaybackState}
103161847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
103261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
103361847f8eSopenharmony_ci     * 2.Parameter verification failed.
103461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
103561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
103661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
103761847f8eSopenharmony_ci     * @since 10
103861847f8eSopenharmony_ci     */
103961847f8eSopenharmony_ci    /**
104061847f8eSopenharmony_ci     * Set the playback state of this session.
104161847f8eSopenharmony_ci     * @param { AVPlaybackState } state {@link AVPlaybackState}
104261847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
104361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
104461847f8eSopenharmony_ci     * 2.Parameter verification failed.
104561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
104661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
104761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
104861847f8eSopenharmony_ci     * @atomicservice
104961847f8eSopenharmony_ci     * @since 12
105061847f8eSopenharmony_ci     */
105161847f8eSopenharmony_ci    setAVPlaybackState(state: AVPlaybackState): Promise<void>;
105261847f8eSopenharmony_ci
105361847f8eSopenharmony_ci    /**
105461847f8eSopenharmony_ci     * Set the call state of this session.
105561847f8eSopenharmony_ci     * @param { AVCallState } state - {@link AVCallState}
105661847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
105761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
105861847f8eSopenharmony_ci     * 2.Parameter verification failed.
105961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
106061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
106161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
106261847f8eSopenharmony_ci     * @since 11
106361847f8eSopenharmony_ci     */
106461847f8eSopenharmony_ci    setAVCallState(state: AVCallState, callback: AsyncCallback<void>): void;
106561847f8eSopenharmony_ci
106661847f8eSopenharmony_ci    /**
106761847f8eSopenharmony_ci     * Set the call state of this session.
106861847f8eSopenharmony_ci     * @param { AVCallState } state - {@link AVCallState}
106961847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
107061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
107161847f8eSopenharmony_ci     * 2.Parameter verification failed.
107261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
107361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
107461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
107561847f8eSopenharmony_ci     * @since 11
107661847f8eSopenharmony_ci     */
107761847f8eSopenharmony_ci    setAVCallState(state: AVCallState): Promise<void>;
107861847f8eSopenharmony_ci
107961847f8eSopenharmony_ci    /**
108061847f8eSopenharmony_ci     * Set the ability to start the session corresponding to
108161847f8eSopenharmony_ci     * @param { WantAgent } ability - The WantAgent for launch the ability
108261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
108361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
108461847f8eSopenharmony_ci     * 2.Parameter verification failed.
108561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
108661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
108761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
108861847f8eSopenharmony_ci     * @since 10
108961847f8eSopenharmony_ci     */
109061847f8eSopenharmony_ci    setLaunchAbility(ability: WantAgent, callback: AsyncCallback<void>): void;
109161847f8eSopenharmony_ci
109261847f8eSopenharmony_ci    /**
109361847f8eSopenharmony_ci     * Set the ability to start the session corresponding to
109461847f8eSopenharmony_ci     * @param { WantAgent } ability - The WantAgent for launch the ability
109561847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
109661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
109761847f8eSopenharmony_ci     * 2.Parameter verification failed.
109861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
109961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
110061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
110161847f8eSopenharmony_ci     * @since 10
110261847f8eSopenharmony_ci     */
110361847f8eSopenharmony_ci    /**
110461847f8eSopenharmony_ci     * Set the ability to start the session corresponding to
110561847f8eSopenharmony_ci     * @param { WantAgent } ability - The WantAgent for launch the ability
110661847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
110761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
110861847f8eSopenharmony_ci     * 2.Parameter verification failed.
110961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
111061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
111161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
111261847f8eSopenharmony_ci     * @atomicservice
111361847f8eSopenharmony_ci     * @since 12
111461847f8eSopenharmony_ci     */
111561847f8eSopenharmony_ci    setLaunchAbility(ability: WantAgent): Promise<void>;
111661847f8eSopenharmony_ci
111761847f8eSopenharmony_ci    /**
111861847f8eSopenharmony_ci     * Dispatch the session event of this session.
111961847f8eSopenharmony_ci     * @param { string } event - Session event name to dispatch
112061847f8eSopenharmony_ci     * @param { object } args - The parameters of session event
112161847f8eSopenharmony_ci     * @param { AsyncCallback<void>} callback - The asyncCallback triggered when the command is executed successfully
112261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
112361847f8eSopenharmony_ci     * 2.Incorrect parameter types. 3.Parameter verification failed.
112461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
112561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
112661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
112761847f8eSopenharmony_ci     * @since 10
112861847f8eSopenharmony_ci     */
112961847f8eSopenharmony_ci    dispatchSessionEvent(event: string, args: {[key: string]: Object}, callback: AsyncCallback<void>): void;
113061847f8eSopenharmony_ci
113161847f8eSopenharmony_ci    /**
113261847f8eSopenharmony_ci     * Dispatch the session event of this session.
113361847f8eSopenharmony_ci     * @param { string } event - Session event name to dispatch
113461847f8eSopenharmony_ci     * @param { object } args - The parameters of session event
113561847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
113661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
113761847f8eSopenharmony_ci     * 2.Incorrect parameter types. 3.Parameter verification failed.
113861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
113961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
114061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
114161847f8eSopenharmony_ci     * @since 10
114261847f8eSopenharmony_ci     */
114361847f8eSopenharmony_ci    /**
114461847f8eSopenharmony_ci     * Dispatch the session event of this session.
114561847f8eSopenharmony_ci     * @param { string } event - Session event name to dispatch
114661847f8eSopenharmony_ci     * @param { object } args - The parameters of session event
114761847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
114861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
114961847f8eSopenharmony_ci     * 2.Incorrect parameter types. 3.Parameter verification failed.
115061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
115161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
115261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
115361847f8eSopenharmony_ci     * @atomicservice
115461847f8eSopenharmony_ci     * @since 12
115561847f8eSopenharmony_ci     */
115661847f8eSopenharmony_ci    dispatchSessionEvent(event: string, args: {[key: string]: Object}): Promise<void>;
115761847f8eSopenharmony_ci
115861847f8eSopenharmony_ci    /**
115961847f8eSopenharmony_ci     * Set the playlist of queueItem. Identifies the content of the playlist presented by this session.
116061847f8eSopenharmony_ci     * @param { Array<AVQueueItem> } items - An array of the AVQueueItem
116161847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully.
116261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
116361847f8eSopenharmony_ci     * 2.Parameter verification failed.
116461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
116561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
116661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
116761847f8eSopenharmony_ci     * @since 10
116861847f8eSopenharmony_ci     */
116961847f8eSopenharmony_ci    setAVQueueItems(items: Array<AVQueueItem>, callback: AsyncCallback<void>): void;
117061847f8eSopenharmony_ci
117161847f8eSopenharmony_ci    /**
117261847f8eSopenharmony_ci     * Set the playlist of queueItem. Identifies the content of the playlist presented by this session.
117361847f8eSopenharmony_ci     * @param { Array<AVQueueItem> } items - An array of the AVQueueItem
117461847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
117561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
117661847f8eSopenharmony_ci     * 2.Parameter verification failed.
117761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
117861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
117961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
118061847f8eSopenharmony_ci     * @since 10
118161847f8eSopenharmony_ci     */
118261847f8eSopenharmony_ci    /**
118361847f8eSopenharmony_ci     * Set the playlist of queueItem. Identifies the content of the playlist presented by this session.
118461847f8eSopenharmony_ci     * @param { Array<AVQueueItem> } items - An array of the AVQueueItem
118561847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
118661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
118761847f8eSopenharmony_ci     * 2.Parameter verification failed.
118861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
118961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
119061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
119161847f8eSopenharmony_ci     * @atomicservice
119261847f8eSopenharmony_ci     * @since 12
119361847f8eSopenharmony_ci     */
119461847f8eSopenharmony_ci    setAVQueueItems(items: Array<AVQueueItem>): Promise<void>;
119561847f8eSopenharmony_ci
119661847f8eSopenharmony_ci    /**
119761847f8eSopenharmony_ci     * Set the name of the playlist presented by this session.
119861847f8eSopenharmony_ci     * @param { string } title - The name of the playlist
119961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully.
120061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
120161847f8eSopenharmony_ci     * 2.Parameter verification failed.
120261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
120361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
120461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
120561847f8eSopenharmony_ci     * @since 10
120661847f8eSopenharmony_ci     */
120761847f8eSopenharmony_ci    setAVQueueTitle(title: string, callback: AsyncCallback<void>): void;
120861847f8eSopenharmony_ci
120961847f8eSopenharmony_ci    /**
121061847f8eSopenharmony_ci     * Set the name of the playlist presented by this session.
121161847f8eSopenharmony_ci     * @param { string } title - The name of the playlist
121261847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
121361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
121461847f8eSopenharmony_ci     * 2.Parameter verification failed.
121561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
121661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
121761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
121861847f8eSopenharmony_ci     * @since 10
121961847f8eSopenharmony_ci     */
122061847f8eSopenharmony_ci    /**
122161847f8eSopenharmony_ci     * Set the name of the playlist presented by this session.
122261847f8eSopenharmony_ci     * @param { string } title - The name of the playlist
122361847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
122461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
122561847f8eSopenharmony_ci     * 2.Parameter verification failed.
122661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
122761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
122861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
122961847f8eSopenharmony_ci     * @atomicservice
123061847f8eSopenharmony_ci     * @since 12
123161847f8eSopenharmony_ci     */
123261847f8eSopenharmony_ci    setAVQueueTitle(title: string): Promise<void>;
123361847f8eSopenharmony_ci
123461847f8eSopenharmony_ci    /**
123561847f8eSopenharmony_ci     * Set the custom media packets for this session.
123661847f8eSopenharmony_ci     * @param { object } extras - The custom media packets
123761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully.
123861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
123961847f8eSopenharmony_ci     * 2.Parameter verification failed.
124061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
124161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
124261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
124361847f8eSopenharmony_ci     * @since 10
124461847f8eSopenharmony_ci     */
124561847f8eSopenharmony_ci    setExtras(extras: {[key: string]: Object}, callback: AsyncCallback<void>): void;
124661847f8eSopenharmony_ci
124761847f8eSopenharmony_ci    /**
124861847f8eSopenharmony_ci     * Set the custom media packets for this session.
124961847f8eSopenharmony_ci     * @param { object } extras - The custom media packets
125061847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
125161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
125261847f8eSopenharmony_ci     * 2.Parameter verification failed.
125361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
125461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
125561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
125661847f8eSopenharmony_ci     * @since 10
125761847f8eSopenharmony_ci     */
125861847f8eSopenharmony_ci    /**
125961847f8eSopenharmony_ci     * Set the custom media packets for this session.
126061847f8eSopenharmony_ci     * @param { object } extras - The custom media packets
126161847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
126261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
126361847f8eSopenharmony_ci     * 2.Parameter verification failed.
126461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
126561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
126661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
126761847f8eSopenharmony_ci     * @atomicservice
126861847f8eSopenharmony_ci     * @since 12
126961847f8eSopenharmony_ci     */
127061847f8eSopenharmony_ci    setExtras(extras: {[key: string]: Object}): Promise<void>;
127161847f8eSopenharmony_ci
127261847f8eSopenharmony_ci    /**
127361847f8eSopenharmony_ci     * Get the current session's own controller
127461847f8eSopenharmony_ci     * @param { AsyncCallback<AVSessionController> } callback - async callback for the AVSessionController.
127561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
127661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
127761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
127861847f8eSopenharmony_ci     * @since 10
127961847f8eSopenharmony_ci     */
128061847f8eSopenharmony_ci    getController(callback: AsyncCallback<AVSessionController>): void;
128161847f8eSopenharmony_ci
128261847f8eSopenharmony_ci    /**
128361847f8eSopenharmony_ci     * Get the current session's own controller
128461847f8eSopenharmony_ci     * @returns { Promise<AVSessionController> } Promise for the AVSessionController
128561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
128661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
128761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
128861847f8eSopenharmony_ci     * @since 10
128961847f8eSopenharmony_ci     */
129061847f8eSopenharmony_ci    /**
129161847f8eSopenharmony_ci     * Get the current session's own controller
129261847f8eSopenharmony_ci     * @returns { Promise<AVSessionController> } Promise for the AVSessionController
129361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
129461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
129561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
129661847f8eSopenharmony_ci     * @atomicservice
129761847f8eSopenharmony_ci     * @since 12
129861847f8eSopenharmony_ci     */
129961847f8eSopenharmony_ci    getController(): Promise<AVSessionController>;
130061847f8eSopenharmony_ci
130161847f8eSopenharmony_ci    /**
130261847f8eSopenharmony_ci     * Get the cast controller when the session is casted to remote device.
130361847f8eSopenharmony_ci     * If the avsession is not under casting state, the controller will return null.
130461847f8eSopenharmony_ci     * @param { AsyncCallback<AVCastController> } callback - async callback for the AVCastController.
130561847f8eSopenharmony_ci     * @throws {BusinessError} 6600102 - The session does not exist
130661847f8eSopenharmony_ci     * @throws {BusinessError} 6600109 - The remote connection is not established
130761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
130861847f8eSopenharmony_ci     * @since 10
130961847f8eSopenharmony_ci     */
131061847f8eSopenharmony_ci    getAVCastController(callback: AsyncCallback<AVCastController>): void;
131161847f8eSopenharmony_ci
131261847f8eSopenharmony_ci    /**
131361847f8eSopenharmony_ci     * Get the cast controller when the session is casted to remote device.
131461847f8eSopenharmony_ci     * If the avsession is not under casting state, the controller will return null.
131561847f8eSopenharmony_ci     * @returns { Promise<AVCastController> } Promise for the AVCastController
131661847f8eSopenharmony_ci     * @throws {BusinessError} 6600102 - The session does not exist
131761847f8eSopenharmony_ci     * @throws {BusinessError} 6600109 - The remote connection is not established
131861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
131961847f8eSopenharmony_ci     * @since 10
132061847f8eSopenharmony_ci     */
132161847f8eSopenharmony_ci    /**
132261847f8eSopenharmony_ci     * Get the cast controller when the session is casted to remote device.
132361847f8eSopenharmony_ci     * If the avsession is not under casting state, the controller will return null.
132461847f8eSopenharmony_ci     * @returns { Promise<AVCastController> } Promise for the AVCastController
132561847f8eSopenharmony_ci     * @throws {BusinessError} 6600102 - The session does not exist
132661847f8eSopenharmony_ci     * @throws {BusinessError} 6600109 - The remote connection is not established
132761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
132861847f8eSopenharmony_ci     * @atomicservice
132961847f8eSopenharmony_ci     * @since 12
133061847f8eSopenharmony_ci     */
133161847f8eSopenharmony_ci    getAVCastController(): Promise<AVCastController>;
133261847f8eSopenharmony_ci
133361847f8eSopenharmony_ci    /**
133461847f8eSopenharmony_ci     * Get output device information
133561847f8eSopenharmony_ci     * @param { AsyncCallback<OutputDeviceInfo> } callback - async callback for the OutputDeviceInfo.
133661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
133761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
133861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
133961847f8eSopenharmony_ci     * @since 10
134061847f8eSopenharmony_ci     */
134161847f8eSopenharmony_ci    getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void;
134261847f8eSopenharmony_ci
134361847f8eSopenharmony_ci    /**
134461847f8eSopenharmony_ci     * Get output device information
134561847f8eSopenharmony_ci     * @returns { Promise<OutputDeviceInfo> } Promise for the OutputDeviceInfo
134661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
134761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
134861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
134961847f8eSopenharmony_ci     * @since 10
135061847f8eSopenharmony_ci     */
135161847f8eSopenharmony_ci    /**
135261847f8eSopenharmony_ci     * Get output device information
135361847f8eSopenharmony_ci     * @returns { Promise<OutputDeviceInfo> } Promise for the OutputDeviceInfo
135461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
135561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
135661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
135761847f8eSopenharmony_ci     * @atomicservice
135861847f8eSopenharmony_ci     * @since 12
135961847f8eSopenharmony_ci     */
136061847f8eSopenharmony_ci    getOutputDevice(): Promise<OutputDeviceInfo>;
136161847f8eSopenharmony_ci
136261847f8eSopenharmony_ci    /**
136361847f8eSopenharmony_ci     * Get output device information
136461847f8eSopenharmony_ci     * @returns { OutputDeviceInfo } the OutputDeviceInfo
136561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
136661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
136761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
136861847f8eSopenharmony_ci     * @since 10
136961847f8eSopenharmony_ci     */
137061847f8eSopenharmony_ci    /**
137161847f8eSopenharmony_ci     * Get output device information
137261847f8eSopenharmony_ci     * @returns { OutputDeviceInfo } the OutputDeviceInfo
137361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
137461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
137561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
137661847f8eSopenharmony_ci     * @atomicservice
137761847f8eSopenharmony_ci     * @since 12
137861847f8eSopenharmony_ci     */
137961847f8eSopenharmony_ci    getOutputDeviceSync(): OutputDeviceInfo;
138061847f8eSopenharmony_ci
138161847f8eSopenharmony_ci    /**
138261847f8eSopenharmony_ci     * Get all the current virtual display information for extended display.
138361847f8eSopenharmony_ci     * @returns { Promise<Array<CastDisplayInfo>> } Promise for the CastDisplayInfo
138461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
138561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
138661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
138761847f8eSopenharmony_ci     * @atomicservice
138861847f8eSopenharmony_ci     * @since 12
138961847f8eSopenharmony_ci     */
139061847f8eSopenharmony_ci    getAllCastDisplays(): Promise<Array<CastDisplayInfo>>;
139161847f8eSopenharmony_ci
139261847f8eSopenharmony_ci    /**
139361847f8eSopenharmony_ci     * Register play command callback.
139461847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
139561847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
139661847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
139761847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
139861847f8eSopenharmony_ci     * and the new callback will replace the previous one.
139961847f8eSopenharmony_ci     * @param { 'play' } type - Command to register 'play'.
140061847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('play') command
140161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
140261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
140361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
140461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
140561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
140661847f8eSopenharmony_ci     * @since 10
140761847f8eSopenharmony_ci     */
140861847f8eSopenharmony_ci    /**
140961847f8eSopenharmony_ci     * Register play command callback.
141061847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
141161847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
141261847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
141361847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
141461847f8eSopenharmony_ci     * and the new callback will replace the previous one.
141561847f8eSopenharmony_ci     * @param { 'play' } type - Command to register 'play'.
141661847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('play') command
141761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
141861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
141961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
142061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
142161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
142261847f8eSopenharmony_ci     * @atomicservice
142361847f8eSopenharmony_ci     * @since 12
142461847f8eSopenharmony_ci     */
142561847f8eSopenharmony_ci    on(type: 'play', callback: () => void): void;
142661847f8eSopenharmony_ci
142761847f8eSopenharmony_ci    /**
142861847f8eSopenharmony_ci     * Register pause command callback.
142961847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
143061847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
143161847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
143261847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
143361847f8eSopenharmony_ci     * and the new callback will replace the previous one.
143461847f8eSopenharmony_ci     * @param { 'pause' } type - Command to register 'pause'.
143561847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('pause') command
143661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
143761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
143861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
143961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
144061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
144161847f8eSopenharmony_ci     * @since 10
144261847f8eSopenharmony_ci     */
144361847f8eSopenharmony_ci    /**
144461847f8eSopenharmony_ci     * Register pause command callback.
144561847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
144661847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
144761847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
144861847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
144961847f8eSopenharmony_ci     * and the new callback will replace the previous one.
145061847f8eSopenharmony_ci     * @param { 'pause' } type - Command to register 'pause'.
145161847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('pause') command
145261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
145361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
145461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
145561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
145661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
145761847f8eSopenharmony_ci     * @atomicservice
145861847f8eSopenharmony_ci     * @since 12
145961847f8eSopenharmony_ci     */
146061847f8eSopenharmony_ci    on(type: 'pause', callback: () => void): void;
146161847f8eSopenharmony_ci
146261847f8eSopenharmony_ci    /**
146361847f8eSopenharmony_ci     * Register stop command callback.
146461847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
146561847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
146661847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
146761847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
146861847f8eSopenharmony_ci     * and the new callback will replace the previous one.
146961847f8eSopenharmony_ci     * @param { 'stop' } type - Command to register 'stop'.
147061847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('stop') command
147161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
147261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
147361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
147461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
147561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
147661847f8eSopenharmony_ci     * @since 10
147761847f8eSopenharmony_ci     */
147861847f8eSopenharmony_ci    /**
147961847f8eSopenharmony_ci     * Register stop command callback.
148061847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
148161847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
148261847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
148361847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
148461847f8eSopenharmony_ci     * and the new callback will replace the previous one.
148561847f8eSopenharmony_ci     * @param { 'stop' } type - Command to register 'stop'.
148661847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('stop') command
148761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
148861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
148961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
149061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
149161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
149261847f8eSopenharmony_ci     * @atomicservice
149361847f8eSopenharmony_ci     * @since 12
149461847f8eSopenharmony_ci     */
149561847f8eSopenharmony_ci    on(type: 'stop', callback: () => void): void;
149661847f8eSopenharmony_ci
149761847f8eSopenharmony_ci    /**
149861847f8eSopenharmony_ci     * Register playNext command callback.
149961847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
150061847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
150161847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
150261847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
150361847f8eSopenharmony_ci     * and the new callback will replace the previous one.
150461847f8eSopenharmony_ci     * @param { 'playNext' } type - Command to register 'playNext'.
150561847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playNext') command
150661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
150761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
150861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
150961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
151061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
151161847f8eSopenharmony_ci     * @since 10
151261847f8eSopenharmony_ci     */
151361847f8eSopenharmony_ci    /**
151461847f8eSopenharmony_ci     * Register playNext command callback.
151561847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
151661847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
151761847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
151861847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
151961847f8eSopenharmony_ci     * and the new callback will replace the previous one.
152061847f8eSopenharmony_ci     * @param { 'playNext' } type - Command to register 'playNext'.
152161847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playNext') command
152261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
152361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
152461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
152561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
152661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
152761847f8eSopenharmony_ci     * @atomicservice
152861847f8eSopenharmony_ci     * @since 12
152961847f8eSopenharmony_ci     */
153061847f8eSopenharmony_ci    on(type: 'playNext', callback: () => void): void;
153161847f8eSopenharmony_ci
153261847f8eSopenharmony_ci    /**
153361847f8eSopenharmony_ci     * Register playPrevious command callback.
153461847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
153561847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
153661847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
153761847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
153861847f8eSopenharmony_ci     * and the new callback will replace the previous one.
153961847f8eSopenharmony_ci     * @param { 'playPrevious' } type - Command to register 'playPrevious'.
154061847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playPrevious') command
154161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
154261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
154361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
154461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
154561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
154661847f8eSopenharmony_ci     * @since 10
154761847f8eSopenharmony_ci     */
154861847f8eSopenharmony_ci    /**
154961847f8eSopenharmony_ci     * Register playPrevious command callback.
155061847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
155161847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
155261847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
155361847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
155461847f8eSopenharmony_ci     * and the new callback will replace the previous one.
155561847f8eSopenharmony_ci     * @param { 'playPrevious' } type - Command to register 'playPrevious'.
155661847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playPrevious') command
155761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
155861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
155961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
156061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
156161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
156261847f8eSopenharmony_ci     * @atomicservice
156361847f8eSopenharmony_ci     * @since 12
156461847f8eSopenharmony_ci     */
156561847f8eSopenharmony_ci    on(type: 'playPrevious', callback: () => void): void;
156661847f8eSopenharmony_ci
156761847f8eSopenharmony_ci    /**
156861847f8eSopenharmony_ci     * Register fastForward command callback.
156961847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
157061847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
157161847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
157261847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
157361847f8eSopenharmony_ci     * and the new callback will replace the previous one.
157461847f8eSopenharmony_ci     * @param { 'fastForward' } type - Command to register 'fastForward'.
157561847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('fastForward') command
157661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
157761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
157861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
157961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
158061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
158161847f8eSopenharmony_ci     * @since 10
158261847f8eSopenharmony_ci     */
158361847f8eSopenharmony_ci    /**
158461847f8eSopenharmony_ci     * Register fastForward command callback.
158561847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
158661847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
158761847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
158861847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
158961847f8eSopenharmony_ci     * and the new callback will replace the previous one.
159061847f8eSopenharmony_ci     * @param { 'fastForward' } type - Command to register 'fastForward'.
159161847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('fastForward') command
159261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
159361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
159461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
159561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
159661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
159761847f8eSopenharmony_ci     * @atomicservice
159861847f8eSopenharmony_ci     * @since 12
159961847f8eSopenharmony_ci     */
160061847f8eSopenharmony_ci    on(type: 'fastForward', callback: (time ?: number) => void): void;
160161847f8eSopenharmony_ci
160261847f8eSopenharmony_ci    /**
160361847f8eSopenharmony_ci     * Register rewind command callback.
160461847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
160561847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
160661847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
160761847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
160861847f8eSopenharmony_ci     * and the new callback will replace the previous one.
160961847f8eSopenharmony_ci     * @param { 'rewind' } type - Command to register 'rewind'.
161061847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('rewind') command
161161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
161261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
161361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
161461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
161561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
161661847f8eSopenharmony_ci     * @since 10
161761847f8eSopenharmony_ci     */
161861847f8eSopenharmony_ci    /**
161961847f8eSopenharmony_ci     * Register rewind command callback.
162061847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
162161847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
162261847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
162361847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
162461847f8eSopenharmony_ci     * and the new callback will replace the previous one.
162561847f8eSopenharmony_ci     * @param { 'rewind' } type - Command to register 'rewind'.
162661847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('rewind') command
162761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
162861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
162961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
163061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
163161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
163261847f8eSopenharmony_ci     * @atomicservice
163361847f8eSopenharmony_ci     * @since 12
163461847f8eSopenharmony_ci     */
163561847f8eSopenharmony_ci    on(type: 'rewind', callback: (time ?: number) => void): void;
163661847f8eSopenharmony_ci
163761847f8eSopenharmony_ci    /**
163861847f8eSopenharmony_ci     * Unregister play command callback.
163961847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
164061847f8eSopenharmony_ci     * @param { 'play' } type - Command to register 'play'.
164161847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('play') command
164261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
164361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
164461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
164561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
164661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
164761847f8eSopenharmony_ci     * @since 10
164861847f8eSopenharmony_ci     */
164961847f8eSopenharmony_ci    /**
165061847f8eSopenharmony_ci     * Unregister play command callback.
165161847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
165261847f8eSopenharmony_ci     * @param { 'play' } type - Command to register 'play'.
165361847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('play') command
165461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
165561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
165661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
165761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
165861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
165961847f8eSopenharmony_ci     * @atomicservice
166061847f8eSopenharmony_ci     * @since 12
166161847f8eSopenharmony_ci     */
166261847f8eSopenharmony_ci    off(type: 'play', callback?: () => void): void;
166361847f8eSopenharmony_ci
166461847f8eSopenharmony_ci    /**
166561847f8eSopenharmony_ci     * Unregister pause command callback.
166661847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
166761847f8eSopenharmony_ci     * @param { 'pause' } type - Command to register 'pause'.
166861847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('pause') command
166961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
167061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
167161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
167261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
167361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
167461847f8eSopenharmony_ci     * @since 10
167561847f8eSopenharmony_ci     */
167661847f8eSopenharmony_ci    /**
167761847f8eSopenharmony_ci     * Unregister pause command callback.
167861847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
167961847f8eSopenharmony_ci     * @param { 'pause' } type - Command to register 'pause'.
168061847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('pause') command
168161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
168261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
168361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
168461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
168561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
168661847f8eSopenharmony_ci     * @atomicservice
168761847f8eSopenharmony_ci     * @since 12
168861847f8eSopenharmony_ci     */
168961847f8eSopenharmony_ci    off(type: 'pause', callback?: () => void): void;
169061847f8eSopenharmony_ci
169161847f8eSopenharmony_ci    /**
169261847f8eSopenharmony_ci     * Unregister stop command callback.
169361847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
169461847f8eSopenharmony_ci     * @param { 'stop' } type - Command to register 'stop'.
169561847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('stop') command
169661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
169761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
169861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
169961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
170061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
170161847f8eSopenharmony_ci     * @since 10
170261847f8eSopenharmony_ci     */
170361847f8eSopenharmony_ci    /**
170461847f8eSopenharmony_ci     * Unregister stop command callback.
170561847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
170661847f8eSopenharmony_ci     * @param { 'stop' } type - Command to register 'stop'.
170761847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('stop') command
170861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
170961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
171061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
171161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
171261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
171361847f8eSopenharmony_ci     * @atomicservice
171461847f8eSopenharmony_ci     * @since 12
171561847f8eSopenharmony_ci     */
171661847f8eSopenharmony_ci    off(type: 'stop', callback?: () => void): void;
171761847f8eSopenharmony_ci
171861847f8eSopenharmony_ci    /**
171961847f8eSopenharmony_ci     * Unregister playNext command callback.
172061847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
172161847f8eSopenharmony_ci     * @param { 'playNext' } type - Command to register 'playNext'.
172261847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playNext') command
172361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
172461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
172561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
172661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
172761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
172861847f8eSopenharmony_ci     * @since 10
172961847f8eSopenharmony_ci     */
173061847f8eSopenharmony_ci    /**
173161847f8eSopenharmony_ci     * Unregister playNext command callback.
173261847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
173361847f8eSopenharmony_ci     * @param { 'playNext' } type - Command to register 'playNext'.
173461847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playNext') command
173561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
173661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
173761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
173861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
173961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
174061847f8eSopenharmony_ci     * @atomicservice
174161847f8eSopenharmony_ci     * @since 12
174261847f8eSopenharmony_ci     */
174361847f8eSopenharmony_ci    off(type: 'playNext', callback?: () => void): void;
174461847f8eSopenharmony_ci
174561847f8eSopenharmony_ci    /**
174661847f8eSopenharmony_ci     * Unregister playPrevious command callback.
174761847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
174861847f8eSopenharmony_ci     * @param { 'playPrevious' } type - Command to register 'playPrevious'.
174961847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playPrevious') command
175061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
175161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
175261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
175361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
175461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
175561847f8eSopenharmony_ci     * @since 10
175661847f8eSopenharmony_ci     */
175761847f8eSopenharmony_ci    /**
175861847f8eSopenharmony_ci     * Unregister playPrevious command callback.
175961847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
176061847f8eSopenharmony_ci     * @param { 'playPrevious' } type - Command to register 'playPrevious'.
176161847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playPrevious') command
176261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
176361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
176461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
176561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
176661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
176761847f8eSopenharmony_ci     * @atomicservice
176861847f8eSopenharmony_ci     * @since 12
176961847f8eSopenharmony_ci     */
177061847f8eSopenharmony_ci    off(type: 'playPrevious', callback?: () => void): void;
177161847f8eSopenharmony_ci
177261847f8eSopenharmony_ci    /**
177361847f8eSopenharmony_ci     * Unregister fastForward command callback.
177461847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
177561847f8eSopenharmony_ci     * @param { 'fastForward' } type - Command to register 'fastForward'.
177661847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('fastForward') command
177761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
177861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
177961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
178061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
178161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
178261847f8eSopenharmony_ci     * @since 10
178361847f8eSopenharmony_ci     */
178461847f8eSopenharmony_ci    /**
178561847f8eSopenharmony_ci     * Unregister fastForward command callback.
178661847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
178761847f8eSopenharmony_ci     * @param { 'fastForward' } type - Command to register 'fastForward'.
178861847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('fastForward') command
178961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
179061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
179161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
179261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
179361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
179461847f8eSopenharmony_ci     * @atomicservice
179561847f8eSopenharmony_ci     * @since 12
179661847f8eSopenharmony_ci     */
179761847f8eSopenharmony_ci    off(type: 'fastForward', callback?: () => void): void;
179861847f8eSopenharmony_ci
179961847f8eSopenharmony_ci    /**
180061847f8eSopenharmony_ci     * Unregister rewind command callback.
180161847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
180261847f8eSopenharmony_ci     * @param { 'rewind' } type - Command to register 'rewind'.
180361847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('rewind') command
180461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
180561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
180661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
180761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
180861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
180961847f8eSopenharmony_ci     * @since 10
181061847f8eSopenharmony_ci     */
181161847f8eSopenharmony_ci    /**
181261847f8eSopenharmony_ci     * Unregister rewind command callback.
181361847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
181461847f8eSopenharmony_ci     * @param { 'rewind' } type - Command to register 'rewind'.
181561847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('rewind') command
181661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
181761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
181861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
181961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
182061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
182161847f8eSopenharmony_ci     * @atomicservice
182261847f8eSopenharmony_ci     * @since 12
182361847f8eSopenharmony_ci     */
182461847f8eSopenharmony_ci    off(type: 'rewind', callback?: () => void): void;
182561847f8eSopenharmony_ci
182661847f8eSopenharmony_ci    /**
182761847f8eSopenharmony_ci     * Register playFromAssetId command callback.
182861847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
182961847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
183061847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
183161847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
183261847f8eSopenharmony_ci     * and the new callback will replace the previous one.
183361847f8eSopenharmony_ci     * @param { 'playFromAssetId' } type - Command to register 'playFromAssetId'.
183461847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playFromAssetId') command
183561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
183661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
183761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
183861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
183961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
184061847f8eSopenharmony_ci     * @since 11
184161847f8eSopenharmony_ci     */
184261847f8eSopenharmony_ci    /**
184361847f8eSopenharmony_ci     * Register playFromAssetId command callback.
184461847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
184561847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
184661847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
184761847f8eSopenharmony_ci     * Each playback command only supports registering one callback,
184861847f8eSopenharmony_ci     * and the new callback will replace the previous one.
184961847f8eSopenharmony_ci     * @param { 'playFromAssetId' } type - Command to register 'playFromAssetId'.
185061847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playFromAssetId') command
185161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
185261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
185361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
185461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
185561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
185661847f8eSopenharmony_ci     * @atomicservice
185761847f8eSopenharmony_ci     * @since 12
185861847f8eSopenharmony_ci     */
185961847f8eSopenharmony_ci    on(type: 'playFromAssetId', callback: (assetId: number) => void): void;
186061847f8eSopenharmony_ci
186161847f8eSopenharmony_ci    /**
186261847f8eSopenharmony_ci     * Unregister playFromAssetId command callback.
186361847f8eSopenharmony_ci     * @param { 'playFromAssetId' } type - Command to register 'playFromAssetId'.
186461847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playFromAssetId') command
186561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
186661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
186761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
186861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
186961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
187061847f8eSopenharmony_ci     * @since 11
187161847f8eSopenharmony_ci     */
187261847f8eSopenharmony_ci    /**
187361847f8eSopenharmony_ci     * Unregister playFromAssetId command callback.
187461847f8eSopenharmony_ci     * @param { 'playFromAssetId' } type - Command to register 'playFromAssetId'.
187561847f8eSopenharmony_ci     * @param { function } callback - Used to handle ('playFromAssetId') command
187661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
187761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
187861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
187961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
188061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
188161847f8eSopenharmony_ci     * @atomicservice
188261847f8eSopenharmony_ci     * @since 12
188361847f8eSopenharmony_ci     */
188461847f8eSopenharmony_ci    off(type: 'playFromAssetId', callback?: (assetId: number) => void): void;
188561847f8eSopenharmony_ci
188661847f8eSopenharmony_ci    /**
188761847f8eSopenharmony_ci     * Register seek command callback
188861847f8eSopenharmony_ci     * @param { 'seek' } type - Registration Type 'seek'
188961847f8eSopenharmony_ci     * @param { function } callback - Used to handle seek command.The callback provides the seek time(ms)
189061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
189161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
189261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
189361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
189461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
189561847f8eSopenharmony_ci     * @since 10
189661847f8eSopenharmony_ci     */
189761847f8eSopenharmony_ci    /**
189861847f8eSopenharmony_ci     * Register seek command callback
189961847f8eSopenharmony_ci     * @param { 'seek' } type - Registration Type 'seek'
190061847f8eSopenharmony_ci     * @param { function } callback - Used to handle seek command.The callback provides the seek time(ms)
190161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
190261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
190361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
190461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
190561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
190661847f8eSopenharmony_ci     * @atomicservice
190761847f8eSopenharmony_ci     * @since 12
190861847f8eSopenharmony_ci     */
190961847f8eSopenharmony_ci    on(type: 'seek', callback: (time: number) => void): void;
191061847f8eSopenharmony_ci
191161847f8eSopenharmony_ci    /**
191261847f8eSopenharmony_ci     * Unregister seek command callback
191361847f8eSopenharmony_ci     * @param { 'seek' } type - Registration Type 'seek'
191461847f8eSopenharmony_ci     * @param { function } callback - Used to handle seek command.The callback provides the seek time(ms)
191561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
191661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
191761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
191861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
191961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
192061847f8eSopenharmony_ci     * @since 10
192161847f8eSopenharmony_ci     */
192261847f8eSopenharmony_ci    /**
192361847f8eSopenharmony_ci     * Unregister seek command callback
192461847f8eSopenharmony_ci     * @param { 'seek' } type - Registration Type 'seek'
192561847f8eSopenharmony_ci     * @param { function } callback - Used to handle seek command.The callback provides the seek time(ms)
192661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
192761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
192861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
192961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
193061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
193161847f8eSopenharmony_ci     * @atomicservice
193261847f8eSopenharmony_ci     * @since 12
193361847f8eSopenharmony_ci     */
193461847f8eSopenharmony_ci    off(type: 'seek', callback?: (time: number) => void): void;
193561847f8eSopenharmony_ci
193661847f8eSopenharmony_ci    /**
193761847f8eSopenharmony_ci     * Register setSpeed command callback
193861847f8eSopenharmony_ci     * @param { 'setSpeed' } type - Registration Type 'setSpeed'
193961847f8eSopenharmony_ci     * @param { function } callback - Used to handle setSpeed command.The callback provides the speed value
194061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
194161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
194261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
194361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
194461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
194561847f8eSopenharmony_ci     * @since 10
194661847f8eSopenharmony_ci     */
194761847f8eSopenharmony_ci    /**
194861847f8eSopenharmony_ci     * Register setSpeed command callback
194961847f8eSopenharmony_ci     * @param { 'setSpeed' } type - Registration Type 'setSpeed'
195061847f8eSopenharmony_ci     * @param { function } callback - Used to handle setSpeed command.The callback provides the speed value
195161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
195261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
195361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
195461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
195561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
195661847f8eSopenharmony_ci     * @atomicservice
195761847f8eSopenharmony_ci     * @since 12
195861847f8eSopenharmony_ci     */
195961847f8eSopenharmony_ci    on(type: 'setSpeed', callback: (speed: number) => void): void;
196061847f8eSopenharmony_ci
196161847f8eSopenharmony_ci    /**
196261847f8eSopenharmony_ci     * Unregister setSpeed command callback
196361847f8eSopenharmony_ci     * @param { 'setSpeed' } type - Registration Type 'setSpeed'
196461847f8eSopenharmony_ci     * @param { function } callback - Used to handle setSpeed command.The callback provides the speed value
196561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
196661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
196761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
196861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
196961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
197061847f8eSopenharmony_ci     * @since 10
197161847f8eSopenharmony_ci     */
197261847f8eSopenharmony_ci    /**
197361847f8eSopenharmony_ci     * Unregister setSpeed command callback
197461847f8eSopenharmony_ci     * @param { 'setSpeed' } type - Registration Type 'setSpeed'
197561847f8eSopenharmony_ci     * @param { function } callback - Used to handle setSpeed command.The callback provides the speed value
197661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
197761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
197861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
197961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
198061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
198161847f8eSopenharmony_ci     * @atomicservice
198261847f8eSopenharmony_ci     * @since 12
198361847f8eSopenharmony_ci     */
198461847f8eSopenharmony_ci    off(type: 'setSpeed', callback?: (speed: number) => void): void;
198561847f8eSopenharmony_ci
198661847f8eSopenharmony_ci    /**
198761847f8eSopenharmony_ci     * Register setLoopMode command callback
198861847f8eSopenharmony_ci     * @param { 'setLoopMode' } type - Registration Type 'setLoopMode'
198961847f8eSopenharmony_ci     * @param { function } callback - Used to handle setLoopMode command.The callback provides the {@link LoopMode}
199061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
199161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
199261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
199361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
199461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
199561847f8eSopenharmony_ci     * @since 10
199661847f8eSopenharmony_ci     */
199761847f8eSopenharmony_ci    /**
199861847f8eSopenharmony_ci     * Register setLoopMode command callback
199961847f8eSopenharmony_ci     * @param { 'setLoopMode' } type - Registration Type 'setLoopMode'
200061847f8eSopenharmony_ci     * @param { function } callback - Used to handle setLoopMode command.The callback provides the {@link LoopMode}
200161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
200261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
200361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
200461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
200561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
200661847f8eSopenharmony_ci     * @atomicservice
200761847f8eSopenharmony_ci     * @since 12
200861847f8eSopenharmony_ci     */
200961847f8eSopenharmony_ci    on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void;
201061847f8eSopenharmony_ci
201161847f8eSopenharmony_ci    /**
201261847f8eSopenharmony_ci     * Unregister setLoopMode command callback
201361847f8eSopenharmony_ci     * @param { 'setLoopMode' } type - Registration Type 'setLoopMode'
201461847f8eSopenharmony_ci     * @param { function } callback - Used to handle setLoopMode command.The callback provides the {@link LoopMode}
201561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
201661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
201761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
201861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
201961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
202061847f8eSopenharmony_ci     * @since 10
202161847f8eSopenharmony_ci     */
202261847f8eSopenharmony_ci    /**
202361847f8eSopenharmony_ci     * Unregister setLoopMode command callback
202461847f8eSopenharmony_ci     * @param { 'setLoopMode' } type - Registration Type 'setLoopMode'
202561847f8eSopenharmony_ci     * @param { function } callback - Used to handle setLoopMode command.The callback provides the {@link LoopMode}
202661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
202761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
202861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
202961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
203061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
203161847f8eSopenharmony_ci     * @atomicservice
203261847f8eSopenharmony_ci     * @since 12
203361847f8eSopenharmony_ci     */
203461847f8eSopenharmony_ci    off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void;
203561847f8eSopenharmony_ci
203661847f8eSopenharmony_ci    /**
203761847f8eSopenharmony_ci     * Register toggle favorite command callback
203861847f8eSopenharmony_ci     * @param { 'toggleFavorite' } type - Registration Type 'toggleFavorite'
203961847f8eSopenharmony_ci     * @param { function } callback - Used to handle toggleFavorite command.The callback provides
204061847f8eSopenharmony_ci     * the assetId for which the favorite status needs to be switched.
204161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
204261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
204361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
204461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
204561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
204661847f8eSopenharmony_ci     * @since 10
204761847f8eSopenharmony_ci     */
204861847f8eSopenharmony_ci    /**
204961847f8eSopenharmony_ci     * Register toggle favorite command callback
205061847f8eSopenharmony_ci     * @param { 'toggleFavorite' } type - Registration Type 'toggleFavorite'
205161847f8eSopenharmony_ci     * @param { function } callback - Used to handle toggleFavorite command.The callback provides
205261847f8eSopenharmony_ci     * the assetId for which the favorite status needs to be switched.
205361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
205461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
205561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
205661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
205761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
205861847f8eSopenharmony_ci     * @atomicservice
205961847f8eSopenharmony_ci     * @since 12
206061847f8eSopenharmony_ci     */
206161847f8eSopenharmony_ci    on(type: 'toggleFavorite', callback: (assetId: string) => void): void;
206261847f8eSopenharmony_ci
206361847f8eSopenharmony_ci    /**
206461847f8eSopenharmony_ci     * Unregister toggle favorite command callback
206561847f8eSopenharmony_ci     * @param { 'toggleFavorite' } type - Registration Type 'toggleFavorite'
206661847f8eSopenharmony_ci     * @param { function } callback - Used to handle toggleFavorite command.The callback provides
206761847f8eSopenharmony_ci     * the assetId for which the favorite status needs to be switched.
206861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
206961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
207061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
207161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
207261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
207361847f8eSopenharmony_ci     * @since 10
207461847f8eSopenharmony_ci     */
207561847f8eSopenharmony_ci    /**
207661847f8eSopenharmony_ci     * Unregister toggle favorite command callback
207761847f8eSopenharmony_ci     * @param { 'toggleFavorite' } type - Registration Type 'toggleFavorite'
207861847f8eSopenharmony_ci     * @param { function } callback - Used to handle toggleFavorite command.The callback provides
207961847f8eSopenharmony_ci     * the assetId for which the favorite status needs to be switched.
208061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
208161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
208261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
208361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
208461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
208561847f8eSopenharmony_ci     * @atomicservice
208661847f8eSopenharmony_ci     * @since 12
208761847f8eSopenharmony_ci     */
208861847f8eSopenharmony_ci    off(type: 'toggleFavorite', callback?: (assetId: string) => void): void;
208961847f8eSopenharmony_ci
209061847f8eSopenharmony_ci    /**
209161847f8eSopenharmony_ci     * Register media key handling callback
209261847f8eSopenharmony_ci     * @param { 'handleKeyEvent' } type - Registration Type 'handleKeyEvent'
209361847f8eSopenharmony_ci     * @param { function } callback - Used to handle key events.The callback provides the KeyEvent
209461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
209561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
209661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
209761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
209861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
209961847f8eSopenharmony_ci     * @since 10
210061847f8eSopenharmony_ci     */
210161847f8eSopenharmony_ci    /**
210261847f8eSopenharmony_ci     * Register media key handling callback
210361847f8eSopenharmony_ci     * @param { 'handleKeyEvent' } type - Registration Type 'handleKeyEvent'
210461847f8eSopenharmony_ci     * @param { function } callback - Used to handle key events.The callback provides the KeyEvent
210561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
210661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
210761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
210861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
210961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
211061847f8eSopenharmony_ci     * @atomicservice
211161847f8eSopenharmony_ci     * @since 12
211261847f8eSopenharmony_ci     */
211361847f8eSopenharmony_ci    on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void;
211461847f8eSopenharmony_ci
211561847f8eSopenharmony_ci    /**
211661847f8eSopenharmony_ci     * Unregister media key handling callback
211761847f8eSopenharmony_ci     * @param { 'handleKeyEvent' } type - Registration Type 'handleKeyEvent'
211861847f8eSopenharmony_ci     * @param { function } callback - Used to handle key events.The callback provides the KeyEvent
211961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
212061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
212161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
212261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
212361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
212461847f8eSopenharmony_ci     * @since 10
212561847f8eSopenharmony_ci     */
212661847f8eSopenharmony_ci    /**
212761847f8eSopenharmony_ci     * Unregister media key handling callback
212861847f8eSopenharmony_ci     * @param { 'handleKeyEvent' } type - Registration Type 'handleKeyEvent'
212961847f8eSopenharmony_ci     * @param { function } callback - Used to handle key events.The callback provides the KeyEvent
213061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
213161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
213261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
213361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
213461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
213561847f8eSopenharmony_ci     * @atomicservice
213661847f8eSopenharmony_ci     * @since 12
213761847f8eSopenharmony_ci     */
213861847f8eSopenharmony_ci    off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void;
213961847f8eSopenharmony_ci
214061847f8eSopenharmony_ci    /**
214161847f8eSopenharmony_ci     * Register session output device change callback
214261847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Registration Type 'outputDeviceChange'
214361847f8eSopenharmony_ci     * @param { function } callback - Used to handle output device changed.
214461847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo} and related connection state {@link ConnectionState}.
214561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
214661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
214761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
214861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist
214961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
215061847f8eSopenharmony_ci     * @since 10
215161847f8eSopenharmony_ci     */
215261847f8eSopenharmony_ci    /**
215361847f8eSopenharmony_ci     * Register session output device change callback
215461847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Registration Type 'outputDeviceChange'
215561847f8eSopenharmony_ci     * @param { function } callback - Used to handle output device changed.
215661847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo} and related connection state {@link ConnectionState}.
215761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
215861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
215961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
216061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist
216161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
216261847f8eSopenharmony_ci     * @atomicservice
216361847f8eSopenharmony_ci     * @since 12
216461847f8eSopenharmony_ci     */
216561847f8eSopenharmony_ci    on(type: 'outputDeviceChange', callback: (state: ConnectionState, device: OutputDeviceInfo) => void): void;
216661847f8eSopenharmony_ci
216761847f8eSopenharmony_ci    /**
216861847f8eSopenharmony_ci     * Unregister session output device change callback
216961847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Registration Type 'outputDeviceChange'
217061847f8eSopenharmony_ci     * @param { function } callback - Used to handle output device changed.
217161847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo} and related connection state {@link ConnectionState}.
217261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
217361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
217461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
217561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist
217661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
217761847f8eSopenharmony_ci     * @since 10
217861847f8eSopenharmony_ci     */
217961847f8eSopenharmony_ci    /**
218061847f8eSopenharmony_ci     * Unregister session output device change callback
218161847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Registration Type 'outputDeviceChange'
218261847f8eSopenharmony_ci     * @param { function } callback - Used to handle output device changed.
218361847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo} and related connection state {@link ConnectionState}.
218461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
218561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
218661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
218761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist
218861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
218961847f8eSopenharmony_ci     * @atomicservice
219061847f8eSopenharmony_ci     * @since 12
219161847f8eSopenharmony_ci     */
219261847f8eSopenharmony_ci    off(type: 'outputDeviceChange', callback?: (state: ConnectionState, device: OutputDeviceInfo) => void): void;
219361847f8eSopenharmony_ci
219461847f8eSopenharmony_ci    /**
219561847f8eSopenharmony_ci     * Register session custom command change callback
219661847f8eSopenharmony_ci     * @param { 'commonCommand' } type - Registration Type 'commonCommand'
219761847f8eSopenharmony_ci     * @param { function } callback - Used to handle event when the common command is received
219861847f8eSopenharmony_ci     * The callback provide the command name and command args
219961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
220061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
220161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
220261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
220361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
220461847f8eSopenharmony_ci     * @since 10
220561847f8eSopenharmony_ci     */
220661847f8eSopenharmony_ci    /**
220761847f8eSopenharmony_ci     * Register session custom command change callback
220861847f8eSopenharmony_ci     * @param { 'commonCommand' } type - Registration Type 'commonCommand'
220961847f8eSopenharmony_ci     * @param { function } callback - Used to handle event when the common command is received
221061847f8eSopenharmony_ci     * The callback provide the command name and command args
221161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
221261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
221361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
221461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
221561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
221661847f8eSopenharmony_ci     * @atomicservice
221761847f8eSopenharmony_ci     * @since 12
221861847f8eSopenharmony_ci     */
221961847f8eSopenharmony_ci    on(type: 'commonCommand', callback: (command: string, args: {[key: string]: Object}) => void): void;
222061847f8eSopenharmony_ci
222161847f8eSopenharmony_ci    /**
222261847f8eSopenharmony_ci     * Unregister session custom command change callback
222361847f8eSopenharmony_ci     * @param { 'commonCommand' } type - Registration Type 'commonCommand'
222461847f8eSopenharmony_ci     * @param { function } callback - Used to cancel a specific listener
222561847f8eSopenharmony_ci     * The callback provide the command name and command args
222661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
222761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
222861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
222961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
223061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
223161847f8eSopenharmony_ci     * @since 10
223261847f8eSopenharmony_ci     */
223361847f8eSopenharmony_ci    /**
223461847f8eSopenharmony_ci     * Unregister session custom command change callback
223561847f8eSopenharmony_ci     * @param { 'commonCommand' } type - Registration Type 'commonCommand'
223661847f8eSopenharmony_ci     * @param { function } callback - Used to cancel a specific listener
223761847f8eSopenharmony_ci     * The callback provide the command name and command args
223861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
223961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
224061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
224161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
224261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
224361847f8eSopenharmony_ci     * @atomicservice
224461847f8eSopenharmony_ci     * @since 12
224561847f8eSopenharmony_ci     */
224661847f8eSopenharmony_ci    off(type: 'commonCommand', callback?: (command: string, args: {[key: string]: Object}) => void): void;
224761847f8eSopenharmony_ci
224861847f8eSopenharmony_ci    /**
224961847f8eSopenharmony_ci     * Register the item to play from the playlist change callback
225061847f8eSopenharmony_ci     * @param { 'skipToQueueItem' } type - Registration Type 'skipToQueueItem'
225161847f8eSopenharmony_ci     * @param { function } callback - Used to handle the item to be played.
225261847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo}
225361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
225461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
225561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
225661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
225761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
225861847f8eSopenharmony_ci     * @since 10
225961847f8eSopenharmony_ci     */
226061847f8eSopenharmony_ci    /**
226161847f8eSopenharmony_ci     * Register the item to play from the playlist change callback
226261847f8eSopenharmony_ci     * @param { 'skipToQueueItem' } type - Registration Type 'skipToQueueItem'
226361847f8eSopenharmony_ci     * @param { function } callback - Used to handle the item to be played.
226461847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo}
226561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
226661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
226761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
226861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
226961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
227061847f8eSopenharmony_ci     * @atomicservice
227161847f8eSopenharmony_ci     * @since 12
227261847f8eSopenharmony_ci     */
227361847f8eSopenharmony_ci    on(type: 'skipToQueueItem', callback: (itemId: number) => void): void;
227461847f8eSopenharmony_ci
227561847f8eSopenharmony_ci    /**
227661847f8eSopenharmony_ci     * Unregister the item to play from the playlist change callback
227761847f8eSopenharmony_ci     * @param { 'skipToQueueItem' } type - Registration Type 'skipToQueueItem'
227861847f8eSopenharmony_ci     * @param { function } callback - Used to handle the item to be played.
227961847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo}
228061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
228161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
228261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
228361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
228461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
228561847f8eSopenharmony_ci     * @since 10
228661847f8eSopenharmony_ci     */
228761847f8eSopenharmony_ci    /**
228861847f8eSopenharmony_ci     * Unregister the item to play from the playlist change callback
228961847f8eSopenharmony_ci     * @param { 'skipToQueueItem' } type - Registration Type 'skipToQueueItem'
229061847f8eSopenharmony_ci     * @param { function } callback - Used to handle the item to be played.
229161847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo}
229261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
229361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
229461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
229561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
229661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
229761847f8eSopenharmony_ci     * @atomicservice
229861847f8eSopenharmony_ci     * @since 12
229961847f8eSopenharmony_ci     */
230061847f8eSopenharmony_ci    off(type: 'skipToQueueItem', callback?: (itemId: number) => void): void;
230161847f8eSopenharmony_ci
230261847f8eSopenharmony_ci    /**
230361847f8eSopenharmony_ci     * Register answer command callback.
230461847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
230561847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
230661847f8eSopenharmony_ci     * @param { 'answer' } type - Command to register 'answer'.
230761847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('answer') command
230861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
230961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
231061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
231161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
231261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
231361847f8eSopenharmony_ci     * @since 11
231461847f8eSopenharmony_ci     */
231561847f8eSopenharmony_ci    /**
231661847f8eSopenharmony_ci     * Register answer command callback.
231761847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
231861847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
231961847f8eSopenharmony_ci     * @param { 'answer' } type - Command to register 'answer'.
232061847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('answer') command
232161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
232261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
232361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
232461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
232561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
232661847f8eSopenharmony_ci     * @atomicservice
232761847f8eSopenharmony_ci     * @since 12
232861847f8eSopenharmony_ci     */
232961847f8eSopenharmony_ci    on(type: 'answer', callback: Callback<void>): void;
233061847f8eSopenharmony_ci
233161847f8eSopenharmony_ci    /**
233261847f8eSopenharmony_ci     * Unregister answer command callback.
233361847f8eSopenharmony_ci     * @param { 'answer' } type - Command to register 'answer'.
233461847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('answer') command
233561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
233661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
233761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
233861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
233961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
234061847f8eSopenharmony_ci     * @since 11
234161847f8eSopenharmony_ci     */
234261847f8eSopenharmony_ci    /**
234361847f8eSopenharmony_ci     * Unregister answer command callback.
234461847f8eSopenharmony_ci     * @param { 'answer' } type - Command to register 'answer'.
234561847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('answer') command
234661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
234761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
234861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
234961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
235061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
235161847f8eSopenharmony_ci     * @atomicservice
235261847f8eSopenharmony_ci     * @since 12
235361847f8eSopenharmony_ci     */
235461847f8eSopenharmony_ci    off(type: 'answer', callback?: Callback<void>): void;
235561847f8eSopenharmony_ci
235661847f8eSopenharmony_ci    /**
235761847f8eSopenharmony_ci     * Register hangUp command callback.
235861847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
235961847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
236061847f8eSopenharmony_ci     * @param { 'hangUp' } type - Command to register 'hangUp'.
236161847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('hangUp') command
236261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
236361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
236461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
236561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
236661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
236761847f8eSopenharmony_ci     * @since 11
236861847f8eSopenharmony_ci     */
236961847f8eSopenharmony_ci    /**
237061847f8eSopenharmony_ci     * Register hangUp command callback.
237161847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
237261847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
237361847f8eSopenharmony_ci     * @param { 'hangUp' } type - Command to register 'hangUp'.
237461847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('hangUp') command
237561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
237661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
237761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
237861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
237961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
238061847f8eSopenharmony_ci     * @atomicservice
238161847f8eSopenharmony_ci     * @since 12
238261847f8eSopenharmony_ci     */
238361847f8eSopenharmony_ci    on(type: 'hangUp', callback: Callback<void>): void;
238461847f8eSopenharmony_ci
238561847f8eSopenharmony_ci    /**
238661847f8eSopenharmony_ci     * Unregister hangUp command callback.
238761847f8eSopenharmony_ci     * @param { 'hangUp' } type - Command to register 'hangUp'.
238861847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('hangUp') command
238961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
239061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
239161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
239261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
239361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
239461847f8eSopenharmony_ci     * @since 11
239561847f8eSopenharmony_ci     */
239661847f8eSopenharmony_ci    /**
239761847f8eSopenharmony_ci     * Unregister hangUp command callback.
239861847f8eSopenharmony_ci     * @param { 'hangUp' } type - Command to register 'hangUp'.
239961847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('hangUp') command
240061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
240161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
240261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
240361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
240461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
240561847f8eSopenharmony_ci     * @atomicservice
240661847f8eSopenharmony_ci     * @since 12
240761847f8eSopenharmony_ci     */
240861847f8eSopenharmony_ci    off(type: 'hangUp', callback?: Callback<void>): void;
240961847f8eSopenharmony_ci
241061847f8eSopenharmony_ci    /**
241161847f8eSopenharmony_ci     * Register toggleCallMute command callback.
241261847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
241361847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
241461847f8eSopenharmony_ci     * @param { 'toggleCallMute' } type - Command to register 'toggleCallMute'.
241561847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('toggleCallMute') command
241661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
241761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
241861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
241961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
242061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
242161847f8eSopenharmony_ci     * @since 11
242261847f8eSopenharmony_ci     */
242361847f8eSopenharmony_ci    /**
242461847f8eSopenharmony_ci     * Register toggleCallMute command callback.
242561847f8eSopenharmony_ci     * As long as it is registered, it means that the ability supports this command.
242661847f8eSopenharmony_ci     * If you cancel the callback, you need to call off {@link off}
242761847f8eSopenharmony_ci     * @param { 'toggleCallMute' } type - Command to register 'toggleCallMute'.
242861847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('toggleCallMute') command
242961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
243061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
243161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
243261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
243361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
243461847f8eSopenharmony_ci     * @atomicservice
243561847f8eSopenharmony_ci     * @since 12
243661847f8eSopenharmony_ci     */
243761847f8eSopenharmony_ci    on(type: 'toggleCallMute', callback: Callback<void>): void;
243861847f8eSopenharmony_ci
243961847f8eSopenharmony_ci    /**
244061847f8eSopenharmony_ci     * Unregister toggleCallMute command callback.
244161847f8eSopenharmony_ci     * @param { 'toggleCallMute' } type - Command to register 'toggleCallMute'.
244261847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('toggleCallMute') command
244361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.2.Incorrect parameter types.
244461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
244561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
244661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
244761847f8eSopenharmony_ci     * @since 11
244861847f8eSopenharmony_ci     */
244961847f8eSopenharmony_ci    /**
245061847f8eSopenharmony_ci     * Unregister toggleCallMute command callback.
245161847f8eSopenharmony_ci     * @param { 'toggleCallMute' } type - Command to register 'toggleCallMute'.
245261847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle ('toggleCallMute') command
245361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.2.Incorrect parameter types.
245461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
245561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
245661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
245761847f8eSopenharmony_ci     * @atomicservice
245861847f8eSopenharmony_ci     * @since 12
245961847f8eSopenharmony_ci     */
246061847f8eSopenharmony_ci    off(type: 'toggleCallMute', callback?: Callback<void>): void;
246161847f8eSopenharmony_ci
246261847f8eSopenharmony_ci    /**
246361847f8eSopenharmony_ci     * Register listener for cast display information changed.
246461847f8eSopenharmony_ci     * @param { 'castDisplayChange' } type - Type of the 'castDisplayChange' to listen for.
246561847f8eSopenharmony_ci     * @param { Callback<CastDisplayInfo> } callback - Callback used to return cast display information.
246661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
246761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
246861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
246961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist
247061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
247161847f8eSopenharmony_ci     * @atomicservice
247261847f8eSopenharmony_ci     * @since 12
247361847f8eSopenharmony_ci     */
247461847f8eSopenharmony_ci    on(type: 'castDisplayChange', callback: Callback<CastDisplayInfo>): void;
247561847f8eSopenharmony_ci
247661847f8eSopenharmony_ci    /**
247761847f8eSopenharmony_ci     * Unregister listener for cast display information changed.
247861847f8eSopenharmony_ci     * @param { 'castDisplayChange' } type - Type of the 'castDisplayChange' to listen for.
247961847f8eSopenharmony_ci     * @param { Callback<CastDisplayInfo> } callback - Callback used to return cast display information.
248061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
248161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
248261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
248361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist
248461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
248561847f8eSopenharmony_ci     * @atomicservice
248661847f8eSopenharmony_ci     * @since 12
248761847f8eSopenharmony_ci     */
248861847f8eSopenharmony_ci    off(type: 'castDisplayChange', callback?: Callback<CastDisplayInfo>): void;
248961847f8eSopenharmony_ci
249061847f8eSopenharmony_ci    /**
249161847f8eSopenharmony_ci     * Stop current cast and disconnect device connection.
249261847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback A callback instance used to return when cast stopped completed.
249361847f8eSopenharmony_ci     * @throws { BusinessError } 6600109 - The remote connection is not established
249461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
249561847f8eSopenharmony_ci     * @since 10
249661847f8eSopenharmony_ci     */
249761847f8eSopenharmony_ci    stopCasting(callback: AsyncCallback<void>): void;
249861847f8eSopenharmony_ci
249961847f8eSopenharmony_ci    /**
250061847f8eSopenharmony_ci     * Stop current cast and disconnect device connection.
250161847f8eSopenharmony_ci     * @returns { Promise<void> } void result promise when executed successfully 
250261847f8eSopenharmony_ci     * @throws { BusinessError } 6600109 - The remote connection is not established
250361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
250461847f8eSopenharmony_ci     * @since 10
250561847f8eSopenharmony_ci     */
250661847f8eSopenharmony_ci    /**
250761847f8eSopenharmony_ci     * Stop current cast and disconnect device connection.
250861847f8eSopenharmony_ci     * @returns { Promise<void> } void result promise when executed successfully 
250961847f8eSopenharmony_ci     * @throws { BusinessError } 6600109 - The remote connection is not established
251061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
251161847f8eSopenharmony_ci     * @atomicservice
251261847f8eSopenharmony_ci     * @since 12
251361847f8eSopenharmony_ci     */
251461847f8eSopenharmony_ci    stopCasting(): Promise<void>;
251561847f8eSopenharmony_ci
251661847f8eSopenharmony_ci    /**
251761847f8eSopenharmony_ci     * Activate the session, indicating that the session can accept control commands
251861847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the session is activated.
251961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
252061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
252161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
252261847f8eSopenharmony_ci     * @since 10
252361847f8eSopenharmony_ci     */
252461847f8eSopenharmony_ci    activate(callback: AsyncCallback<void>): void;
252561847f8eSopenharmony_ci
252661847f8eSopenharmony_ci    /**
252761847f8eSopenharmony_ci     * Activate the session, indicating that the session can accept control commands
252861847f8eSopenharmony_ci     * @returns { Promise<void> } void result promise when executed successfully 
252961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
253061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
253161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
253261847f8eSopenharmony_ci     * @since 10
253361847f8eSopenharmony_ci     */
253461847f8eSopenharmony_ci    /**
253561847f8eSopenharmony_ci     * Activate the session, indicating that the session can accept control commands
253661847f8eSopenharmony_ci     * @returns { Promise<void> } void result promise when executed successfully 
253761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
253861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
253961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
254061847f8eSopenharmony_ci     * @atomicservice
254161847f8eSopenharmony_ci     * @since 12
254261847f8eSopenharmony_ci     */
254361847f8eSopenharmony_ci    activate(): Promise<void>;
254461847f8eSopenharmony_ci
254561847f8eSopenharmony_ci    /**
254661847f8eSopenharmony_ci     * Deactivate the session, indicating that the session not ready to accept control commands
254761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the session is deactivated.
254861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
254961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
255061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
255161847f8eSopenharmony_ci     * @since 10
255261847f8eSopenharmony_ci     */
255361847f8eSopenharmony_ci    deactivate(callback: AsyncCallback<void>): void;
255461847f8eSopenharmony_ci
255561847f8eSopenharmony_ci    /**
255661847f8eSopenharmony_ci     * Deactivate the session, indicating that the session not ready to accept control commands
255761847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
255861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
255961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
256061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
256161847f8eSopenharmony_ci     * @since 10
256261847f8eSopenharmony_ci     */
256361847f8eSopenharmony_ci    /**
256461847f8eSopenharmony_ci     * Deactivate the session, indicating that the session not ready to accept control commands
256561847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
256661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
256761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
256861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
256961847f8eSopenharmony_ci     * @atomicservice
257061847f8eSopenharmony_ci     * @since 12
257161847f8eSopenharmony_ci     */
257261847f8eSopenharmony_ci    deactivate(): Promise<void>;
257361847f8eSopenharmony_ci
257461847f8eSopenharmony_ci    /**
257561847f8eSopenharmony_ci     * Destroy this session, the server will clean up the session resources
257661847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
257761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
257861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
257961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
258061847f8eSopenharmony_ci     * @since 10
258161847f8eSopenharmony_ci     */
258261847f8eSopenharmony_ci    destroy(callback: AsyncCallback<void>): void;
258361847f8eSopenharmony_ci
258461847f8eSopenharmony_ci    /**
258561847f8eSopenharmony_ci     * Destroy this session, the server will clean up the session resources
258661847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
258761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
258861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
258961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
259061847f8eSopenharmony_ci     * @since 10
259161847f8eSopenharmony_ci     */
259261847f8eSopenharmony_ci    /**
259361847f8eSopenharmony_ci     * Destroy this session, the server will clean up the session resources
259461847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
259561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
259661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
259761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
259861847f8eSopenharmony_ci     * @atomicservice
259961847f8eSopenharmony_ci     * @since 12
260061847f8eSopenharmony_ci     */
260161847f8eSopenharmony_ci    destroy(): Promise<void>;
260261847f8eSopenharmony_ci  }
260361847f8eSopenharmony_ci
260461847f8eSopenharmony_ci  /**
260561847f8eSopenharmony_ci   * The type of control command
260661847f8eSopenharmony_ci   * @typedef { 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind' | 'seek' |
260761847f8eSopenharmony_ci   *     'setVolume' | 'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'toggleMute' } AVCastControlCommandType
260861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
260961847f8eSopenharmony_ci   * @since 10
261061847f8eSopenharmony_ci   */
261161847f8eSopenharmony_ci  /**
261261847f8eSopenharmony_ci   * The type of control command
261361847f8eSopenharmony_ci   * @typedef { 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind' | 'seek' |
261461847f8eSopenharmony_ci   *     'setVolume' | 'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'toggleMute' } AVCastControlCommandType
261561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
261661847f8eSopenharmony_ci   * @atomicservice
261761847f8eSopenharmony_ci   * @since 12
261861847f8eSopenharmony_ci   */
261961847f8eSopenharmony_ci  type AVCastControlCommandType = 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind' |
262061847f8eSopenharmony_ci  'seek' | 'setVolume' | 'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'toggleMute';
262161847f8eSopenharmony_ci
262261847f8eSopenharmony_ci  /**
262361847f8eSopenharmony_ci   * The definition of command to be sent to the session
262461847f8eSopenharmony_ci   * @interface AVCastControlCommand
262561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
262661847f8eSopenharmony_ci   * @since 10
262761847f8eSopenharmony_ci   */
262861847f8eSopenharmony_ci  /**
262961847f8eSopenharmony_ci   * The definition of command to be sent to the session
263061847f8eSopenharmony_ci   * @interface AVCastControlCommand
263161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
263261847f8eSopenharmony_ci   * @atomicservice
263361847f8eSopenharmony_ci   * @since 12
263461847f8eSopenharmony_ci   */
263561847f8eSopenharmony_ci  interface AVCastControlCommand {
263661847f8eSopenharmony_ci    /**
263761847f8eSopenharmony_ci     * The command value {@link AVCastControlCommandType}
263861847f8eSopenharmony_ci     * 
263961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
264061847f8eSopenharmony_ci     * @since 10
264161847f8eSopenharmony_ci     */
264261847f8eSopenharmony_ci    /**
264361847f8eSopenharmony_ci     * The command value {@link AVCastControlCommandType}
264461847f8eSopenharmony_ci     * @type { AVCastControlCommandType }
264561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
264661847f8eSopenharmony_ci     * @atomicservice
264761847f8eSopenharmony_ci     * @since 12
264861847f8eSopenharmony_ci     */
264961847f8eSopenharmony_ci    command: AVCastControlCommandType;
265061847f8eSopenharmony_ci
265161847f8eSopenharmony_ci    /**
265261847f8eSopenharmony_ci     * Parameter carried in the command.
265361847f8eSopenharmony_ci     * The seek command must carry the number parameter.
265461847f8eSopenharmony_ci     * The setVolume command must carry the number parameter.
265561847f8eSopenharmony_ci     * The toggleFavorite command must carry the {@link AVMediaDescription.assetId} parameter.
265661847f8eSopenharmony_ci     * The setSpeed command must carry the {@link #media.PlaybackSpeed} parameter.
265761847f8eSopenharmony_ci     * The setLoopMode command must carry the {@link LoopMode} parameter.
265861847f8eSopenharmony_ci     * Other commands do not need to carry parameters.
265961847f8eSopenharmony_ci     * @type { ?(media.PlaybackSpeed | number | string | LoopMode) }
266061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
266161847f8eSopenharmony_ci     * @since 10
266261847f8eSopenharmony_ci     */
266361847f8eSopenharmony_ci    /**
266461847f8eSopenharmony_ci     * Parameter carried in the command.
266561847f8eSopenharmony_ci     * The seek command must carry the number parameter.
266661847f8eSopenharmony_ci     * The setVolume command must carry the number parameter.
266761847f8eSopenharmony_ci     * The toggleFavorite command must carry the {@link AVMediaDescription.assetId} parameter.
266861847f8eSopenharmony_ci     * The setSpeed command must carry the {@link #media.PlaybackSpeed} parameter.
266961847f8eSopenharmony_ci     * The setLoopMode command must carry the {@link LoopMode} parameter.
267061847f8eSopenharmony_ci     * Other commands do not need to carry parameters.
267161847f8eSopenharmony_ci     * @type { ?(media.PlaybackSpeed | number | string | LoopMode) }
267261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
267361847f8eSopenharmony_ci     * @atomicservice
267461847f8eSopenharmony_ci     * @since 12
267561847f8eSopenharmony_ci     */
267661847f8eSopenharmony_ci    parameter?: media.PlaybackSpeed | number | string | LoopMode;
267761847f8eSopenharmony_ci  }
267861847f8eSopenharmony_ci
267961847f8eSopenharmony_ci  /**
268061847f8eSopenharmony_ci   * AVCastController definition used to implement a remote control when a cast is connected
268161847f8eSopenharmony_ci   * @interface AVCastController
268261847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
268361847f8eSopenharmony_ci   * @since 10
268461847f8eSopenharmony_ci   */
268561847f8eSopenharmony_ci  /**
268661847f8eSopenharmony_ci   * AVCastController definition used to implement a remote control when a cast is connected
268761847f8eSopenharmony_ci   * @interface AVCastController
268861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
268961847f8eSopenharmony_ci   * @atomicservice
269061847f8eSopenharmony_ci   * @since 12
269161847f8eSopenharmony_ci   */
269261847f8eSopenharmony_ci  interface AVCastController {
269361847f8eSopenharmony_ci    /**
269461847f8eSopenharmony_ci     * Set a surface instance to display playing view, used at sink side.
269561847f8eSopenharmony_ci     * @param { string } surfaceId - surface id, video player will use this id get a surface instance.
269661847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - A callback instance used to return when set surface completed.
269761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not System App.
269861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
269961847f8eSopenharmony_ci     * 2.Parameter verification failed.
270061847f8eSopenharmony_ci     * @throws { BusinessError } 6600109 - The remote connection is not established
270161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
270261847f8eSopenharmony_ci     * @systemapi
270361847f8eSopenharmony_ci     * @since 10
270461847f8eSopenharmony_ci     */
270561847f8eSopenharmony_ci    setDisplaySurface(surfaceId: string, callback: AsyncCallback<void>): void;
270661847f8eSopenharmony_ci
270761847f8eSopenharmony_ci    /**
270861847f8eSopenharmony_ci     * Set a surface instance to display playing view, used at sink side.
270961847f8eSopenharmony_ci     * @param { string } surfaceId - surface id, video player will use this id get a surface instance.
271061847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
271161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Not System App.
271261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
271361847f8eSopenharmony_ci     * 2.Parameter verification failed.
271461847f8eSopenharmony_ci     * @throws { BusinessError } 6600109 - The remote connection is not established
271561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
271661847f8eSopenharmony_ci     * @systemapi
271761847f8eSopenharmony_ci     * @since 10
271861847f8eSopenharmony_ci     */
271961847f8eSopenharmony_ci    setDisplaySurface(surfaceId: string): Promise<void>;
272061847f8eSopenharmony_ci
272161847f8eSopenharmony_ci    /**
272261847f8eSopenharmony_ci     * Get the playback status of the current player
272361847f8eSopenharmony_ci     * @param { AsyncCallback<AVPlaybackState> } callback - The triggered asyncCallback when (getAVPlaybackState).
272461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
272561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
272661847f8eSopenharmony_ci     * @since 10
272761847f8eSopenharmony_ci     */
272861847f8eSopenharmony_ci    getAVPlaybackState(callback: AsyncCallback<AVPlaybackState>): void;
272961847f8eSopenharmony_ci
273061847f8eSopenharmony_ci    /**
273161847f8eSopenharmony_ci     * Get the playback status of the current player
273261847f8eSopenharmony_ci     * @returns { Promise<AVPlaybackState> } (AVPlaybackState) returned through promise
273361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
273461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
273561847f8eSopenharmony_ci     * @since 10
273661847f8eSopenharmony_ci     */
273761847f8eSopenharmony_ci    /**
273861847f8eSopenharmony_ci     * Get the playback status of the current player
273961847f8eSopenharmony_ci     * @returns { Promise<AVPlaybackState> } (AVPlaybackState) returned through promise
274061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
274161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
274261847f8eSopenharmony_ci     * @atomicservice
274361847f8eSopenharmony_ci     * @since 12
274461847f8eSopenharmony_ci     */
274561847f8eSopenharmony_ci    getAVPlaybackState(): Promise<AVPlaybackState>;
274661847f8eSopenharmony_ci
274761847f8eSopenharmony_ci    /**
274861847f8eSopenharmony_ci     * Send control commands to remote player
274961847f8eSopenharmony_ci     * @param { AVCastControlCommand } command The command to be send.
275061847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
275161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
275261847f8eSopenharmony_ci     * 2.Parameter verification failed.
275361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
275461847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command
275561847f8eSopenharmony_ci     * @throws { BusinessError } 6600109 - The remote connection is not established
275661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
275761847f8eSopenharmony_ci     * @since 10
275861847f8eSopenharmony_ci     */
275961847f8eSopenharmony_ci    sendControlCommand(command: AVCastControlCommand, callback: AsyncCallback<void>): void;
276061847f8eSopenharmony_ci
276161847f8eSopenharmony_ci    /**
276261847f8eSopenharmony_ci     * Send control commands to remote player
276361847f8eSopenharmony_ci     * @param { AVCastControlCommand } command The command to be send.
276461847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
276561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
276661847f8eSopenharmony_ci     * 2.Parameter verification failed.
276761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
276861847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command
276961847f8eSopenharmony_ci     * @throws { BusinessError } 6600109 - The remote connection is not established
277061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
277161847f8eSopenharmony_ci     * @since 10
277261847f8eSopenharmony_ci     */
277361847f8eSopenharmony_ci     /**
277461847f8eSopenharmony_ci     * Send control commands to remote player
277561847f8eSopenharmony_ci     * @param { AVCastControlCommand } command The command to be send.
277661847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
277761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
277861847f8eSopenharmony_ci     * 2.Parameter verification failed.
277961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
278061847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command
278161847f8eSopenharmony_ci     * @throws { BusinessError } 6600109 - The remote connection is not established
278261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
278361847f8eSopenharmony_ci     * @atomicservice
278461847f8eSopenharmony_ci     * @since 12
278561847f8eSopenharmony_ci     */
278661847f8eSopenharmony_ci    sendControlCommand(command: AVCastControlCommand): Promise<void>;
278761847f8eSopenharmony_ci
278861847f8eSopenharmony_ci    /**
278961847f8eSopenharmony_ci     * Play the current item, should contain mediaUri otherwise the playback will fail.
279061847f8eSopenharmony_ci     * @param { AVQueueItem } item media item info.
279161847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
279261847f8eSopenharmony_ci     * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
279361847f8eSopenharmony_ci     * 2.Parameter verification failed.
279461847f8eSopenharmony_ci     * @throws {BusinessError} 6600101 - Session service exception
279561847f8eSopenharmony_ci     * @throws {BusinessError} 6600109 - The remote connection is not established
279661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
279761847f8eSopenharmony_ci     * @since 10
279861847f8eSopenharmony_ci     */
279961847f8eSopenharmony_ci    start(item: AVQueueItem, callback: AsyncCallback<void>): void;
280061847f8eSopenharmony_ci
280161847f8eSopenharmony_ci    /**
280261847f8eSopenharmony_ci     * Play the current item, should contain mediaUri otherwise the playback will fail.
280361847f8eSopenharmony_ci     * @param { AVQueueItem } item media item info.
280461847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
280561847f8eSopenharmony_ci     * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
280661847f8eSopenharmony_ci     * 2.Parameter verification failed.
280761847f8eSopenharmony_ci     * @throws {BusinessError} 6600101 - Session service exception
280861847f8eSopenharmony_ci     * @throws {BusinessError} 6600109 - The remote connection is not established
280961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
281061847f8eSopenharmony_ci     * @since 10
281161847f8eSopenharmony_ci     */
281261847f8eSopenharmony_ci    /**
281361847f8eSopenharmony_ci     * Play the current item, should contain mediaUri otherwise the playback will fail.
281461847f8eSopenharmony_ci     * @param { AVQueueItem } item media item info.
281561847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
281661847f8eSopenharmony_ci     * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
281761847f8eSopenharmony_ci     * 2.Parameter verification failed.
281861847f8eSopenharmony_ci     * @throws {BusinessError} 6600101 - Session service exception
281961847f8eSopenharmony_ci     * @throws {BusinessError} 6600109 - The remote connection is not established
282061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
282161847f8eSopenharmony_ci     * @atomicservice
282261847f8eSopenharmony_ci     * @since 12
282361847f8eSopenharmony_ci     */
282461847f8eSopenharmony_ci    start(item: AVQueueItem): Promise<void>;
282561847f8eSopenharmony_ci
282661847f8eSopenharmony_ci    /**
282761847f8eSopenharmony_ci     * Load the current item and mediaUri can be null, this is needed for sink media information displaying
282861847f8eSopenharmony_ci     * @param { AVQueueItem } item media item info.
282961847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
283061847f8eSopenharmony_ci     * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
283161847f8eSopenharmony_ci     * 2.Parameter verification failed.
283261847f8eSopenharmony_ci     * @throws {BusinessError} 6600101 - Session service exception
283361847f8eSopenharmony_ci     * @throws {BusinessError} 6600109 - The remote connection is not established
283461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
283561847f8eSopenharmony_ci     * @since 10
283661847f8eSopenharmony_ci     */
283761847f8eSopenharmony_ci    prepare(item: AVQueueItem, callback: AsyncCallback<void>): void;
283861847f8eSopenharmony_ci
283961847f8eSopenharmony_ci    /**
284061847f8eSopenharmony_ci     * Load the current item and mediaUri can be null, this is needed for sink media information displaying
284161847f8eSopenharmony_ci     * @param { AVQueueItem } item media item info.
284261847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
284361847f8eSopenharmony_ci     * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
284461847f8eSopenharmony_ci     * 2.Parameter verification failed.
284561847f8eSopenharmony_ci     * @throws {BusinessError} 6600101 - Session service exception
284661847f8eSopenharmony_ci     * @throws {BusinessError} 6600109 - The remote connection is not established
284761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
284861847f8eSopenharmony_ci     * @since 10
284961847f8eSopenharmony_ci     */
285061847f8eSopenharmony_ci    /**
285161847f8eSopenharmony_ci     * Load the current item and mediaUri can be null, this is needed for sink media information displaying
285261847f8eSopenharmony_ci     * @param { AVQueueItem } item media item info.
285361847f8eSopenharmony_ci     * @returns { Promise<void> } Promise used to return the result.
285461847f8eSopenharmony_ci     * @throws {BusinessError} 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
285561847f8eSopenharmony_ci     * 2.Parameter verification failed.
285661847f8eSopenharmony_ci     * @throws {BusinessError} 6600101 - Session service exception
285761847f8eSopenharmony_ci     * @throws {BusinessError} 6600109 - The remote connection is not established
285861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
285961847f8eSopenharmony_ci     * @atomicservice
286061847f8eSopenharmony_ci     * @since 12
286161847f8eSopenharmony_ci     */
286261847f8eSopenharmony_ci    prepare(item: AVQueueItem): Promise<void>;
286361847f8eSopenharmony_ci
286461847f8eSopenharmony_ci    /**
286561847f8eSopenharmony_ci     * Get the current playing item
286661847f8eSopenharmony_ci     * @param { AsyncCallback<AVQueueItem> } callback - The triggered asyncCallback.
286761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
286861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
286961847f8eSopenharmony_ci     * @since 10
287061847f8eSopenharmony_ci     */
287161847f8eSopenharmony_ci    getCurrentItem(callback: AsyncCallback<AVQueueItem>): void;
287261847f8eSopenharmony_ci
287361847f8eSopenharmony_ci    /**
287461847f8eSopenharmony_ci     * Get the current playing item
287561847f8eSopenharmony_ci     * @returns { Promise<AVQueueItem> } (AVQueueItem) returned through promise
287661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
287761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
287861847f8eSopenharmony_ci     * @since 10
287961847f8eSopenharmony_ci     */
288061847f8eSopenharmony_ci    /**
288161847f8eSopenharmony_ci     * Get the current playing item
288261847f8eSopenharmony_ci     * @returns { Promise<AVQueueItem> } (AVQueueItem) returned through promise
288361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
288461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
288561847f8eSopenharmony_ci     * @atomicservice
288661847f8eSopenharmony_ci     * @since 12
288761847f8eSopenharmony_ci     */
288861847f8eSopenharmony_ci    getCurrentItem(): Promise<AVQueueItem>;
288961847f8eSopenharmony_ci
289061847f8eSopenharmony_ci    /**
289161847f8eSopenharmony_ci     * Get commands supported by the current cast controller
289261847f8eSopenharmony_ci     * @param { AsyncCallback<Array<AVCastControlCommandType>> } callback - The triggered asyncCallback when (getValidCommands).
289361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
289461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
289561847f8eSopenharmony_ci     * @since 11
289661847f8eSopenharmony_ci     */
289761847f8eSopenharmony_ci    getValidCommands(callback: AsyncCallback<Array<AVCastControlCommandType>>): void;
289861847f8eSopenharmony_ci
289961847f8eSopenharmony_ci    /**
290061847f8eSopenharmony_ci     * Get commands supported by the current cast controller
290161847f8eSopenharmony_ci     * @returns { Promise<Array<AVCastControlCommandType>> } array of AVCastControlCommandType promise
290261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
290361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
290461847f8eSopenharmony_ci     * @since 11
290561847f8eSopenharmony_ci     */
290661847f8eSopenharmony_ci    getValidCommands(): Promise<Array<AVCastControlCommandType>>;
290761847f8eSopenharmony_ci
290861847f8eSopenharmony_ci    /**
290961847f8eSopenharmony_ci     * Process the response corresponding to the media key request obtained by the application.
291061847f8eSopenharmony_ci     * @param { string } assetId - The assetId of resource which provides the response.
291161847f8eSopenharmony_ci     * @param { Uint8Array } response - Response corresponding to the request.
291261847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
291361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
291461847f8eSopenharmony_ci     * 2.Parameter verification failed.
291561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
291661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
291761847f8eSopenharmony_ci     * @atomicservice
291861847f8eSopenharmony_ci     * @since 12
291961847f8eSopenharmony_ci     */
292061847f8eSopenharmony_ci    processMediaKeyResponse(assetId: string, response: Uint8Array): Promise<void>;
292161847f8eSopenharmony_ci
292261847f8eSopenharmony_ci    /**
292361847f8eSopenharmony_ci     * Destroy the controller
292461847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully.
292561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
292661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
292761847f8eSopenharmony_ci     * @since 11
292861847f8eSopenharmony_ci     */
292961847f8eSopenharmony_ci    release(callback: AsyncCallback<void>): void;
293061847f8eSopenharmony_ci
293161847f8eSopenharmony_ci    /**
293261847f8eSopenharmony_ci     * Destroy the controller
293361847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
293461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
293561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
293661847f8eSopenharmony_ci     * @since 11
293761847f8eSopenharmony_ci     */
293861847f8eSopenharmony_ci    /**
293961847f8eSopenharmony_ci     * Destroy the controller
294061847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
294161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
294261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
294361847f8eSopenharmony_ci     * @atomicservice
294461847f8eSopenharmony_ci     * @since 12
294561847f8eSopenharmony_ci     */
294661847f8eSopenharmony_ci    release(): Promise<void>;
294761847f8eSopenharmony_ci
294861847f8eSopenharmony_ci    /**
294961847f8eSopenharmony_ci     * Register playback state changed callback
295061847f8eSopenharmony_ci     * @param { 'playbackStateChange' } type
295161847f8eSopenharmony_ci     * @param { Array<keyof AVPlaybackState> | 'all' } filter - The properties of {@link AVPlaybackState} that you cared about
295261847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle playback state changed event.
295361847f8eSopenharmony_ci     * The callback function provides the {@link AVPlaybackState} parameter.
295461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
295561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
295661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
295761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
295861847f8eSopenharmony_ci     * @since 10
295961847f8eSopenharmony_ci     */
296061847f8eSopenharmony_ci    /**
296161847f8eSopenharmony_ci     * Register playback state changed callback
296261847f8eSopenharmony_ci     * @param { 'playbackStateChange' } type
296361847f8eSopenharmony_ci     * @param { Array<keyof AVPlaybackState> | 'all' } filter - The properties of {@link AVPlaybackState} that you cared about
296461847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle playback state changed event.
296561847f8eSopenharmony_ci     * The callback function provides the {@link AVPlaybackState} parameter.
296661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
296761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
296861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
296961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
297061847f8eSopenharmony_ci     * @atomicservice
297161847f8eSopenharmony_ci     * @since 12
297261847f8eSopenharmony_ci     */
297361847f8eSopenharmony_ci    on(type: 'playbackStateChange', filter: Array<keyof AVPlaybackState> | 'all', callback: (state: AVPlaybackState) => void): void;
297461847f8eSopenharmony_ci
297561847f8eSopenharmony_ci    /**
297661847f8eSopenharmony_ci     * Unregister playback state changed callback
297761847f8eSopenharmony_ci     * @param { 'playbackStateChange' } type
297861847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle playback state changed event.
297961847f8eSopenharmony_ci     * The callback function provides the {@link AVPlaybackState} parameter.
298061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
298161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
298261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
298361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
298461847f8eSopenharmony_ci     * @since 10
298561847f8eSopenharmony_ci     */
298661847f8eSopenharmony_ci    /**
298761847f8eSopenharmony_ci     * Unregister playback state changed callback
298861847f8eSopenharmony_ci     * @param { 'playbackStateChange' } type
298961847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle playback state changed event.
299061847f8eSopenharmony_ci     * The callback function provides the {@link AVPlaybackState} parameter.
299161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
299261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
299361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
299461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
299561847f8eSopenharmony_ci     * @atomicservice
299661847f8eSopenharmony_ci     * @since 12
299761847f8eSopenharmony_ci     */
299861847f8eSopenharmony_ci    off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void): void;
299961847f8eSopenharmony_ci
300061847f8eSopenharmony_ci    /**
300161847f8eSopenharmony_ci     * Register listener for current media item playback events.
300261847f8eSopenharmony_ci     * @param { 'mediaItemChange' } type Type of the playback event to listen for.
300361847f8eSopenharmony_ci     * @param { Callback<AVQueueItem> } callback Callback used to listen for current item changed.
300461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
300561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
300661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
300761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
300861847f8eSopenharmony_ci     * @since 10
300961847f8eSopenharmony_ci     */
301061847f8eSopenharmony_ci    /**
301161847f8eSopenharmony_ci     * Register listener for current media item playback events.
301261847f8eSopenharmony_ci     * @param { 'mediaItemChange' } type Type of the playback event to listen for.
301361847f8eSopenharmony_ci     * @param { Callback<AVQueueItem> } callback Callback used to listen for current item changed.
301461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
301561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
301661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
301761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
301861847f8eSopenharmony_ci     * @atomicservice
301961847f8eSopenharmony_ci     * @since 12
302061847f8eSopenharmony_ci     */
302161847f8eSopenharmony_ci    on(type: 'mediaItemChange', callback: Callback<AVQueueItem>): void;
302261847f8eSopenharmony_ci
302361847f8eSopenharmony_ci    /**
302461847f8eSopenharmony_ci     * Unregister listener for current media item playback events.
302561847f8eSopenharmony_ci     * @param { 'mediaItemChange' } type Type of the playback event to listen for.
302661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
302761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
302861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
302961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
303061847f8eSopenharmony_ci     * @since 10
303161847f8eSopenharmony_ci     */
303261847f8eSopenharmony_ci    /**
303361847f8eSopenharmony_ci     * Unregister listener for current media item playback events.
303461847f8eSopenharmony_ci     * @param { 'mediaItemChange' } type Type of the playback event to listen for.
303561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
303661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
303761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
303861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
303961847f8eSopenharmony_ci     * @atomicservice
304061847f8eSopenharmony_ci     * @since 12
304161847f8eSopenharmony_ci     */
304261847f8eSopenharmony_ci    off(type: 'mediaItemChange'): void;
304361847f8eSopenharmony_ci
304461847f8eSopenharmony_ci    /**
304561847f8eSopenharmony_ci     * Register playback command callback sent by remote side or media center.
304661847f8eSopenharmony_ci     * Application needs update the new media resource when receive these commands by using playItem.
304761847f8eSopenharmony_ci     * @param { 'playNext' } type - Type of the 'playNext' event to listen for.
304861847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle 'playNext' command
304961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
305061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
305161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
305261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
305361847f8eSopenharmony_ci     * @since 10
305461847f8eSopenharmony_ci     */
305561847f8eSopenharmony_ci    /**
305661847f8eSopenharmony_ci     * Register playback command callback sent by remote side or media center.
305761847f8eSopenharmony_ci     * Application needs update the new media resource when receive these commands by using playItem.
305861847f8eSopenharmony_ci     * @param { 'playNext' } type - Type of the 'playNext' event to listen for.
305961847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle 'playNext' command
306061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
306161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
306261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
306361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
306461847f8eSopenharmony_ci     * @atomicservice
306561847f8eSopenharmony_ci     * @since 12
306661847f8eSopenharmony_ci     */
306761847f8eSopenharmony_ci    on(type: 'playNext', callback: Callback<void>): void;
306861847f8eSopenharmony_ci
306961847f8eSopenharmony_ci    /**
307061847f8eSopenharmony_ci     * Unregister playback command callback sent by remote side or media center.
307161847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
307261847f8eSopenharmony_ci     * @param { 'playNext' } type - Type of the 'playNext' event to listen for.
307361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
307461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
307561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
307661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
307761847f8eSopenharmony_ci     * @since 10
307861847f8eSopenharmony_ci     */
307961847f8eSopenharmony_ci    /**
308061847f8eSopenharmony_ci     * Unregister playback command callback sent by remote side or media center.
308161847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
308261847f8eSopenharmony_ci     * @param { 'playNext' } type - Type of the 'playNext' event to listen for.
308361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
308461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
308561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
308661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
308761847f8eSopenharmony_ci     * @atomicservice
308861847f8eSopenharmony_ci     * @since 12
308961847f8eSopenharmony_ci     */
309061847f8eSopenharmony_ci    off(type: 'playNext'): void;
309161847f8eSopenharmony_ci
309261847f8eSopenharmony_ci    /**
309361847f8eSopenharmony_ci     * Register playback command callback sent by remote side or media center.
309461847f8eSopenharmony_ci     * Application needs update the new media resource when receive these commands by using playItem.
309561847f8eSopenharmony_ci     * @param { 'playPrevious' } type - Type of the 'playPrevious' to listen for.
309661847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle 'playPrevious' command
309761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
309861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
309961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
310061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
310161847f8eSopenharmony_ci     * @since 10
310261847f8eSopenharmony_ci     */
310361847f8eSopenharmony_ci    /**
310461847f8eSopenharmony_ci     * Register playback command callback sent by remote side or media center.
310561847f8eSopenharmony_ci     * Application needs update the new media resource when receive these commands by using playItem.
310661847f8eSopenharmony_ci     * @param { 'playPrevious' } type - Type of the 'playPrevious' to listen for.
310761847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle 'playPrevious' command
310861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
310961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
311061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
311161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
311261847f8eSopenharmony_ci     * @atomicservice
311361847f8eSopenharmony_ci     * @since 12
311461847f8eSopenharmony_ci     */
311561847f8eSopenharmony_ci    on(type: 'playPrevious', callback: Callback<void>): void;
311661847f8eSopenharmony_ci
311761847f8eSopenharmony_ci    /**
311861847f8eSopenharmony_ci     * Unregister playback command callback sent by remote side or media center.
311961847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
312061847f8eSopenharmony_ci     * @param { 'playPrevious' } type - Type of the 'playPrevious' to listen for.
312161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
312261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
312361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
312461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
312561847f8eSopenharmony_ci     * @since 10
312661847f8eSopenharmony_ci     */
312761847f8eSopenharmony_ci    /**
312861847f8eSopenharmony_ci     * Unregister playback command callback sent by remote side or media center.
312961847f8eSopenharmony_ci     * When canceling the callback, need to update the supported commands list.
313061847f8eSopenharmony_ci     * @param { 'playPrevious' } type - Type of the 'playPrevious' to listen for.
313161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
313261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
313361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
313461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
313561847f8eSopenharmony_ci     * @atomicservice
313661847f8eSopenharmony_ci     * @since 12
313761847f8eSopenharmony_ci     */
313861847f8eSopenharmony_ci    off(type: 'playPrevious'): void;
313961847f8eSopenharmony_ci
314061847f8eSopenharmony_ci    /**
314161847f8eSopenharmony_ci     * Register requested playback command callback sent by remote side or media center.
314261847f8eSopenharmony_ci     * The AVQueueItem may include the requested assetId, starting position and other configurations.
314361847f8eSopenharmony_ci     * @param { 'requestPlay' } type - Type of the 'requestPlay' to listen for.
314461847f8eSopenharmony_ci     * @param { Callback<AVQueueItem> } callback - Used to handle 'requestPlay' command
314561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
314661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
314761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
314861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
314961847f8eSopenharmony_ci     * @since 11
315061847f8eSopenharmony_ci     */
315161847f8eSopenharmony_ci    on(type: 'requestPlay', callback: Callback<AVQueueItem>): void;
315261847f8eSopenharmony_ci
315361847f8eSopenharmony_ci    /**
315461847f8eSopenharmony_ci     * Unregister requested playback command callback sent by remote side or media center.
315561847f8eSopenharmony_ci     * @param { 'requestPlay' } type - Type of the 'requestPlay' to listen for.
315661847f8eSopenharmony_ci     * @param { Callback<AVQueueItem> } callback - Used to handle 'requestPlay' command
315761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
315861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
315961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
316061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
316161847f8eSopenharmony_ci     * @since 11
316261847f8eSopenharmony_ci     */
316361847f8eSopenharmony_ci    off(type: 'requestPlay', callback?: Callback<AVQueueItem>): void;
316461847f8eSopenharmony_ci
316561847f8eSopenharmony_ci    /**
316661847f8eSopenharmony_ci     * Register endOfStream state callback.
316761847f8eSopenharmony_ci     * Application needs update the new media resource when receive these commands by using playItem.
316861847f8eSopenharmony_ci     * @param { 'endOfStream' } type - Type of the 'endOfStream' to listen for.
316961847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle 'endOfStream' command
317061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
317161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
317261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
317361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
317461847f8eSopenharmony_ci     * @since 11
317561847f8eSopenharmony_ci     */
317661847f8eSopenharmony_ci    on(type: 'endOfStream', callback: Callback<void>): void;
317761847f8eSopenharmony_ci
317861847f8eSopenharmony_ci    /**
317961847f8eSopenharmony_ci     * Unregister endOfStream state callback.
318061847f8eSopenharmony_ci     * @param { 'endOfStream' } type - Type of the 'endOfStream' to listen for.
318161847f8eSopenharmony_ci     * @param { Callback<void> } callback - Used to handle 'endOfStream' command
318261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
318361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
318461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
318561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
318661847f8eSopenharmony_ci     * @since 11
318761847f8eSopenharmony_ci     */
318861847f8eSopenharmony_ci    off(type: 'endOfStream', callback?: Callback<void>): void;
318961847f8eSopenharmony_ci
319061847f8eSopenharmony_ci    /**
319161847f8eSopenharmony_ci     * Register listens for playback events.
319261847f8eSopenharmony_ci     * @param { 'seekDone' } type - Type of the 'seekDone' to listen for.
319361847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the playback seekDone event.
319461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
319561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
319661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
319761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
319861847f8eSopenharmony_ci     * @since 10
319961847f8eSopenharmony_ci     */
320061847f8eSopenharmony_ci    /**
320161847f8eSopenharmony_ci     * Register listens for playback events.
320261847f8eSopenharmony_ci     * @param { 'seekDone' } type - Type of the 'seekDone' to listen for.
320361847f8eSopenharmony_ci     * @param { Callback<number> } callback - Callback used to listen for the playback seekDone event.
320461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
320561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
320661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
320761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
320861847f8eSopenharmony_ci     * @atomicservice
320961847f8eSopenharmony_ci     * @since 12
321061847f8eSopenharmony_ci     */
321161847f8eSopenharmony_ci    on(type: 'seekDone', callback: Callback<number>): void;
321261847f8eSopenharmony_ci
321361847f8eSopenharmony_ci    /**
321461847f8eSopenharmony_ci     * Unregister listens for playback events.
321561847f8eSopenharmony_ci     * @param { 'seekDone' } type - Type of the 'seekDone' to listen for.
321661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
321761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
321861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
321961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
322061847f8eSopenharmony_ci     * @since 10
322161847f8eSopenharmony_ci     */
322261847f8eSopenharmony_ci    /**
322361847f8eSopenharmony_ci     * Unregister listens for playback events.
322461847f8eSopenharmony_ci     * @param { 'seekDone' } type - Type of the 'seekDone' to listen for.
322561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
322661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
322761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
322861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
322961847f8eSopenharmony_ci     * @atomicservice
323061847f8eSopenharmony_ci     * @since 12
323161847f8eSopenharmony_ci     */
323261847f8eSopenharmony_ci    off(type: 'seekDone'): void;
323361847f8eSopenharmony_ci
323461847f8eSopenharmony_ci    /**
323561847f8eSopenharmony_ci     * Register the valid commands of the casted session changed callback
323661847f8eSopenharmony_ci     * @param { 'validCommandChange' } type - 'validCommandChange'
323761847f8eSopenharmony_ci     * @param { Callback<Array<AVCastControlCommandType>> } callback - The callback used to handle the changes.
323861847f8eSopenharmony_ci     * The callback function provides an array of AVCastControlCommandType.
323961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
324061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
324161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
324261847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
324361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
324461847f8eSopenharmony_ci     * @since 11
324561847f8eSopenharmony_ci     */
324661847f8eSopenharmony_ci    on(type: 'validCommandChange', callback: Callback<Array<AVCastControlCommandType>>);
324761847f8eSopenharmony_ci
324861847f8eSopenharmony_ci    /**
324961847f8eSopenharmony_ci     * Unregister the valid commands of the casted session changed callback
325061847f8eSopenharmony_ci     * @param { 'validCommandChange' } type - 'validCommandChange'
325161847f8eSopenharmony_ci     * @param { Callback<Array<AVCastControlCommandType>> } callback - The callback used to handle the changes.
325261847f8eSopenharmony_ci     * The callback function provides an array of AVCastControlCommandType.
325361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
325461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
325561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
325661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
325761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
325861847f8eSopenharmony_ci     * @since 11
325961847f8eSopenharmony_ci     */
326061847f8eSopenharmony_ci    off(type: 'validCommandChange', callback?: Callback<Array<AVCastControlCommandType>>);
326161847f8eSopenharmony_ci
326261847f8eSopenharmony_ci    /**
326361847f8eSopenharmony_ci     * Register listener for video size change event, used at remote side.
326461847f8eSopenharmony_ci     * @param { 'videoSizeChange' } type - Type of the 'videoSizeChange' to listen for.
326561847f8eSopenharmony_ci     * @param { function } callback - Callback used to return video size.
326661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
326761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
326861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
326961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
327061847f8eSopenharmony_ci     * @since 12
327161847f8eSopenharmony_ci     */
327261847f8eSopenharmony_ci    on(type: 'videoSizeChange', callback: (width: number, height: number) => void): void;
327361847f8eSopenharmony_ci
327461847f8eSopenharmony_ci    /**
327561847f8eSopenharmony_ci     * Unregister listener for video size change event, used at remote side.
327661847f8eSopenharmony_ci     * @param { 'videoSizeChange' } type - Type of the 'videoSizeChange' to listen for.
327761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
327861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
327961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
328061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
328161847f8eSopenharmony_ci     * @since 12
328261847f8eSopenharmony_ci     */
328361847f8eSopenharmony_ci    off(type: 'videoSizeChange'): void;
328461847f8eSopenharmony_ci
328561847f8eSopenharmony_ci    /**
328661847f8eSopenharmony_ci     * Register listeners for playback error events.
328761847f8eSopenharmony_ci     * @param { 'error' } type Type of the 'error' to listen for.
328861847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the playback error event.
328961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
329061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
329161847f8eSopenharmony_ci     * @throws { BusinessError } 5400101 - No memory.
329261847f8eSopenharmony_ci     * @throws { BusinessError } 5400102 - Operation not allowed.
329361847f8eSopenharmony_ci     * @throws { BusinessError } 5400103 - I/O error.
329461847f8eSopenharmony_ci     * @throws { BusinessError } 5400104 - Time out.
329561847f8eSopenharmony_ci     * @throws { BusinessError } 5400105 - Service died.
329661847f8eSopenharmony_ci     * @throws { BusinessError } 5400106 - Unsupport format.
329761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
329861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
329961847f8eSopenharmony_ci     * @since 10
330061847f8eSopenharmony_ci     */
330161847f8eSopenharmony_ci    /**
330261847f8eSopenharmony_ci     * Register listeners for playback error events.
330361847f8eSopenharmony_ci     * @param { 'error' } type Type of the 'error' to listen for.
330461847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the playback error event.
330561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
330661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
330761847f8eSopenharmony_ci     * @throws { BusinessError } 5400101 - No memory.
330861847f8eSopenharmony_ci     * @throws { BusinessError } 5400102 - Operation not allowed.
330961847f8eSopenharmony_ci     * @throws { BusinessError } 5400103 - I/O error.
331061847f8eSopenharmony_ci     * @throws { BusinessError } 5400104 - Time out.
331161847f8eSopenharmony_ci     * @throws { BusinessError } 5400105 - Service died.
331261847f8eSopenharmony_ci     * @throws { BusinessError } 5400106 - Unsupport format.
331361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
331461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
331561847f8eSopenharmony_ci     * @atomicservice
331661847f8eSopenharmony_ci     * @since 12
331761847f8eSopenharmony_ci     */
331861847f8eSopenharmony_ci    on(type: 'error', callback: ErrorCallback): void;
331961847f8eSopenharmony_ci
332061847f8eSopenharmony_ci    /**
332161847f8eSopenharmony_ci     * Unregister listens for playback error events.
332261847f8eSopenharmony_ci     * @param { 'error' } type Type of the 'error' to listen for.
332361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
332461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
332561847f8eSopenharmony_ci     * @throws { BusinessError } 5400101 - No memory.
332661847f8eSopenharmony_ci     * @throws { BusinessError } 5400102 - Operation not allowed.
332761847f8eSopenharmony_ci     * @throws { BusinessError } 5400103 - I/O error.
332861847f8eSopenharmony_ci     * @throws { BusinessError } 5400104 - Time out.
332961847f8eSopenharmony_ci     * @throws { BusinessError } 5400105 - Service died.
333061847f8eSopenharmony_ci     * @throws { BusinessError } 5400106 - Unsupport format.
333161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
333261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
333361847f8eSopenharmony_ci     * @since 10
333461847f8eSopenharmony_ci     */
333561847f8eSopenharmony_ci    /**
333661847f8eSopenharmony_ci     * Unregister listens for playback error events.
333761847f8eSopenharmony_ci     * @param { 'error' } type Type of the 'error' to listen for.
333861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
333961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
334061847f8eSopenharmony_ci     * @throws { BusinessError } 5400101 - No memory.
334161847f8eSopenharmony_ci     * @throws { BusinessError } 5400102 - Operation not allowed.
334261847f8eSopenharmony_ci     * @throws { BusinessError } 5400103 - I/O error.
334361847f8eSopenharmony_ci     * @throws { BusinessError } 5400104 - Time out.
334461847f8eSopenharmony_ci     * @throws { BusinessError } 5400105 - Service died.
334561847f8eSopenharmony_ci     * @throws { BusinessError } 5400106 - Unsupport format.
334661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
334761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
334861847f8eSopenharmony_ci     * @atomicservice
334961847f8eSopenharmony_ci     * @since 12
335061847f8eSopenharmony_ci     */
335161847f8eSopenharmony_ci    off(type: 'error'): void;
335261847f8eSopenharmony_ci
335361847f8eSopenharmony_ci    /**
335461847f8eSopenharmony_ci     * Register listeners for cast control generic error events.
335561847f8eSopenharmony_ci     * @param { 'castControlGenericError' } type Type of the 'castControlGenericError' to listen for.
335661847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
335761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
335861847f8eSopenharmony_ci     * 2. Incorrect parameter types.
335961847f8eSopenharmony_ci     * @throws { BusinessError } 6611000 - The error code for cast control is unspecified.
336061847f8eSopenharmony_ci     * @throws { BusinessError } 6611001 - An unspecified error occurs in the remote player.
336161847f8eSopenharmony_ci     * @throws { BusinessError } 6611002 - The playback position falls behind the live window.
336261847f8eSopenharmony_ci     * @throws { BusinessError } 6611003 - The process of cast control times out.
336361847f8eSopenharmony_ci     * @throws { BusinessError } 6611004 - The runtime check failed.
336461847f8eSopenharmony_ci     * @throws { BusinessError } 6611100 - Cross-device data transmission is locked.
336561847f8eSopenharmony_ci     * @throws { BusinessError } 6611101 - The specified seek mode is not supported.
336661847f8eSopenharmony_ci     * @throws { BusinessError } 6611102 - The position to seek to is out of the range of the media asset
336761847f8eSopenharmony_ci     * or the specified seek mode is not supported.
336861847f8eSopenharmony_ci     * @throws { BusinessError } 6611103 - The specified playback mode is not supported.
336961847f8eSopenharmony_ci     * @throws { BusinessError } 6611104 - The specified playback speed is not supported.
337061847f8eSopenharmony_ci     * @throws { BusinessError } 6611105 - The action failed because either the media source device or the media sink device has been revoked.
337161847f8eSopenharmony_ci     * @throws { BusinessError } 6611106 - The parameter is invalid, for example, the url is illegal to play.
337261847f8eSopenharmony_ci     * @throws { BusinessError } 6611107 - Allocation of memory failed.
337361847f8eSopenharmony_ci     * @throws { BusinessError } 6611108 - Operation is not allowed.
337461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
337561847f8eSopenharmony_ci     * @atomicservice
337661847f8eSopenharmony_ci     * @since 13
337761847f8eSopenharmony_ci     */
337861847f8eSopenharmony_ci    on(type: 'castControlGenericError', callback: ErrorCallback): void;
337961847f8eSopenharmony_ci
338061847f8eSopenharmony_ci    /**
338161847f8eSopenharmony_ci     * Unregister listeners for cast control generic error events.
338261847f8eSopenharmony_ci     * @param { 'castControlGenericError' } type Type of the 'castControlGenericError' to listen for.
338361847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
338461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
338561847f8eSopenharmony_ci     * 2. Incorrect parameter types.
338661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
338761847f8eSopenharmony_ci     * @atomicservice
338861847f8eSopenharmony_ci     * @since 13
338961847f8eSopenharmony_ci     */
339061847f8eSopenharmony_ci    off(type: 'castControlGenericError', callback?: ErrorCallback): void;
339161847f8eSopenharmony_ci
339261847f8eSopenharmony_ci    /**
339361847f8eSopenharmony_ci     * Register listeners for cast control input/output error events.
339461847f8eSopenharmony_ci     * @param { 'castControlIoError' } type Type of the 'castControlIoError' to listen for.
339561847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
339661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
339761847f8eSopenharmony_ci     * 2. Incorrect parameter types.
339861847f8eSopenharmony_ci     * @throws { BusinessError } 6612000 - An unspecified input/output error occurs.
339961847f8eSopenharmony_ci     * @throws { BusinessError } 6612001 - Network connection failure.
340061847f8eSopenharmony_ci     * @throws { BusinessError } 6612002 - Network timeout.
340161847f8eSopenharmony_ci     * @throws { BusinessError } 6612003 - Invalid "Content-Type" HTTP header.
340261847f8eSopenharmony_ci     * @throws { BusinessError } 6612004 - The HTTP server returns an unexpected HTTP response status code.
340361847f8eSopenharmony_ci     * @throws { BusinessError } 6612005 - The file does not exist.
340461847f8eSopenharmony_ci     * @throws { BusinessError } 6612006 - No permission is granted to perform the IO operation.
340561847f8eSopenharmony_ci     * @throws { BusinessError } 6612007 - Access to cleartext HTTP traffic is not allowed by the app's network security configuration.
340661847f8eSopenharmony_ci     * @throws { BusinessError } 6612008 - Reading data out of the data bound.
340761847f8eSopenharmony_ci     * @throws { BusinessError } 6612100 - The media does not contain any contents that can be played.
340861847f8eSopenharmony_ci     * @throws { BusinessError } 6612101 - The media cannot be read, for example, because of dust or scratches.
340961847f8eSopenharmony_ci     * @throws { BusinessError } 6612102 - This resource is already in use.
341061847f8eSopenharmony_ci     * @throws { BusinessError } 6612103 - The content using the validity interval has expired.
341161847f8eSopenharmony_ci     * @throws { BusinessError } 6612104 - Using the requested content to play is not allowed.
341261847f8eSopenharmony_ci     * @throws { BusinessError } 6612105 - The use of the allowed content cannot be verified.
341361847f8eSopenharmony_ci     * @throws { BusinessError } 6612106 - The number of times this content has been used as requested has reached the maximum allowed number of uses.
341461847f8eSopenharmony_ci     * @throws { BusinessError } 6612107 - An error occurs when sending packet from source device to sink device.
341561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
341661847f8eSopenharmony_ci     * @atomicservice
341761847f8eSopenharmony_ci     * @since 13
341861847f8eSopenharmony_ci     */
341961847f8eSopenharmony_ci    on(type: 'castControlIoError', callback: ErrorCallback): void;
342061847f8eSopenharmony_ci
342161847f8eSopenharmony_ci    /**
342261847f8eSopenharmony_ci     * Unregister listeners for cast control input/output error events.
342361847f8eSopenharmony_ci     * @param { 'castControlIoError' } type Type of the 'castControlIoError' to listen for.
342461847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
342561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
342661847f8eSopenharmony_ci     * 2. Incorrect parameter types.
342761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
342861847f8eSopenharmony_ci     * @atomicservice
342961847f8eSopenharmony_ci     * @since 13
343061847f8eSopenharmony_ci     */
343161847f8eSopenharmony_ci    off(type: 'castControlIoError', callback?: ErrorCallback): void;
343261847f8eSopenharmony_ci
343361847f8eSopenharmony_ci    /**
343461847f8eSopenharmony_ci     * Register listeners for cast control parsing error events.
343561847f8eSopenharmony_ci     * @param { 'castControlParsingError' } type Type of the 'castControlParsingError' to listen for.
343661847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
343761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
343861847f8eSopenharmony_ci     * 2. Incorrect parameter types.
343961847f8eSopenharmony_ci     * @throws { BusinessError } 6613000 - Unspecified error related to content parsing.
344061847f8eSopenharmony_ci     * @throws { BusinessError } 6613001 - Parsing error associated with media container format bit streams.
344161847f8eSopenharmony_ci     * @throws { BusinessError } 6613002 - Parsing error associated with the media manifest.
344261847f8eSopenharmony_ci     * @throws { BusinessError } 6613003 - An error occurs when attempting to extract a file with an unsupported media container format
344361847f8eSopenharmony_ci     * or an unsupported media container feature.
344461847f8eSopenharmony_ci     * @throws { BusinessError } 6613004 - Unsupported feature in the media manifest.
344561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
344661847f8eSopenharmony_ci     * @atomicservice
344761847f8eSopenharmony_ci     * @since 13
344861847f8eSopenharmony_ci     */
344961847f8eSopenharmony_ci    on(type: 'castControlParsingError', callback: ErrorCallback): void;
345061847f8eSopenharmony_ci
345161847f8eSopenharmony_ci    /**
345261847f8eSopenharmony_ci     * Unregister listeners for cast control parsing error events.
345361847f8eSopenharmony_ci     * @param { 'castControlParsingError' } type Type of the 'castControlParsingError' to listen for.
345461847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
345561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
345661847f8eSopenharmony_ci     * 2. Incorrect parameter types.
345761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
345861847f8eSopenharmony_ci     * @atomicservice
345961847f8eSopenharmony_ci     * @since 13
346061847f8eSopenharmony_ci     */
346161847f8eSopenharmony_ci    off(type: 'castControlParsingError', callback?: ErrorCallback): void;
346261847f8eSopenharmony_ci
346361847f8eSopenharmony_ci    /**
346461847f8eSopenharmony_ci     * Register listeners for cast control decoding error events.
346561847f8eSopenharmony_ci     * @param { 'castControlDecodingError' } type Type of the 'castControlDecodingError' to listen for.
346661847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
346761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
346861847f8eSopenharmony_ci     * 2. Incorrect parameter types.
346961847f8eSopenharmony_ci     * @throws { BusinessError } 6614000 - Unspecified decoding error.
347061847f8eSopenharmony_ci     * @throws { BusinessError } 6614001 - Decoder initialization failed.
347161847f8eSopenharmony_ci     * @throws { BusinessError } 6614002 - Decoder query failed.
347261847f8eSopenharmony_ci     * @throws { BusinessError } 6614003 - Decoding the media samples failed.
347361847f8eSopenharmony_ci     * @throws { BusinessError } 6614004 - The format of the content to decode exceeds the capabilities of the device.
347461847f8eSopenharmony_ci     * @throws { BusinessError } 6614005 - The format of the content to decode is not supported.
347561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
347661847f8eSopenharmony_ci     * @atomicservice
347761847f8eSopenharmony_ci     * @since 13
347861847f8eSopenharmony_ci     */
347961847f8eSopenharmony_ci    on(type: 'castControlDecodingError', callback: ErrorCallback): void;
348061847f8eSopenharmony_ci
348161847f8eSopenharmony_ci    /**
348261847f8eSopenharmony_ci     * Unregister listeners for cast control decoding error events.
348361847f8eSopenharmony_ci     * @param { 'castControlDecodingError' } type Type of the 'castControlDecodingError' to listen for.
348461847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
348561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
348661847f8eSopenharmony_ci     * 2. Incorrect parameter types.
348761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
348861847f8eSopenharmony_ci     * @atomicservice
348961847f8eSopenharmony_ci     * @since 13
349061847f8eSopenharmony_ci     */
349161847f8eSopenharmony_ci    off(type: 'castControlDecodingError', callback?: ErrorCallback): void;
349261847f8eSopenharmony_ci
349361847f8eSopenharmony_ci    /**
349461847f8eSopenharmony_ci     * Register listeners for cast control audio renderer error error events.
349561847f8eSopenharmony_ci     * @param { 'castControlAudioRendererError' } type Type of the 'castControlAudioRendererError' to listen for.
349661847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
349761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
349861847f8eSopenharmony_ci     * 2. Incorrect parameter types.
349961847f8eSopenharmony_ci     * @throws { BusinessError } 6615000 - Unspecified errors related to the audio renderer.
350061847f8eSopenharmony_ci     * @throws { BusinessError } 6615001 - Initializing the audio renderer failed.
350161847f8eSopenharmony_ci     * @throws { BusinessError } 6615002 - The audio renderer fails to write data.
350261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
350361847f8eSopenharmony_ci     * @atomicservice
350461847f8eSopenharmony_ci     * @since 13
350561847f8eSopenharmony_ci     */
350661847f8eSopenharmony_ci    on(type: 'castControlAudioRendererError', callback: ErrorCallback): void;
350761847f8eSopenharmony_ci
350861847f8eSopenharmony_ci    /**
350961847f8eSopenharmony_ci     * Unregister listeners for cast control audio renderer error events.
351061847f8eSopenharmony_ci     * @param { 'castControlAudioRendererError' } type Type of the 'castControlAudioRendererError' to listen for.
351161847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
351261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
351361847f8eSopenharmony_ci     * 2. Incorrect parameter types.
351461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
351561847f8eSopenharmony_ci     * @atomicservice
351661847f8eSopenharmony_ci     * @since 13
351761847f8eSopenharmony_ci     */
351861847f8eSopenharmony_ci    off(type: 'castControlAudioRendererError', callback?: ErrorCallback): void;
351961847f8eSopenharmony_ci
352061847f8eSopenharmony_ci    /**
352161847f8eSopenharmony_ci     * Register listeners for cast control drm error events.
352261847f8eSopenharmony_ci     * @param { 'castControlDrmError' } type Type of the 'castControlDrmError' to listen for.
352361847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
352461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
352561847f8eSopenharmony_ci     * 2. Incorrect parameter types.
352661847f8eSopenharmony_ci     * @throws { BusinessError } 6616000 - Unspecified error related to DRM.
352761847f8eSopenharmony_ci     * @throws { BusinessError } 6616001 - The chosen DRM protection scheme is not supported by the device.
352861847f8eSopenharmony_ci     * @throws { BusinessError } 6616002 - Device provisioning failed.
352961847f8eSopenharmony_ci     * @throws { BusinessError } 6616003 - The DRM-protected content to play is incompatible.
353061847f8eSopenharmony_ci     * @throws { BusinessError } 6616004 - Failed to obtain a license.
353161847f8eSopenharmony_ci     * @throws { BusinessError } 6616005 - The operation is disallowed by the license policy.
353261847f8eSopenharmony_ci     * @throws { BusinessError } 6616006 - An error occurs in the DRM system.
353361847f8eSopenharmony_ci     * @throws { BusinessError } 6616007 - The device has revoked DRM privileges.
353461847f8eSopenharmony_ci     * @throws { BusinessError } 6616008 - The DRM license being loaded into the open DRM session has expired.
353561847f8eSopenharmony_ci     * @throws { BusinessError } 6616100 - An error occurs when the DRM processes the key response.
353661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
353761847f8eSopenharmony_ci     * @atomicservice
353861847f8eSopenharmony_ci     * @since 13
353961847f8eSopenharmony_ci     */
354061847f8eSopenharmony_ci    on(type: 'castControlDrmError', callback: ErrorCallback): void;
354161847f8eSopenharmony_ci
354261847f8eSopenharmony_ci    /**
354361847f8eSopenharmony_ci     * Unregister listeners for cast control drm error events.
354461847f8eSopenharmony_ci     * @param { 'castControlDrmError' } type Type of the 'castControlDrmError' to listen for.
354561847f8eSopenharmony_ci     * @param { ErrorCallback } callback Callback used to listen for the cast control error event.
354661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter check failed. 1. Mandatory parameters are left unspecified.
354761847f8eSopenharmony_ci     * 2. Incorrect parameter types.
354861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
354961847f8eSopenharmony_ci     * @atomicservice
355061847f8eSopenharmony_ci     * @since 13
355161847f8eSopenharmony_ci     */
355261847f8eSopenharmony_ci    off(type: 'castControlDrmError', callback?: ErrorCallback): void;
355361847f8eSopenharmony_ci
355461847f8eSopenharmony_ci    /**
355561847f8eSopenharmony_ci     * Register listener for drm key request.
355661847f8eSopenharmony_ci     * @param { 'keyRequest' } type - Type of the 'keyRequest' to listen for.
355761847f8eSopenharmony_ci     * @param { KeyRequestCallback } callback - Callback used to request drm key.
355861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
355961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
356061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
356161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
356261847f8eSopenharmony_ci     * @atomicservice
356361847f8eSopenharmony_ci     * @since 12
356461847f8eSopenharmony_ci     */
356561847f8eSopenharmony_ci    on(type: 'keyRequest', callback: KeyRequestCallback): void;
356661847f8eSopenharmony_ci
356761847f8eSopenharmony_ci    /**
356861847f8eSopenharmony_ci     * Unregister listener for drm key request.
356961847f8eSopenharmony_ci     * @param { 'keyRequest' } type - Type of the 'keyRequest' to listen for.
357061847f8eSopenharmony_ci     * @param { KeyRequestCallback } callback - Callback used to request drm key.
357161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
357261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
357361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
357461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
357561847f8eSopenharmony_ci     * @atomicservice
357661847f8eSopenharmony_ci     * @since 12
357761847f8eSopenharmony_ci     */
357861847f8eSopenharmony_ci    off(type: 'keyRequest', callback?: KeyRequestCallback): void;
357961847f8eSopenharmony_ci  }
358061847f8eSopenharmony_ci
358161847f8eSopenharmony_ci  /**
358261847f8eSopenharmony_ci   * The callback of key request.
358361847f8eSopenharmony_ci   *
358461847f8eSopenharmony_ci   * @typedef { function } KeyRequestCallback
358561847f8eSopenharmony_ci   * @param { string } assetId - request key for current assetId
358661847f8eSopenharmony_ci   * @param { Uint8Array } requestData - media key request data sent to media key server
358761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
358861847f8eSopenharmony_ci   * @atomicservice
358961847f8eSopenharmony_ci   * @since 12
359061847f8eSopenharmony_ci   */
359161847f8eSopenharmony_ci  type KeyRequestCallback = (assetId: string, requestData: Uint8Array) => void;
359261847f8eSopenharmony_ci
359361847f8eSopenharmony_ci  /**
359461847f8eSopenharmony_ci   * Enumerates the cast display states.
359561847f8eSopenharmony_ci   *
359661847f8eSopenharmony_ci   * @enum { number }
359761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
359861847f8eSopenharmony_ci   * @atomicservice
359961847f8eSopenharmony_ci   * @since 12
360061847f8eSopenharmony_ci   */
360161847f8eSopenharmony_ci  enum CastDisplayState {
360261847f8eSopenharmony_ci    /**
360361847f8eSopenharmony_ci     * Screen off.
360461847f8eSopenharmony_ci     *
360561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
360661847f8eSopenharmony_ci     * @atomicservice
360761847f8eSopenharmony_ci     * @since 12
360861847f8eSopenharmony_ci     */
360961847f8eSopenharmony_ci    STATE_OFF = 1,
361061847f8eSopenharmony_ci
361161847f8eSopenharmony_ci    /**
361261847f8eSopenharmony_ci     * Screen on.
361361847f8eSopenharmony_ci     *
361461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
361561847f8eSopenharmony_ci     * @atomicservice
361661847f8eSopenharmony_ci     * @since 12
361761847f8eSopenharmony_ci     */
361861847f8eSopenharmony_ci    STATE_ON = 2,
361961847f8eSopenharmony_ci  }
362061847f8eSopenharmony_ci
362161847f8eSopenharmony_ci  /**
362261847f8eSopenharmony_ci   * Define the information for extended display screen.
362361847f8eSopenharmony_ci   * @typedef CastDisplayInfo
362461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
362561847f8eSopenharmony_ci   * @atomicservice
362661847f8eSopenharmony_ci   * @since 12
362761847f8eSopenharmony_ci   */
362861847f8eSopenharmony_ci  interface CastDisplayInfo {
362961847f8eSopenharmony_ci    /**
363061847f8eSopenharmony_ci     * Display ID.
363161847f8eSopenharmony_ci     * The application can get more display information based on the same id from display interface.
363261847f8eSopenharmony_ci     * @type { number }
363361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
363461847f8eSopenharmony_ci     * @atomicservice
363561847f8eSopenharmony_ci     * @since 12
363661847f8eSopenharmony_ci     */
363761847f8eSopenharmony_ci    id: number;
363861847f8eSopenharmony_ci
363961847f8eSopenharmony_ci    /**
364061847f8eSopenharmony_ci     * Display name.
364161847f8eSopenharmony_ci     * @type { string }
364261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
364361847f8eSopenharmony_ci     * @atomicservice
364461847f8eSopenharmony_ci     * @since 12
364561847f8eSopenharmony_ci     */
364661847f8eSopenharmony_ci    name: string;
364761847f8eSopenharmony_ci
364861847f8eSopenharmony_ci    /**
364961847f8eSopenharmony_ci     * The state of display.
365061847f8eSopenharmony_ci     * @type { CastDisplayState }
365161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
365261847f8eSopenharmony_ci     * @atomicservice
365361847f8eSopenharmony_ci     * @since 12
365461847f8eSopenharmony_ci     */
365561847f8eSopenharmony_ci    state: CastDisplayState;
365661847f8eSopenharmony_ci
365761847f8eSopenharmony_ci    /**
365861847f8eSopenharmony_ci     * Display width, in pixels.
365961847f8eSopenharmony_ci     * @type { number }
366061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
366161847f8eSopenharmony_ci     * @atomicservice
366261847f8eSopenharmony_ci     * @since 12
366361847f8eSopenharmony_ci     */
366461847f8eSopenharmony_ci    width: number;
366561847f8eSopenharmony_ci
366661847f8eSopenharmony_ci    /**
366761847f8eSopenharmony_ci     * Display height, in pixels.
366861847f8eSopenharmony_ci     * @type { number }
366961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast
367061847f8eSopenharmony_ci     * @atomicservice
367161847f8eSopenharmony_ci     * @since 12
367261847f8eSopenharmony_ci     */
367361847f8eSopenharmony_ci    height: number;
367461847f8eSopenharmony_ci  }
367561847f8eSopenharmony_ci
367661847f8eSopenharmony_ci  /**
367761847f8eSopenharmony_ci   * Define the device connection state.
367861847f8eSopenharmony_ci   * @enum { number }
367961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
368061847f8eSopenharmony_ci   * @since 10
368161847f8eSopenharmony_ci   */
368261847f8eSopenharmony_ci  /**
368361847f8eSopenharmony_ci   * Define the device connection state.
368461847f8eSopenharmony_ci   * @enum { number }
368561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
368661847f8eSopenharmony_ci   * @atomicservice
368761847f8eSopenharmony_ci   * @since 12
368861847f8eSopenharmony_ci   */
368961847f8eSopenharmony_ci  enum ConnectionState {
369061847f8eSopenharmony_ci    /**
369161847f8eSopenharmony_ci     * A connection state indicating the device is in the process of connecting.
369261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
369361847f8eSopenharmony_ci     * @since 10
369461847f8eSopenharmony_ci     */
369561847f8eSopenharmony_ci    /**
369661847f8eSopenharmony_ci     * A connection state indicating the device is in the process of connecting.
369761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
369861847f8eSopenharmony_ci     * @atomicservice
369961847f8eSopenharmony_ci     * @since 12
370061847f8eSopenharmony_ci     */
370161847f8eSopenharmony_ci    STATE_CONNECTING = 0,
370261847f8eSopenharmony_ci
370361847f8eSopenharmony_ci    /**
370461847f8eSopenharmony_ci     * A connection state indicating the device is connected.
370561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
370661847f8eSopenharmony_ci     * @since 10
370761847f8eSopenharmony_ci     */
370861847f8eSopenharmony_ci    /**
370961847f8eSopenharmony_ci     * A connection state indicating the device is connected.
371061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
371161847f8eSopenharmony_ci     * @atomicservice
371261847f8eSopenharmony_ci     * @since 12
371361847f8eSopenharmony_ci     */
371461847f8eSopenharmony_ci    STATE_CONNECTED = 1,
371561847f8eSopenharmony_ci
371661847f8eSopenharmony_ci    /**
371761847f8eSopenharmony_ci     * The default connection state indicating the device is disconnected.
371861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
371961847f8eSopenharmony_ci     * @since 10
372061847f8eSopenharmony_ci     */
372161847f8eSopenharmony_ci    /**
372261847f8eSopenharmony_ci     * The default connection state indicating the device is disconnected.
372361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
372461847f8eSopenharmony_ci     * @atomicservice
372561847f8eSopenharmony_ci     * @since 12
372661847f8eSopenharmony_ci     */
372761847f8eSopenharmony_ci    STATE_DISCONNECTED = 6,
372861847f8eSopenharmony_ci  }
372961847f8eSopenharmony_ci
373061847f8eSopenharmony_ci  /**
373161847f8eSopenharmony_ci   * The pre-defined display tag by system.
373261847f8eSopenharmony_ci   * @enum { number }
373361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
373461847f8eSopenharmony_ci   * @since 11
373561847f8eSopenharmony_ci   */
373661847f8eSopenharmony_ci  enum DisplayTag {
373761847f8eSopenharmony_ci    /**
373861847f8eSopenharmony_ci     * Indicate the AUDIO VIVID property of current media resource.
373961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
374061847f8eSopenharmony_ci     * @since 11
374161847f8eSopenharmony_ci     */
374261847f8eSopenharmony_ci    TAG_AUDIO_VIVID = 1,
374361847f8eSopenharmony_ci  }
374461847f8eSopenharmony_ci
374561847f8eSopenharmony_ci  /**
374661847f8eSopenharmony_ci   * The play list information definition.
374761847f8eSopenharmony_ci   * @interface AVQueueInfo
374861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
374961847f8eSopenharmony_ci   * @systemapi
375061847f8eSopenharmony_ci   * @since 11
375161847f8eSopenharmony_ci   */
375261847f8eSopenharmony_ci  interface AVQueueInfo {
375361847f8eSopenharmony_ci    /**
375461847f8eSopenharmony_ci     * The bundle name of application which current play list belongs to.
375561847f8eSopenharmony_ci     * @type { string }
375661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
375761847f8eSopenharmony_ci     * @systemapi
375861847f8eSopenharmony_ci     * @since 11
375961847f8eSopenharmony_ci     */
376061847f8eSopenharmony_ci    bundleName: string;
376161847f8eSopenharmony_ci
376261847f8eSopenharmony_ci    /**
376361847f8eSopenharmony_ci     * The name of play list
376461847f8eSopenharmony_ci     * @type { string }
376561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
376661847f8eSopenharmony_ci     * @systemapi
376761847f8eSopenharmony_ci     * @since 11
376861847f8eSopenharmony_ci     */
376961847f8eSopenharmony_ci    avQueueName: string;
377061847f8eSopenharmony_ci
377161847f8eSopenharmony_ci    /**
377261847f8eSopenharmony_ci     * The id of play list
377361847f8eSopenharmony_ci     * @type { string }
377461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
377561847f8eSopenharmony_ci     * @systemapi
377661847f8eSopenharmony_ci     * @since 11
377761847f8eSopenharmony_ci     */
377861847f8eSopenharmony_ci    avQueueId: string;
377961847f8eSopenharmony_ci
378061847f8eSopenharmony_ci    /**
378161847f8eSopenharmony_ci     * The artwork of play list, can be a {@link PixelMap} or a URI formatted string,
378261847f8eSopenharmony_ci     * @type { image.PixelMap | string }
378361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
378461847f8eSopenharmony_ci     * @systemapi
378561847f8eSopenharmony_ci     * @since 11
378661847f8eSopenharmony_ci     */
378761847f8eSopenharmony_ci    avQueueImage: image.PixelMap | string;
378861847f8eSopenharmony_ci
378961847f8eSopenharmony_ci    /**
379061847f8eSopenharmony_ci     * The time when the user last played the playlist.
379161847f8eSopenharmony_ci     * The time format can be system, such as 1611081385000, it means 2021-01-20 02:36:25.
379261847f8eSopenharmony_ci     * @type { ?number }
379361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
379461847f8eSopenharmony_ci     * @systemapi
379561847f8eSopenharmony_ci     * @since 11
379661847f8eSopenharmony_ci     */
379761847f8eSopenharmony_ci    lastPlayedTime?: number;
379861847f8eSopenharmony_ci  }
379961847f8eSopenharmony_ci
380061847f8eSopenharmony_ci  /**
380161847f8eSopenharmony_ci   * The metadata of the current media.Used to set the properties of the current media file
380261847f8eSopenharmony_ci   * @interface AVMetadata
380361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
380461847f8eSopenharmony_ci   * @since 10
380561847f8eSopenharmony_ci   */
380661847f8eSopenharmony_ci  /**
380761847f8eSopenharmony_ci   * The metadata of the current media.Used to set the properties of the current media file
380861847f8eSopenharmony_ci   * @interface AVMetadata
380961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
381061847f8eSopenharmony_ci   * @atomicservice
381161847f8eSopenharmony_ci   * @since 12
381261847f8eSopenharmony_ci   */
381361847f8eSopenharmony_ci  interface AVMetadata {
381461847f8eSopenharmony_ci    /**
381561847f8eSopenharmony_ci     * Unique ID used to represent this media.
381661847f8eSopenharmony_ci     * @type { string }
381761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
381861847f8eSopenharmony_ci     * @since 10
381961847f8eSopenharmony_ci     */
382061847f8eSopenharmony_ci    /**
382161847f8eSopenharmony_ci     * Unique ID used to represent this media.
382261847f8eSopenharmony_ci     * @type { string }
382361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
382461847f8eSopenharmony_ci     * @atomicservice
382561847f8eSopenharmony_ci     * @since 12
382661847f8eSopenharmony_ci     */
382761847f8eSopenharmony_ci    assetId: string;
382861847f8eSopenharmony_ci
382961847f8eSopenharmony_ci    /**
383061847f8eSopenharmony_ci     * The title of this media, for display in media center.
383161847f8eSopenharmony_ci     * @type { ?string }
383261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
383361847f8eSopenharmony_ci     * @since 10
383461847f8eSopenharmony_ci     */
383561847f8eSopenharmony_ci    /**
383661847f8eSopenharmony_ci     * The title of this media, for display in media center.
383761847f8eSopenharmony_ci     * @type { ?string }
383861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
383961847f8eSopenharmony_ci     * @atomicservice
384061847f8eSopenharmony_ci     * @since 12
384161847f8eSopenharmony_ci     */
384261847f8eSopenharmony_ci    title?: string;
384361847f8eSopenharmony_ci
384461847f8eSopenharmony_ci    /**
384561847f8eSopenharmony_ci     * The artist of this media
384661847f8eSopenharmony_ci     * @type { ?string }
384761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
384861847f8eSopenharmony_ci     * @since 10
384961847f8eSopenharmony_ci     */
385061847f8eSopenharmony_ci    /**
385161847f8eSopenharmony_ci     * The artist of this media
385261847f8eSopenharmony_ci     * @type { ?string }
385361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
385461847f8eSopenharmony_ci     * @atomicservice
385561847f8eSopenharmony_ci     * @since 12
385661847f8eSopenharmony_ci     */
385761847f8eSopenharmony_ci    artist?: string;
385861847f8eSopenharmony_ci
385961847f8eSopenharmony_ci    /**
386061847f8eSopenharmony_ci     * The author of this media
386161847f8eSopenharmony_ci     * @type { ?string }
386261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
386361847f8eSopenharmony_ci     * @since 10
386461847f8eSopenharmony_ci     */
386561847f8eSopenharmony_ci    /**
386661847f8eSopenharmony_ci     * The author of this media
386761847f8eSopenharmony_ci     * @type { ?string }
386861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
386961847f8eSopenharmony_ci     * @atomicservice
387061847f8eSopenharmony_ci     * @since 12
387161847f8eSopenharmony_ci     */
387261847f8eSopenharmony_ci    author?: string;
387361847f8eSopenharmony_ci
387461847f8eSopenharmony_ci    /**
387561847f8eSopenharmony_ci     * The name of play list which current media belongs to
387661847f8eSopenharmony_ci     * @type { ?string }
387761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
387861847f8eSopenharmony_ci     * @since 12
387961847f8eSopenharmony_ci     */
388061847f8eSopenharmony_ci    avQueueName?: string;
388161847f8eSopenharmony_ci
388261847f8eSopenharmony_ci    /**
388361847f8eSopenharmony_ci     * The id of play list which current media belongs to, it should be an unique identifier in the application.
388461847f8eSopenharmony_ci     * @type { ?string }
388561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
388661847f8eSopenharmony_ci     * @since 11
388761847f8eSopenharmony_ci     */
388861847f8eSopenharmony_ci    avQueueId?: string;
388961847f8eSopenharmony_ci
389061847f8eSopenharmony_ci    /**
389161847f8eSopenharmony_ci     * The artwork of play list as a {@link PixelMap} or an uri formatted String,
389261847f8eSopenharmony_ci     * @type { ?(image.PixelMap | string) }
389361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
389461847f8eSopenharmony_ci     * @since 11
389561847f8eSopenharmony_ci     */
389661847f8eSopenharmony_ci    avQueueImage?: image.PixelMap | string;
389761847f8eSopenharmony_ci
389861847f8eSopenharmony_ci    /**
389961847f8eSopenharmony_ci     * The album of this media
390061847f8eSopenharmony_ci     * @type { ?string }
390161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
390261847f8eSopenharmony_ci     * @since 10
390361847f8eSopenharmony_ci     */
390461847f8eSopenharmony_ci    /**
390561847f8eSopenharmony_ci     * The album of this media
390661847f8eSopenharmony_ci     * @type { ?string }
390761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
390861847f8eSopenharmony_ci     * @atomicservice
390961847f8eSopenharmony_ci     * @since 12
391061847f8eSopenharmony_ci     */
391161847f8eSopenharmony_ci    album?: string;
391261847f8eSopenharmony_ci
391361847f8eSopenharmony_ci    /**
391461847f8eSopenharmony_ci     * The writer of this media
391561847f8eSopenharmony_ci     * @type { ?string }
391661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
391761847f8eSopenharmony_ci     * @since 10
391861847f8eSopenharmony_ci     */
391961847f8eSopenharmony_ci    /**
392061847f8eSopenharmony_ci     * The writer of this media
392161847f8eSopenharmony_ci     * @type { ?string }
392261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
392361847f8eSopenharmony_ci     * @atomicservice
392461847f8eSopenharmony_ci     * @since 12
392561847f8eSopenharmony_ci     */
392661847f8eSopenharmony_ci    writer?: string;
392761847f8eSopenharmony_ci
392861847f8eSopenharmony_ci    /**
392961847f8eSopenharmony_ci     * The composer of this media
393061847f8eSopenharmony_ci     * @type { ?string }
393161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
393261847f8eSopenharmony_ci     * @since 10
393361847f8eSopenharmony_ci     */
393461847f8eSopenharmony_ci    composer?: string;
393561847f8eSopenharmony_ci
393661847f8eSopenharmony_ci    /**
393761847f8eSopenharmony_ci     * The duration of this media, used to automatically calculate playback position
393861847f8eSopenharmony_ci     * @type { ?number }
393961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
394061847f8eSopenharmony_ci     * @since 10
394161847f8eSopenharmony_ci     */
394261847f8eSopenharmony_ci    /**
394361847f8eSopenharmony_ci     * The duration of this media, used to automatically calculate playback position
394461847f8eSopenharmony_ci     * @type { ?number }
394561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
394661847f8eSopenharmony_ci     * @atomicservice
394761847f8eSopenharmony_ci     * @since 12
394861847f8eSopenharmony_ci     */
394961847f8eSopenharmony_ci    duration?: number;
395061847f8eSopenharmony_ci
395161847f8eSopenharmony_ci    /**
395261847f8eSopenharmony_ci     * The image of the media as a {@link PixelMap} or an uri formatted String,
395361847f8eSopenharmony_ci     * used to display in media center.
395461847f8eSopenharmony_ci     * @type { ?(image.PixelMap | string) }
395561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
395661847f8eSopenharmony_ci     * @since 10
395761847f8eSopenharmony_ci     */
395861847f8eSopenharmony_ci    /**
395961847f8eSopenharmony_ci     * The image of the media as a {@link PixelMap} or an uri formatted String,
396061847f8eSopenharmony_ci     * used to display in media center.
396161847f8eSopenharmony_ci     * @type { ?(image.PixelMap | string) }
396261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
396361847f8eSopenharmony_ci     * @atomicservice
396461847f8eSopenharmony_ci     * @since 12
396561847f8eSopenharmony_ci     */
396661847f8eSopenharmony_ci    mediaImage?: image.PixelMap | string;
396761847f8eSopenharmony_ci
396861847f8eSopenharmony_ci    /**
396961847f8eSopenharmony_ci     * The publishDate of the media
397061847f8eSopenharmony_ci     * @type { ?Date }
397161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
397261847f8eSopenharmony_ci     * @since 10
397361847f8eSopenharmony_ci     */
397461847f8eSopenharmony_ci    publishDate?: Date;
397561847f8eSopenharmony_ci
397661847f8eSopenharmony_ci    /**
397761847f8eSopenharmony_ci     * The subtitle of the media, used for display
397861847f8eSopenharmony_ci     * @type { ?string }
397961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
398061847f8eSopenharmony_ci     * @since 10
398161847f8eSopenharmony_ci     */
398261847f8eSopenharmony_ci    /**
398361847f8eSopenharmony_ci     * The subtitle of the media, used for display
398461847f8eSopenharmony_ci     * @type { ?string }
398561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
398661847f8eSopenharmony_ci     * @atomicservice
398761847f8eSopenharmony_ci     * @since 12
398861847f8eSopenharmony_ci     */
398961847f8eSopenharmony_ci    subtitle?: string;
399061847f8eSopenharmony_ci
399161847f8eSopenharmony_ci    /**
399261847f8eSopenharmony_ci     * The discription of the media, used for display
399361847f8eSopenharmony_ci     * @type { ?string }
399461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
399561847f8eSopenharmony_ci     * @since 10
399661847f8eSopenharmony_ci     */
399761847f8eSopenharmony_ci    /**
399861847f8eSopenharmony_ci     * The discription of the media, used for display
399961847f8eSopenharmony_ci     * @type { ?string }
400061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
400161847f8eSopenharmony_ci     * @atomicservice
400261847f8eSopenharmony_ci     * @since 12
400361847f8eSopenharmony_ci     */
400461847f8eSopenharmony_ci    description?: string;
400561847f8eSopenharmony_ci
400661847f8eSopenharmony_ci    /**
400761847f8eSopenharmony_ci     * The lyric of the media, it should be in standard lyric format
400861847f8eSopenharmony_ci     * @type { ?string }
400961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
401061847f8eSopenharmony_ci     * @since 10
401161847f8eSopenharmony_ci     */
401261847f8eSopenharmony_ci    lyric?: string;
401361847f8eSopenharmony_ci
401461847f8eSopenharmony_ci    /**
401561847f8eSopenharmony_ci     * The previous playable media id.
401661847f8eSopenharmony_ci     * Used to tell the controller if there is a previous playable media
401761847f8eSopenharmony_ci     * @type { ?string }
401861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
401961847f8eSopenharmony_ci     * @since 10
402061847f8eSopenharmony_ci     */
402161847f8eSopenharmony_ci    /**
402261847f8eSopenharmony_ci     * The previous playable media id.
402361847f8eSopenharmony_ci     * Used to tell the controller if there is a previous playable media
402461847f8eSopenharmony_ci     * @type { ?string }
402561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
402661847f8eSopenharmony_ci     * @atomicservice
402761847f8eSopenharmony_ci     * @since 12
402861847f8eSopenharmony_ci     */
402961847f8eSopenharmony_ci    previousAssetId?: string;
403061847f8eSopenharmony_ci
403161847f8eSopenharmony_ci    /**
403261847f8eSopenharmony_ci     * The next playable media id.
403361847f8eSopenharmony_ci     * Used to tell the controller if there is a next playable media
403461847f8eSopenharmony_ci     * @type { ?string }
403561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
403661847f8eSopenharmony_ci     * @since 10
403761847f8eSopenharmony_ci     */
403861847f8eSopenharmony_ci    /**
403961847f8eSopenharmony_ci     * The next playable media id.
404061847f8eSopenharmony_ci     * Used to tell the controller if there is a next playable media
404161847f8eSopenharmony_ci     * @type { ?string }
404261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
404361847f8eSopenharmony_ci     * @atomicservice
404461847f8eSopenharmony_ci     * @since 12
404561847f8eSopenharmony_ci     */
404661847f8eSopenharmony_ci    nextAssetId?: string;
404761847f8eSopenharmony_ci
404861847f8eSopenharmony_ci    /**
404961847f8eSopenharmony_ci     * The protocols supported by this session, if not set, the default is {@link TYPE_CAST_PLUS_STREAM}.
405061847f8eSopenharmony_ci     * See {@link ProtocolType}
405161847f8eSopenharmony_ci     * @type { ?number }
405261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
405361847f8eSopenharmony_ci     * @since 11
405461847f8eSopenharmony_ci     */
405561847f8eSopenharmony_ci    /**
405661847f8eSopenharmony_ci     * The protocols supported by this session, if not set, the default is {@link TYPE_CAST_PLUS_STREAM}.
405761847f8eSopenharmony_ci     * See {@link ProtocolType}
405861847f8eSopenharmony_ci     * @type { ?number }
405961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
406061847f8eSopenharmony_ci     * @atomicservice
406161847f8eSopenharmony_ci     * @since 12
406261847f8eSopenharmony_ci     */
406361847f8eSopenharmony_ci    filter?: number;
406461847f8eSopenharmony_ci
406561847f8eSopenharmony_ci    /**
406661847f8eSopenharmony_ci     * The drm schemes supported by this session which are represented by uuid.
406761847f8eSopenharmony_ci     * @type { ?Array<string> }
406861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
406961847f8eSopenharmony_ci     * @since 12
407061847f8eSopenharmony_ci     */
407161847f8eSopenharmony_ci    drmSchemes?: Array<string>;
407261847f8eSopenharmony_ci
407361847f8eSopenharmony_ci    /**
407461847f8eSopenharmony_ci     * The supported skipIntervals when doing fast forward and rewind operation, the default is {@link SECONDS_15}.
407561847f8eSopenharmony_ci     * See {@link SkipIntervals}
407661847f8eSopenharmony_ci     * @type { ?SkipIntervals }
407761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
407861847f8eSopenharmony_ci     * @since 11
407961847f8eSopenharmony_ci     */
408061847f8eSopenharmony_ci    skipIntervals?: SkipIntervals;
408161847f8eSopenharmony_ci
408261847f8eSopenharmony_ci    /**
408361847f8eSopenharmony_ci     * The display tags supported by application to be displayed on media center
408461847f8eSopenharmony_ci     * @type { ?number }
408561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
408661847f8eSopenharmony_ci     * @since 11
408761847f8eSopenharmony_ci     */
408861847f8eSopenharmony_ci    displayTags?: number;
408961847f8eSopenharmony_ci  }
409061847f8eSopenharmony_ci
409161847f8eSopenharmony_ci  /**
409261847f8eSopenharmony_ci   * The description of the media for an item in the playlist of the session
409361847f8eSopenharmony_ci   * @interface AVMediaDescription
409461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
409561847f8eSopenharmony_ci   * @since 10
409661847f8eSopenharmony_ci   */
409761847f8eSopenharmony_ci  /**
409861847f8eSopenharmony_ci   * The description of the media for an item in the playlist of the session
409961847f8eSopenharmony_ci   * @interface AVMediaDescription
410061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
410161847f8eSopenharmony_ci   * @atomicservice
410261847f8eSopenharmony_ci   * @since 12
410361847f8eSopenharmony_ci   */
410461847f8eSopenharmony_ci  interface AVMediaDescription {
410561847f8eSopenharmony_ci    /**
410661847f8eSopenharmony_ci     * Unique ID used to represent this media.
410761847f8eSopenharmony_ci     * @type { string }
410861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
410961847f8eSopenharmony_ci     * @since 10
411061847f8eSopenharmony_ci     */
411161847f8eSopenharmony_ci    /**
411261847f8eSopenharmony_ci     * Unique ID used to represent this media.
411361847f8eSopenharmony_ci     * @type { string }
411461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
411561847f8eSopenharmony_ci     * @atomicservice
411661847f8eSopenharmony_ci     * @since 12
411761847f8eSopenharmony_ci     */
411861847f8eSopenharmony_ci    assetId: string;
411961847f8eSopenharmony_ci    /**
412061847f8eSopenharmony_ci     * The title of this media, for display in media center.
412161847f8eSopenharmony_ci     * @type { ?string }
412261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
412361847f8eSopenharmony_ci     * @since 10
412461847f8eSopenharmony_ci     */
412561847f8eSopenharmony_ci    /**
412661847f8eSopenharmony_ci     * The title of this media, for display in media center.
412761847f8eSopenharmony_ci     * @type { ?string }
412861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
412961847f8eSopenharmony_ci     * @atomicservice
413061847f8eSopenharmony_ci     * @since 12
413161847f8eSopenharmony_ci     */
413261847f8eSopenharmony_ci    title?: string;
413361847f8eSopenharmony_ci
413461847f8eSopenharmony_ci    /**
413561847f8eSopenharmony_ci     * The subtitle of the media, used for display
413661847f8eSopenharmony_ci     * @type { ?string }
413761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
413861847f8eSopenharmony_ci     * @since 10
413961847f8eSopenharmony_ci     */
414061847f8eSopenharmony_ci    /**
414161847f8eSopenharmony_ci     * The subtitle of the media, used for display
414261847f8eSopenharmony_ci     * @type { ?string }
414361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
414461847f8eSopenharmony_ci     * @atomicservice
414561847f8eSopenharmony_ci     * @since 12
414661847f8eSopenharmony_ci     */
414761847f8eSopenharmony_ci    subtitle?: string;
414861847f8eSopenharmony_ci
414961847f8eSopenharmony_ci    /**
415061847f8eSopenharmony_ci     * The description of this media
415161847f8eSopenharmony_ci     * @type { ?string }
415261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
415361847f8eSopenharmony_ci     * @since 10
415461847f8eSopenharmony_ci     */
415561847f8eSopenharmony_ci    /**
415661847f8eSopenharmony_ci     * The description of this media
415761847f8eSopenharmony_ci     * @type { ?string }
415861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
415961847f8eSopenharmony_ci     * @atomicservice
416061847f8eSopenharmony_ci     * @since 12
416161847f8eSopenharmony_ci     */
416261847f8eSopenharmony_ci    description?: string;
416361847f8eSopenharmony_ci
416461847f8eSopenharmony_ci    /**
416561847f8eSopenharmony_ci     * The image of this media asset displayed in the media center.
416661847f8eSopenharmony_ci     * It can be a {@link PixelMap} or a URI formatted string,
416761847f8eSopenharmony_ci     * @type { ?(image.PixelMap | string) }
416861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
416961847f8eSopenharmony_ci     * @since 10
417061847f8eSopenharmony_ci     */
417161847f8eSopenharmony_ci    /**
417261847f8eSopenharmony_ci     * The image of this media asset displayed in the media center.
417361847f8eSopenharmony_ci     * It can be a {@link PixelMap} or a URI formatted string,
417461847f8eSopenharmony_ci     * @type { ?(image.PixelMap | string) }
417561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
417661847f8eSopenharmony_ci     * @atomicservice
417761847f8eSopenharmony_ci     * @since 12
417861847f8eSopenharmony_ci     */
417961847f8eSopenharmony_ci    mediaImage?: image.PixelMap | string;
418061847f8eSopenharmony_ci    /**
418161847f8eSopenharmony_ci     * Any additional attributes that can be represented as key-value pairs
418261847f8eSopenharmony_ci     * @type { ?object }
418361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
418461847f8eSopenharmony_ci     * @since 10
418561847f8eSopenharmony_ci     */
418661847f8eSopenharmony_ci    extras?: {[key: string]: Object};
418761847f8eSopenharmony_ci
418861847f8eSopenharmony_ci    /**
418961847f8eSopenharmony_ci     * The type of this media, such as video, audio and so on.
419061847f8eSopenharmony_ci     * @type { ?string }
419161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
419261847f8eSopenharmony_ci     * @since 10
419361847f8eSopenharmony_ci     */
419461847f8eSopenharmony_ci    /**
419561847f8eSopenharmony_ci     * The type of this media, such as video, audio and so on.
419661847f8eSopenharmony_ci     * @type { ?string }
419761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
419861847f8eSopenharmony_ci     * @atomicservice
419961847f8eSopenharmony_ci     * @since 12
420061847f8eSopenharmony_ci     */
420161847f8eSopenharmony_ci    mediaType?: string;
420261847f8eSopenharmony_ci
420361847f8eSopenharmony_ci    /**
420461847f8eSopenharmony_ci     * The size of this media.
420561847f8eSopenharmony_ci     * @type { ?number }
420661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
420761847f8eSopenharmony_ci     * @since 10
420861847f8eSopenharmony_ci     */
420961847f8eSopenharmony_ci    /**
421061847f8eSopenharmony_ci     * The size of this media.
421161847f8eSopenharmony_ci     * @type { ?number }
421261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
421361847f8eSopenharmony_ci     * @atomicservice
421461847f8eSopenharmony_ci     * @since 12
421561847f8eSopenharmony_ci     */
421661847f8eSopenharmony_ci    mediaSize?: number;
421761847f8eSopenharmony_ci
421861847f8eSopenharmony_ci    /**
421961847f8eSopenharmony_ci     * The album title of this media
422061847f8eSopenharmony_ci     * @type { ?string }
422161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
422261847f8eSopenharmony_ci     * @since 10
422361847f8eSopenharmony_ci     */
422461847f8eSopenharmony_ci    /**
422561847f8eSopenharmony_ci     * The album title of this media
422661847f8eSopenharmony_ci     * @type { ?string }
422761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
422861847f8eSopenharmony_ci     * @atomicservice
422961847f8eSopenharmony_ci     * @since 12
423061847f8eSopenharmony_ci     */
423161847f8eSopenharmony_ci    albumTitle?: string;
423261847f8eSopenharmony_ci
423361847f8eSopenharmony_ci    /**
423461847f8eSopenharmony_ci     * The album cover uri of this media
423561847f8eSopenharmony_ci     * @type { ?string }
423661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
423761847f8eSopenharmony_ci     * @since 10
423861847f8eSopenharmony_ci     */
423961847f8eSopenharmony_ci    /**
424061847f8eSopenharmony_ci     * The album cover uri of this media
424161847f8eSopenharmony_ci     * @type { ?string }
424261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
424361847f8eSopenharmony_ci     * @atomicservice
424461847f8eSopenharmony_ci     * @since 12
424561847f8eSopenharmony_ci     */
424661847f8eSopenharmony_ci    albumCoverUri?: string;
424761847f8eSopenharmony_ci
424861847f8eSopenharmony_ci    /**
424961847f8eSopenharmony_ci     * The lyric content of the media, it should be in standard lyric format
425061847f8eSopenharmony_ci     * @type { ?string }
425161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
425261847f8eSopenharmony_ci     * @since 10
425361847f8eSopenharmony_ci     */
425461847f8eSopenharmony_ci    /**
425561847f8eSopenharmony_ci     * The lyric content of the media, it should be in standard lyric format
425661847f8eSopenharmony_ci     * @type { ?string }
425761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
425861847f8eSopenharmony_ci     * @atomicservice
425961847f8eSopenharmony_ci     * @since 12
426061847f8eSopenharmony_ci     */
426161847f8eSopenharmony_ci    lyricContent?: string;
426261847f8eSopenharmony_ci
426361847f8eSopenharmony_ci    /**
426461847f8eSopenharmony_ci     * The lyric uri of the media.
426561847f8eSopenharmony_ci     * @type { ?string }
426661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
426761847f8eSopenharmony_ci     * @since 10
426861847f8eSopenharmony_ci     */
426961847f8eSopenharmony_ci    /**
427061847f8eSopenharmony_ci     * The lyric uri of the media.
427161847f8eSopenharmony_ci     * @type { ?string }
427261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
427361847f8eSopenharmony_ci     * @atomicservice
427461847f8eSopenharmony_ci     * @since 12
427561847f8eSopenharmony_ci     */
427661847f8eSopenharmony_ci    lyricUri?: string;
427761847f8eSopenharmony_ci
427861847f8eSopenharmony_ci    /**
427961847f8eSopenharmony_ci     * The artist of this media.
428061847f8eSopenharmony_ci     * @type { ?string }
428161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
428261847f8eSopenharmony_ci     * @since 10
428361847f8eSopenharmony_ci     */
428461847f8eSopenharmony_ci    /**
428561847f8eSopenharmony_ci     * The artist of this media.
428661847f8eSopenharmony_ci     * @type { ?string }
428761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
428861847f8eSopenharmony_ci     * @atomicservice
428961847f8eSopenharmony_ci     * @since 12
429061847f8eSopenharmony_ci     */
429161847f8eSopenharmony_ci    artist?: string;
429261847f8eSopenharmony_ci
429361847f8eSopenharmony_ci    /**
429461847f8eSopenharmony_ci     * The uri of the media, used to locate the media in some special cases
429561847f8eSopenharmony_ci     * @type { ?string }
429661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
429761847f8eSopenharmony_ci     * @since 10
429861847f8eSopenharmony_ci     */
429961847f8eSopenharmony_ci    /**
430061847f8eSopenharmony_ci     * The uri of the media, used to locate the media in some special cases
430161847f8eSopenharmony_ci     * @type { ?string }
430261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
430361847f8eSopenharmony_ci     * @atomicservice
430461847f8eSopenharmony_ci     * @since 12
430561847f8eSopenharmony_ci     */
430661847f8eSopenharmony_ci    mediaUri?: string;
430761847f8eSopenharmony_ci
430861847f8eSopenharmony_ci    /**
430961847f8eSopenharmony_ci     * Media file descriptor.
431061847f8eSopenharmony_ci     * @type { ?media.AVFileDescriptor }
431161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
431261847f8eSopenharmony_ci     * @since 10
431361847f8eSopenharmony_ci     */
431461847f8eSopenharmony_ci    /**
431561847f8eSopenharmony_ci     * Media file descriptor.
431661847f8eSopenharmony_ci     * @type { ?media.AVFileDescriptor }
431761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
431861847f8eSopenharmony_ci     * @atomicservice
431961847f8eSopenharmony_ci     * @since 12
432061847f8eSopenharmony_ci     */
432161847f8eSopenharmony_ci    fdSrc?: media.AVFileDescriptor;
432261847f8eSopenharmony_ci
432361847f8eSopenharmony_ci    /**
432461847f8eSopenharmony_ci     * DataSource descriptor. The caller ensures the fileSize and callback are valid.
432561847f8eSopenharmony_ci     * @type { ?media.AVDataSrcDescriptor }
432661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
432761847f8eSopenharmony_ci     * @since 12
432861847f8eSopenharmony_ci     */
432961847f8eSopenharmony_ci    dataSrc?: media.AVDataSrcDescriptor;
433061847f8eSopenharmony_ci
433161847f8eSopenharmony_ci    /**
433261847f8eSopenharmony_ci     * The drm scheme supported by this resource which is represented by uuid.
433361847f8eSopenharmony_ci     * @type { ?string }
433461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
433561847f8eSopenharmony_ci     * @since 12
433661847f8eSopenharmony_ci     */
433761847f8eSopenharmony_ci    drmScheme?: string;
433861847f8eSopenharmony_ci
433961847f8eSopenharmony_ci    /**
434061847f8eSopenharmony_ci     * The duration of this media
434161847f8eSopenharmony_ci     * @type { ?number }
434261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
434361847f8eSopenharmony_ci     * @since 10
434461847f8eSopenharmony_ci     */
434561847f8eSopenharmony_ci    /**
434661847f8eSopenharmony_ci     * The duration of this media
434761847f8eSopenharmony_ci     * @type { ?number }
434861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
434961847f8eSopenharmony_ci     * @atomicservice
435061847f8eSopenharmony_ci     * @since 12
435161847f8eSopenharmony_ci     */
435261847f8eSopenharmony_ci    duration?: number;
435361847f8eSopenharmony_ci
435461847f8eSopenharmony_ci    /**
435561847f8eSopenharmony_ci     * Media start position, described by milliseconds.
435661847f8eSopenharmony_ci     * @type { ?number }
435761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
435861847f8eSopenharmony_ci     * @since 10
435961847f8eSopenharmony_ci     */
436061847f8eSopenharmony_ci    /**
436161847f8eSopenharmony_ci     * Media start position, described by milliseconds.
436261847f8eSopenharmony_ci     * @type { ?number }
436361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
436461847f8eSopenharmony_ci     * @atomicservice
436561847f8eSopenharmony_ci     * @since 12
436661847f8eSopenharmony_ci     */
436761847f8eSopenharmony_ci    startPosition?: number;
436861847f8eSopenharmony_ci
436961847f8eSopenharmony_ci    /**
437061847f8eSopenharmony_ci     * Media credits position, described by milliseconds.
437161847f8eSopenharmony_ci     * @type { ?number }
437261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
437361847f8eSopenharmony_ci     * @since 10
437461847f8eSopenharmony_ci     */
437561847f8eSopenharmony_ci    /**
437661847f8eSopenharmony_ci     * Media credits position, described by milliseconds.
437761847f8eSopenharmony_ci     * @type { ?number }
437861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
437961847f8eSopenharmony_ci     * @atomicservice
438061847f8eSopenharmony_ci     * @since 12
438161847f8eSopenharmony_ci     */
438261847f8eSopenharmony_ci    creditsPosition?: number;
438361847f8eSopenharmony_ci
438461847f8eSopenharmony_ci    /**
438561847f8eSopenharmony_ci     * Application name.
438661847f8eSopenharmony_ci     * @type { ?string }
438761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
438861847f8eSopenharmony_ci     * @since 10
438961847f8eSopenharmony_ci     */
439061847f8eSopenharmony_ci    /**
439161847f8eSopenharmony_ci     * Application name.
439261847f8eSopenharmony_ci     * @type { ?string }
439361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
439461847f8eSopenharmony_ci     * @atomicservice
439561847f8eSopenharmony_ci     * @since 12
439661847f8eSopenharmony_ci     */
439761847f8eSopenharmony_ci    appName?: string;
439861847f8eSopenharmony_ci
439961847f8eSopenharmony_ci    /**
440061847f8eSopenharmony_ci     * The display tags supported by application to be displayed on media center
440161847f8eSopenharmony_ci     * @type { ?number }
440261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
440361847f8eSopenharmony_ci     * @since 11
440461847f8eSopenharmony_ci     */
440561847f8eSopenharmony_ci    /**
440661847f8eSopenharmony_ci     * The display tags supported by application to be displayed on media center
440761847f8eSopenharmony_ci     * @type { ?number }
440861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
440961847f8eSopenharmony_ci     * @atomicservice
441061847f8eSopenharmony_ci     * @since 12
441161847f8eSopenharmony_ci     */
441261847f8eSopenharmony_ci    displayTags?: number;
441361847f8eSopenharmony_ci  }
441461847f8eSopenharmony_ci
441561847f8eSopenharmony_ci  /**
441661847f8eSopenharmony_ci   * The item in the playlist of the session
441761847f8eSopenharmony_ci   * @interface AVQueueItem
441861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
441961847f8eSopenharmony_ci   * @since 10
442061847f8eSopenharmony_ci   */
442161847f8eSopenharmony_ci  /**
442261847f8eSopenharmony_ci   * The item in the playlist of the session
442361847f8eSopenharmony_ci   * @interface AVQueueItem
442461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
442561847f8eSopenharmony_ci   * @atomicservice
442661847f8eSopenharmony_ci   * @since 12
442761847f8eSopenharmony_ci   */
442861847f8eSopenharmony_ci  interface AVQueueItem {
442961847f8eSopenharmony_ci    /**
443061847f8eSopenharmony_ci     * Sequence number of the item in the playlist.
443161847f8eSopenharmony_ci     * @type { number }
443261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
443361847f8eSopenharmony_ci     * @since 10
443461847f8eSopenharmony_ci     */
443561847f8eSopenharmony_ci    /**
443661847f8eSopenharmony_ci     * Sequence number of the item in the playlist.
443761847f8eSopenharmony_ci     * @type { number }
443861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
443961847f8eSopenharmony_ci     * @atomicservice
444061847f8eSopenharmony_ci     * @since 12
444161847f8eSopenharmony_ci     */
444261847f8eSopenharmony_ci    itemId: number;
444361847f8eSopenharmony_ci
444461847f8eSopenharmony_ci    /**
444561847f8eSopenharmony_ci     * The media description of the item in the playlist.
444661847f8eSopenharmony_ci     * @type { ?AVMediaDescription }
444761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
444861847f8eSopenharmony_ci     * @since 10
444961847f8eSopenharmony_ci     */
445061847f8eSopenharmony_ci    /**
445161847f8eSopenharmony_ci     * The media description of the item in the playlist.
445261847f8eSopenharmony_ci     * @type { ?AVMediaDescription }
445361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
445461847f8eSopenharmony_ci     * @atomicservice
445561847f8eSopenharmony_ci     * @since 12
445661847f8eSopenharmony_ci     */
445761847f8eSopenharmony_ci    description?: AVMediaDescription;
445861847f8eSopenharmony_ci  }
445961847f8eSopenharmony_ci
446061847f8eSopenharmony_ci  /**
446161847f8eSopenharmony_ci   * Used to indicate the playback state of the current media.
446261847f8eSopenharmony_ci   * If the playback state of the media changes, it needs to be updated synchronously
446361847f8eSopenharmony_ci   * @interface AVPlaybackState
446461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
446561847f8eSopenharmony_ci   * @since 10
446661847f8eSopenharmony_ci   */
446761847f8eSopenharmony_ci  /**
446861847f8eSopenharmony_ci   * Used to indicate the playback state of the current media.
446961847f8eSopenharmony_ci   * If the playback state of the media changes, it needs to be updated synchronously
447061847f8eSopenharmony_ci   * @interface AVPlaybackState
447161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
447261847f8eSopenharmony_ci   * @atomicservice
447361847f8eSopenharmony_ci   * @since 12
447461847f8eSopenharmony_ci   */
447561847f8eSopenharmony_ci  interface AVPlaybackState {
447661847f8eSopenharmony_ci    /**
447761847f8eSopenharmony_ci     * Current playback state. See {@link PlaybackState}
447861847f8eSopenharmony_ci     * @type { ?PlaybackState }
447961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
448061847f8eSopenharmony_ci     * @since 10
448161847f8eSopenharmony_ci     */
448261847f8eSopenharmony_ci    /**
448361847f8eSopenharmony_ci     * Current playback state. See {@link PlaybackState}
448461847f8eSopenharmony_ci     * @type { ?PlaybackState }
448561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
448661847f8eSopenharmony_ci     * @atomicservice
448761847f8eSopenharmony_ci     * @since 12
448861847f8eSopenharmony_ci     */
448961847f8eSopenharmony_ci    state?: PlaybackState;
449061847f8eSopenharmony_ci
449161847f8eSopenharmony_ci    /**
449261847f8eSopenharmony_ci     * Current playback speed
449361847f8eSopenharmony_ci     * @type { ?number }
449461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
449561847f8eSopenharmony_ci     * @since 10
449661847f8eSopenharmony_ci     */
449761847f8eSopenharmony_ci    /**
449861847f8eSopenharmony_ci     * Current playback speed
449961847f8eSopenharmony_ci     * @type { ?number }
450061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
450161847f8eSopenharmony_ci     * @atomicservice
450261847f8eSopenharmony_ci     * @since 12
450361847f8eSopenharmony_ci     */
450461847f8eSopenharmony_ci    speed?: number;
450561847f8eSopenharmony_ci
450661847f8eSopenharmony_ci    /**
450761847f8eSopenharmony_ci     * Current playback position of this media. See {@link PlaybackPosition}
450861847f8eSopenharmony_ci     * @type { ?PlaybackPosition }
450961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
451061847f8eSopenharmony_ci     * @since 10
451161847f8eSopenharmony_ci     */
451261847f8eSopenharmony_ci    /**
451361847f8eSopenharmony_ci     * Current playback position of this media. See {@link PlaybackPosition}
451461847f8eSopenharmony_ci     * @type { ?PlaybackPosition }
451561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
451661847f8eSopenharmony_ci     * @atomicservice
451761847f8eSopenharmony_ci     * @since 12
451861847f8eSopenharmony_ci     */
451961847f8eSopenharmony_ci    position?: PlaybackPosition;
452061847f8eSopenharmony_ci
452161847f8eSopenharmony_ci    /**
452261847f8eSopenharmony_ci     * The current buffered time, the maximum playable position
452361847f8eSopenharmony_ci     * @type { ?number }
452461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
452561847f8eSopenharmony_ci     * @since 10
452661847f8eSopenharmony_ci     */
452761847f8eSopenharmony_ci    /**
452861847f8eSopenharmony_ci     * The current buffered time, the maximum playable position
452961847f8eSopenharmony_ci     * @type { ?number }
453061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
453161847f8eSopenharmony_ci     * @atomicservice
453261847f8eSopenharmony_ci     * @since 12
453361847f8eSopenharmony_ci     */
453461847f8eSopenharmony_ci    bufferedTime?: number;
453561847f8eSopenharmony_ci
453661847f8eSopenharmony_ci    /**
453761847f8eSopenharmony_ci     * Current playback loop mode. See {@link LoopMode}
453861847f8eSopenharmony_ci     * @type { ?LoopMode }
453961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
454061847f8eSopenharmony_ci     * @since 10
454161847f8eSopenharmony_ci     */
454261847f8eSopenharmony_ci    /**
454361847f8eSopenharmony_ci     * Current playback loop mode. See {@link LoopMode}
454461847f8eSopenharmony_ci     * @type { ?LoopMode }
454561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
454661847f8eSopenharmony_ci     * @atomicservice
454761847f8eSopenharmony_ci     * @since 12
454861847f8eSopenharmony_ci     */
454961847f8eSopenharmony_ci    loopMode?: LoopMode;
455061847f8eSopenharmony_ci
455161847f8eSopenharmony_ci    /**
455261847f8eSopenharmony_ci     * Current Favorite Status
455361847f8eSopenharmony_ci     * @type { ?boolean }
455461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
455561847f8eSopenharmony_ci     * @since 10
455661847f8eSopenharmony_ci     */
455761847f8eSopenharmony_ci    /**
455861847f8eSopenharmony_ci     * Current Favorite Status
455961847f8eSopenharmony_ci     * @type { ?boolean }
456061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
456161847f8eSopenharmony_ci     * @atomicservice
456261847f8eSopenharmony_ci     * @since 12
456361847f8eSopenharmony_ci     */
456461847f8eSopenharmony_ci    isFavorite?: boolean;
456561847f8eSopenharmony_ci
456661847f8eSopenharmony_ci    /**
456761847f8eSopenharmony_ci     * Current active item id
456861847f8eSopenharmony_ci     * @type { ?number }
456961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
457061847f8eSopenharmony_ci     * @since 10
457161847f8eSopenharmony_ci     */
457261847f8eSopenharmony_ci    /**
457361847f8eSopenharmony_ci     * Current active item id
457461847f8eSopenharmony_ci     * @type { ?number }
457561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
457661847f8eSopenharmony_ci     * @atomicservice
457761847f8eSopenharmony_ci     * @since 12
457861847f8eSopenharmony_ci     */
457961847f8eSopenharmony_ci    activeItemId?: number;
458061847f8eSopenharmony_ci
458161847f8eSopenharmony_ci    /**
458261847f8eSopenharmony_ci     * Current player volume
458361847f8eSopenharmony_ci     * @type { ?number }
458461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
458561847f8eSopenharmony_ci     * @since 10
458661847f8eSopenharmony_ci     */
458761847f8eSopenharmony_ci    /**
458861847f8eSopenharmony_ci     * Current player volume
458961847f8eSopenharmony_ci     * @type { ?number }
459061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
459161847f8eSopenharmony_ci     * @atomicservice
459261847f8eSopenharmony_ci     * @since 12
459361847f8eSopenharmony_ci     */
459461847f8eSopenharmony_ci    volume?: number;
459561847f8eSopenharmony_ci
459661847f8eSopenharmony_ci    /**
459761847f8eSopenharmony_ci     * maximum  volume
459861847f8eSopenharmony_ci     * @type { ?number }
459961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
460061847f8eSopenharmony_ci     * @since 11
460161847f8eSopenharmony_ci     */
460261847f8eSopenharmony_ci    /**
460361847f8eSopenharmony_ci     * maximum  volume
460461847f8eSopenharmony_ci     * @type { ?number }
460561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
460661847f8eSopenharmony_ci     * @atomicservice
460761847f8eSopenharmony_ci     * @since 12
460861847f8eSopenharmony_ci     */
460961847f8eSopenharmony_ci    maxVolume?: number;
461061847f8eSopenharmony_ci
461161847f8eSopenharmony_ci    /**
461261847f8eSopenharmony_ci     * Current muted status
461361847f8eSopenharmony_ci     * @type { ?boolean }
461461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
461561847f8eSopenharmony_ci     * @since 11
461661847f8eSopenharmony_ci     */
461761847f8eSopenharmony_ci    /**
461861847f8eSopenharmony_ci     * Current muted status
461961847f8eSopenharmony_ci     * @type { ?boolean }
462061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
462161847f8eSopenharmony_ci     * @atomicservice
462261847f8eSopenharmony_ci     * @since 12
462361847f8eSopenharmony_ci     */
462461847f8eSopenharmony_ci    muted?: boolean;
462561847f8eSopenharmony_ci
462661847f8eSopenharmony_ci    /**
462761847f8eSopenharmony_ci     * The duration of this media asset.
462861847f8eSopenharmony_ci     * @type { ?number }
462961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
463061847f8eSopenharmony_ci     * @since 11
463161847f8eSopenharmony_ci     */
463261847f8eSopenharmony_ci    duration?: number;
463361847f8eSopenharmony_ci
463461847f8eSopenharmony_ci    /**
463561847f8eSopenharmony_ci     * The video width of this media asset.
463661847f8eSopenharmony_ci     * @type { ?number }
463761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
463861847f8eSopenharmony_ci     * @since 11
463961847f8eSopenharmony_ci     */
464061847f8eSopenharmony_ci    /**
464161847f8eSopenharmony_ci     * The video width of this media asset.
464261847f8eSopenharmony_ci     * @type { ?number }
464361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
464461847f8eSopenharmony_ci     * @atomicservice
464561847f8eSopenharmony_ci     * @since 12
464661847f8eSopenharmony_ci     */
464761847f8eSopenharmony_ci    videoWidth?: number;
464861847f8eSopenharmony_ci
464961847f8eSopenharmony_ci    /**
465061847f8eSopenharmony_ci     * The video height of this media asset.
465161847f8eSopenharmony_ci     * @type { ?number }
465261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
465361847f8eSopenharmony_ci     * @since 11
465461847f8eSopenharmony_ci     */
465561847f8eSopenharmony_ci    /**
465661847f8eSopenharmony_ci     * The video height of this media asset.
465761847f8eSopenharmony_ci     * @type { ?number }
465861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
465961847f8eSopenharmony_ci     * @atomicservice
466061847f8eSopenharmony_ci     * @since 12
466161847f8eSopenharmony_ci     */
466261847f8eSopenharmony_ci    videoHeight?: number;
466361847f8eSopenharmony_ci
466461847f8eSopenharmony_ci    /**
466561847f8eSopenharmony_ci     * Current custom media packets
466661847f8eSopenharmony_ci     * @type { ?object }
466761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
466861847f8eSopenharmony_ci     * @since 10
466961847f8eSopenharmony_ci     */
467061847f8eSopenharmony_ci    /**
467161847f8eSopenharmony_ci     * Current custom media packets
467261847f8eSopenharmony_ci     * @type { ?object }
467361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
467461847f8eSopenharmony_ci     * @atomicservice
467561847f8eSopenharmony_ci     * @since 12
467661847f8eSopenharmony_ci     */
467761847f8eSopenharmony_ci    extras?: {[key: string]: Object};
467861847f8eSopenharmony_ci  }
467961847f8eSopenharmony_ci
468061847f8eSopenharmony_ci  /**
468161847f8eSopenharmony_ci   * Playback position definition
468261847f8eSopenharmony_ci   * @interface PlaybackPosition
468361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
468461847f8eSopenharmony_ci   * @since 10
468561847f8eSopenharmony_ci   */
468661847f8eSopenharmony_ci  /**
468761847f8eSopenharmony_ci   * Playback position definition
468861847f8eSopenharmony_ci   * @interface PlaybackPosition
468961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
469061847f8eSopenharmony_ci   * @atomicservice
469161847f8eSopenharmony_ci   * @since 12
469261847f8eSopenharmony_ci   */
469361847f8eSopenharmony_ci  interface PlaybackPosition {
469461847f8eSopenharmony_ci    /**
469561847f8eSopenharmony_ci     * Elapsed time(position) of this media set by the app.
469661847f8eSopenharmony_ci     * @type { number }
469761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
469861847f8eSopenharmony_ci     * @since 10
469961847f8eSopenharmony_ci     */
470061847f8eSopenharmony_ci    /**
470161847f8eSopenharmony_ci     * Elapsed time(position) of this media set by the app.
470261847f8eSopenharmony_ci     * @type { number }
470361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
470461847f8eSopenharmony_ci     * @atomicservice
470561847f8eSopenharmony_ci     * @since 12
470661847f8eSopenharmony_ci     */
470761847f8eSopenharmony_ci    elapsedTime: number;
470861847f8eSopenharmony_ci
470961847f8eSopenharmony_ci    /**
471061847f8eSopenharmony_ci     * Record the system time when elapsedTime is set.
471161847f8eSopenharmony_ci     * @type { number }
471261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
471361847f8eSopenharmony_ci     * @since 10
471461847f8eSopenharmony_ci     */
471561847f8eSopenharmony_ci    /**
471661847f8eSopenharmony_ci     * Record the system time when elapsedTime is set.
471761847f8eSopenharmony_ci     * @type { number }
471861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
471961847f8eSopenharmony_ci     * @atomicservice
472061847f8eSopenharmony_ci     * @since 12
472161847f8eSopenharmony_ci     */
472261847f8eSopenharmony_ci    updateTime: number;
472361847f8eSopenharmony_ci  }
472461847f8eSopenharmony_ci
472561847f8eSopenharmony_ci  /**
472661847f8eSopenharmony_ci   * The metadata of the current call.
472761847f8eSopenharmony_ci   * @interface CallMetadata
472861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
472961847f8eSopenharmony_ci   * @since 11
473061847f8eSopenharmony_ci   */
473161847f8eSopenharmony_ci  /**
473261847f8eSopenharmony_ci   * The metadata of the current call.
473361847f8eSopenharmony_ci   * @typedef CallMetadata
473461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
473561847f8eSopenharmony_ci   * @atomicservice
473661847f8eSopenharmony_ci   * @since 12
473761847f8eSopenharmony_ci   */
473861847f8eSopenharmony_ci  interface CallMetadata {
473961847f8eSopenharmony_ci    /**
474061847f8eSopenharmony_ci     * The displayed user name of current call.
474161847f8eSopenharmony_ci     * @type { ?string }
474261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
474361847f8eSopenharmony_ci     * @since 11
474461847f8eSopenharmony_ci     */
474561847f8eSopenharmony_ci    /**
474661847f8eSopenharmony_ci     * The displayed user name of current call.
474761847f8eSopenharmony_ci     * @type { ?string }
474861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
474961847f8eSopenharmony_ci     * @atomicservice
475061847f8eSopenharmony_ci     * @since 12
475161847f8eSopenharmony_ci     */
475261847f8eSopenharmony_ci    name?: string;
475361847f8eSopenharmony_ci
475461847f8eSopenharmony_ci    /**
475561847f8eSopenharmony_ci     * The phone number of current call.
475661847f8eSopenharmony_ci     * @type { ?string }
475761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
475861847f8eSopenharmony_ci     * @since 11
475961847f8eSopenharmony_ci     */
476061847f8eSopenharmony_ci    /**
476161847f8eSopenharmony_ci     * The phone number of current call.
476261847f8eSopenharmony_ci     * @type { ?string }
476361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
476461847f8eSopenharmony_ci     * @atomicservice
476561847f8eSopenharmony_ci     * @since 12
476661847f8eSopenharmony_ci     */
476761847f8eSopenharmony_ci    phoneNumber?: string;
476861847f8eSopenharmony_ci
476961847f8eSopenharmony_ci    /**
477061847f8eSopenharmony_ci     * The displayed picture that represents a particular user.
477161847f8eSopenharmony_ci     * @type { ?image.PixelMap }
477261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
477361847f8eSopenharmony_ci     * @since 11
477461847f8eSopenharmony_ci     */
477561847f8eSopenharmony_ci    /**
477661847f8eSopenharmony_ci     * The displayed picture that represents a particular user.
477761847f8eSopenharmony_ci     * @type { ?image.PixelMap }
477861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
477961847f8eSopenharmony_ci     * @atomicservice
478061847f8eSopenharmony_ci     * @since 12
478161847f8eSopenharmony_ci     */
478261847f8eSopenharmony_ci    avatar?: image.PixelMap;
478361847f8eSopenharmony_ci  }
478461847f8eSopenharmony_ci
478561847f8eSopenharmony_ci  /**
478661847f8eSopenharmony_ci   * Used to indicate the call state of the current call.
478761847f8eSopenharmony_ci   * @interface AVCallState
478861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
478961847f8eSopenharmony_ci   * @since 11
479061847f8eSopenharmony_ci   */
479161847f8eSopenharmony_ci  /**
479261847f8eSopenharmony_ci   * Used to indicate the call state of the current call.
479361847f8eSopenharmony_ci   * @typedef AVCallState
479461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
479561847f8eSopenharmony_ci   * @atomicservice
479661847f8eSopenharmony_ci   * @since 12
479761847f8eSopenharmony_ci   */
479861847f8eSopenharmony_ci  interface AVCallState {
479961847f8eSopenharmony_ci    /**
480061847f8eSopenharmony_ci     * Current call state. See {@link CallState}
480161847f8eSopenharmony_ci     * @type { CallState }
480261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
480361847f8eSopenharmony_ci     * @since 11
480461847f8eSopenharmony_ci     */
480561847f8eSopenharmony_ci    /**
480661847f8eSopenharmony_ci     * Current call state. See {@link CallState}
480761847f8eSopenharmony_ci     * @type { CallState }
480861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
480961847f8eSopenharmony_ci     * @atomicservice
481061847f8eSopenharmony_ci     * @since 12
481161847f8eSopenharmony_ci     */
481261847f8eSopenharmony_ci    state: CallState;
481361847f8eSopenharmony_ci
481461847f8eSopenharmony_ci    /**
481561847f8eSopenharmony_ci     * Current muted status.
481661847f8eSopenharmony_ci     * @type { boolean }
481761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
481861847f8eSopenharmony_ci     * @since 11
481961847f8eSopenharmony_ci     */
482061847f8eSopenharmony_ci    /**
482161847f8eSopenharmony_ci     * Current muted status.
482261847f8eSopenharmony_ci     * @type { boolean }
482361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
482461847f8eSopenharmony_ci     * @atomicservice
482561847f8eSopenharmony_ci     * @since 12
482661847f8eSopenharmony_ci     */
482761847f8eSopenharmony_ci    muted: boolean;
482861847f8eSopenharmony_ci  }
482961847f8eSopenharmony_ci
483061847f8eSopenharmony_ci  /**
483161847f8eSopenharmony_ci   * Enumeration of current call state
483261847f8eSopenharmony_ci   * @enum { number }
483361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
483461847f8eSopenharmony_ci   * @since 11
483561847f8eSopenharmony_ci   */
483661847f8eSopenharmony_ci  /**
483761847f8eSopenharmony_ci   * Enumeration of current call state
483861847f8eSopenharmony_ci   * @enum { number }
483961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
484061847f8eSopenharmony_ci   * @atomicservice
484161847f8eSopenharmony_ci   * @since 12
484261847f8eSopenharmony_ci   */
484361847f8eSopenharmony_ci  enum CallState {
484461847f8eSopenharmony_ci    /**
484561847f8eSopenharmony_ci     * Idle state.
484661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
484761847f8eSopenharmony_ci     * @since 11
484861847f8eSopenharmony_ci     */
484961847f8eSopenharmony_ci    /**
485061847f8eSopenharmony_ci     * Idle state.
485161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
485261847f8eSopenharmony_ci     * @atomicservice
485361847f8eSopenharmony_ci     * @since 12
485461847f8eSopenharmony_ci     */
485561847f8eSopenharmony_ci    CALL_STATE_IDLE = 0,
485661847f8eSopenharmony_ci
485761847f8eSopenharmony_ci    /**
485861847f8eSopenharmony_ci     * Incoming state.
485961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
486061847f8eSopenharmony_ci     * @since 11
486161847f8eSopenharmony_ci     */
486261847f8eSopenharmony_ci    /**
486361847f8eSopenharmony_ci     * Incoming state.
486461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
486561847f8eSopenharmony_ci     * @atomicservice
486661847f8eSopenharmony_ci     * @since 12
486761847f8eSopenharmony_ci     */
486861847f8eSopenharmony_ci    CALL_STATE_INCOMING = 1,
486961847f8eSopenharmony_ci
487061847f8eSopenharmony_ci    /**
487161847f8eSopenharmony_ci     * Active state in calling.
487261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
487361847f8eSopenharmony_ci     * @since 11
487461847f8eSopenharmony_ci     */
487561847f8eSopenharmony_ci    /**
487661847f8eSopenharmony_ci     * Active state in calling.
487761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
487861847f8eSopenharmony_ci     * @atomicservice
487961847f8eSopenharmony_ci     * @since 12
488061847f8eSopenharmony_ci     */
488161847f8eSopenharmony_ci    CALL_STATE_ACTIVE = 2,
488261847f8eSopenharmony_ci
488361847f8eSopenharmony_ci    /**
488461847f8eSopenharmony_ci     * Dialing state.
488561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
488661847f8eSopenharmony_ci     * @since 11
488761847f8eSopenharmony_ci     */
488861847f8eSopenharmony_ci    /**
488961847f8eSopenharmony_ci     * Dialing state.
489061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
489161847f8eSopenharmony_ci     * @atomicservice
489261847f8eSopenharmony_ci     * @since 12
489361847f8eSopenharmony_ci     */
489461847f8eSopenharmony_ci    CALL_STATE_DIALING = 3,
489561847f8eSopenharmony_ci
489661847f8eSopenharmony_ci    /**
489761847f8eSopenharmony_ci     * Waiting state.
489861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
489961847f8eSopenharmony_ci     * @since 11
490061847f8eSopenharmony_ci     */
490161847f8eSopenharmony_ci    /**
490261847f8eSopenharmony_ci     * Waiting state.
490361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
490461847f8eSopenharmony_ci     * @atomicservice
490561847f8eSopenharmony_ci     * @since 12
490661847f8eSopenharmony_ci     */
490761847f8eSopenharmony_ci    CALL_STATE_WAITING = 4,
490861847f8eSopenharmony_ci
490961847f8eSopenharmony_ci    /**
491061847f8eSopenharmony_ci     * Holding state.
491161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
491261847f8eSopenharmony_ci     * @since 11
491361847f8eSopenharmony_ci     */
491461847f8eSopenharmony_ci    /**
491561847f8eSopenharmony_ci     * Holding state.
491661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
491761847f8eSopenharmony_ci     * @atomicservice
491861847f8eSopenharmony_ci     * @since 12
491961847f8eSopenharmony_ci     */
492061847f8eSopenharmony_ci    CALL_STATE_HOLDING = 5,
492161847f8eSopenharmony_ci
492261847f8eSopenharmony_ci    /**
492361847f8eSopenharmony_ci     * Disconnecting state.
492461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
492561847f8eSopenharmony_ci     * @since 11
492661847f8eSopenharmony_ci     */
492761847f8eSopenharmony_ci    /**
492861847f8eSopenharmony_ci     * Disconnecting state.
492961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
493061847f8eSopenharmony_ci     * @atomicservice
493161847f8eSopenharmony_ci     * @since 12
493261847f8eSopenharmony_ci     */
493361847f8eSopenharmony_ci    CALL_STATE_DISCONNECTING = 6,
493461847f8eSopenharmony_ci  }
493561847f8eSopenharmony_ci
493661847f8eSopenharmony_ci  /**
493761847f8eSopenharmony_ci   * cast category indicating different playback scenes
493861847f8eSopenharmony_ci   * @enum { number }
493961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
494061847f8eSopenharmony_ci   * @since 10
494161847f8eSopenharmony_ci   */
494261847f8eSopenharmony_ci  /**
494361847f8eSopenharmony_ci   * cast category indicating different playback scenes
494461847f8eSopenharmony_ci   * @enum { number }
494561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.AVCast
494661847f8eSopenharmony_ci   * @atomicservice
494761847f8eSopenharmony_ci   * @since 12
494861847f8eSopenharmony_ci   */
494961847f8eSopenharmony_ci  enum AVCastCategory {
495061847f8eSopenharmony_ci    /**
495161847f8eSopenharmony_ci     * The default cast type "local", media can be routed on the same device, 
495261847f8eSopenharmony_ci     * including internal speakers or audio jack on the device itself, A2DP devices.
495361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
495461847f8eSopenharmony_ci     * @since 10
495561847f8eSopenharmony_ci     */
495661847f8eSopenharmony_ci    /**
495761847f8eSopenharmony_ci     * The default cast type "local", media can be routed on the same device, 
495861847f8eSopenharmony_ci     * including internal speakers or audio jack on the device itself, A2DP devices.
495961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
496061847f8eSopenharmony_ci     * @atomicservice
496161847f8eSopenharmony_ci     * @since 12
496261847f8eSopenharmony_ci     */
496361847f8eSopenharmony_ci    CATEGORY_LOCAL = 0,
496461847f8eSopenharmony_ci
496561847f8eSopenharmony_ci    /**
496661847f8eSopenharmony_ci     * The remote category indicating the media is presenting on a remote device,
496761847f8eSopenharmony_ci     * the application needs to get an AVCastController to control remote playback.
496861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
496961847f8eSopenharmony_ci     * @since 10
497061847f8eSopenharmony_ci     */
497161847f8eSopenharmony_ci    /**
497261847f8eSopenharmony_ci     * The remote category indicating the media is presenting on a remote device,
497361847f8eSopenharmony_ci     * the application needs to get an AVCastController to control remote playback.
497461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
497561847f8eSopenharmony_ci     * @atomicservice
497661847f8eSopenharmony_ci     * @since 12
497761847f8eSopenharmony_ci     */
497861847f8eSopenharmony_ci    CATEGORY_REMOTE = 1,
497961847f8eSopenharmony_ci  }
498061847f8eSopenharmony_ci  /**
498161847f8eSopenharmony_ci   * Device type definition
498261847f8eSopenharmony_ci   * @enum { number }
498361847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
498461847f8eSopenharmony_ci   * @since 10
498561847f8eSopenharmony_ci   */
498661847f8eSopenharmony_ci  /**
498761847f8eSopenharmony_ci   * Device type definition
498861847f8eSopenharmony_ci   * @enum { number }
498961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
499061847f8eSopenharmony_ci   * @atomicservice
499161847f8eSopenharmony_ci   * @since 12
499261847f8eSopenharmony_ci   */
499361847f8eSopenharmony_ci  enum DeviceType {
499461847f8eSopenharmony_ci    /**
499561847f8eSopenharmony_ci     * A device type indicating the route is on internal speakers or audio jack on the device itself.
499661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
499761847f8eSopenharmony_ci     * @since 10
499861847f8eSopenharmony_ci     */
499961847f8eSopenharmony_ci    /**
500061847f8eSopenharmony_ci     * A device type indicating the route is on internal speakers or audio jack on the device itself.
500161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
500261847f8eSopenharmony_ci     * @atomicservice
500361847f8eSopenharmony_ci     * @since 12
500461847f8eSopenharmony_ci     */
500561847f8eSopenharmony_ci    DEVICE_TYPE_LOCAL = 0,
500661847f8eSopenharmony_ci
500761847f8eSopenharmony_ci    /**
500861847f8eSopenharmony_ci     * A device type indicating the route is on a TV.
500961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
501061847f8eSopenharmony_ci     * @since 10
501161847f8eSopenharmony_ci     */
501261847f8eSopenharmony_ci    /**
501361847f8eSopenharmony_ci     * A device type indicating the route is on a TV.
501461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
501561847f8eSopenharmony_ci     * @atomicservice
501661847f8eSopenharmony_ci     * @since 12
501761847f8eSopenharmony_ci     */
501861847f8eSopenharmony_ci    DEVICE_TYPE_TV = 2,
501961847f8eSopenharmony_ci
502061847f8eSopenharmony_ci    /**
502161847f8eSopenharmony_ci     * A device type indicating the route is on a smart speaker.
502261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
502361847f8eSopenharmony_ci     * @since 10
502461847f8eSopenharmony_ci     */
502561847f8eSopenharmony_ci    /**
502661847f8eSopenharmony_ci     * A device type indicating the route is on a smart speaker.
502761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
502861847f8eSopenharmony_ci     * @atomicservice
502961847f8eSopenharmony_ci     * @since 12
503061847f8eSopenharmony_ci     */
503161847f8eSopenharmony_ci    DEVICE_TYPE_SMART_SPEAKER = 3,
503261847f8eSopenharmony_ci
503361847f8eSopenharmony_ci    /**
503461847f8eSopenharmony_ci     * A device type indicating the route is on a bluetooth device.
503561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
503661847f8eSopenharmony_ci     * @since 10
503761847f8eSopenharmony_ci     */
503861847f8eSopenharmony_ci    /**
503961847f8eSopenharmony_ci     * A device type indicating the route is on a bluetooth device.
504061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
504161847f8eSopenharmony_ci     * @atomicservice
504261847f8eSopenharmony_ci     * @since 12
504361847f8eSopenharmony_ci     */
504461847f8eSopenharmony_ci    DEVICE_TYPE_BLUETOOTH = 10,
504561847f8eSopenharmony_ci  }
504661847f8eSopenharmony_ci
504761847f8eSopenharmony_ci  /**
504861847f8eSopenharmony_ci   * Device Information Definition
504961847f8eSopenharmony_ci   * @interface DeviceInfo
505061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
505161847f8eSopenharmony_ci   * @since 10
505261847f8eSopenharmony_ci   */
505361847f8eSopenharmony_ci  /**
505461847f8eSopenharmony_ci   * Device Information Definition
505561847f8eSopenharmony_ci   * @interface DeviceInfo
505661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
505761847f8eSopenharmony_ci   * @atomicservice
505861847f8eSopenharmony_ci   * @since 12
505961847f8eSopenharmony_ci   */
506061847f8eSopenharmony_ci  interface DeviceInfo {
506161847f8eSopenharmony_ci    /**
506261847f8eSopenharmony_ci     * The playback type supported by the device. See {@link AVCastCategory}
506361847f8eSopenharmony_ci     * @type { AVCastCategory }
506461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
506561847f8eSopenharmony_ci     * @since 10
506661847f8eSopenharmony_ci     */
506761847f8eSopenharmony_ci    /**
506861847f8eSopenharmony_ci     * The playback type supported by the device. See {@link AVCastCategory}
506961847f8eSopenharmony_ci     * @type { AVCastCategory }
507061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
507161847f8eSopenharmony_ci     * @atomicservice
507261847f8eSopenharmony_ci     * @since 12
507361847f8eSopenharmony_ci     */
507461847f8eSopenharmony_ci    castCategory: AVCastCategory;
507561847f8eSopenharmony_ci    /**
507661847f8eSopenharmony_ci     * Audio device id.The length of the audioDeviceId array is greater than 1
507761847f8eSopenharmony_ci     * if output to multiple devices at the same time.
507861847f8eSopenharmony_ci     * @type { string }
507961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
508061847f8eSopenharmony_ci     * @since 10
508161847f8eSopenharmony_ci     */
508261847f8eSopenharmony_ci    /**
508361847f8eSopenharmony_ci     * Audio device id.The length of the audioDeviceId array is greater than 1
508461847f8eSopenharmony_ci     * if output to multiple devices at the same time.
508561847f8eSopenharmony_ci     * @type { string }
508661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
508761847f8eSopenharmony_ci     * @atomicservice
508861847f8eSopenharmony_ci     * @since 12
508961847f8eSopenharmony_ci     */
509061847f8eSopenharmony_ci    deviceId: string;
509161847f8eSopenharmony_ci
509261847f8eSopenharmony_ci    /**
509361847f8eSopenharmony_ci     * Device name. The length of the deviceName array is greater than 1
509461847f8eSopenharmony_ci     * if output to multiple devices at the same time.
509561847f8eSopenharmony_ci     * @type { string }
509661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
509761847f8eSopenharmony_ci     * @since 10
509861847f8eSopenharmony_ci     */
509961847f8eSopenharmony_ci    /**
510061847f8eSopenharmony_ci     * Device name. The length of the deviceName array is greater than 1
510161847f8eSopenharmony_ci     * if output to multiple devices at the same time.
510261847f8eSopenharmony_ci     * @type { string }
510361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
510461847f8eSopenharmony_ci     * @atomicservice
510561847f8eSopenharmony_ci     * @since 12
510661847f8eSopenharmony_ci     */
510761847f8eSopenharmony_ci    deviceName: string;
510861847f8eSopenharmony_ci
510961847f8eSopenharmony_ci    /**
511061847f8eSopenharmony_ci     * device type.
511161847f8eSopenharmony_ci     * @type { DeviceType }
511261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
511361847f8eSopenharmony_ci     * @since 10
511461847f8eSopenharmony_ci     */
511561847f8eSopenharmony_ci    /**
511661847f8eSopenharmony_ci     * device type.
511761847f8eSopenharmony_ci     * @type { DeviceType }
511861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
511961847f8eSopenharmony_ci     * @atomicservice
512061847f8eSopenharmony_ci     * @since 12
512161847f8eSopenharmony_ci     */
512261847f8eSopenharmony_ci    deviceType: DeviceType;
512361847f8eSopenharmony_ci
512461847f8eSopenharmony_ci    /**
512561847f8eSopenharmony_ci     * Device manufacturer.
512661847f8eSopenharmony_ci     * @type { ?string }
512761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
512861847f8eSopenharmony_ci     * @atomicservice
512961847f8eSopenharmony_ci     * @since 13
513061847f8eSopenharmony_ci     */
513161847f8eSopenharmony_ci    manufacturer?: string;
513261847f8eSopenharmony_ci
513361847f8eSopenharmony_ci    /**
513461847f8eSopenharmony_ci     * Device model name.
513561847f8eSopenharmony_ci     * @type { ?string }
513661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
513761847f8eSopenharmony_ci     * @atomicservice
513861847f8eSopenharmony_ci     * @since 13
513961847f8eSopenharmony_ci     */
514061847f8eSopenharmony_ci    modelName?: string;
514161847f8eSopenharmony_ci
514261847f8eSopenharmony_ci    /**
514361847f8eSopenharmony_ci     * Network id.
514461847f8eSopenharmony_ci     * @type { ?string }
514561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
514661847f8eSopenharmony_ci     * @systemapi
514761847f8eSopenharmony_ci     * @since 13
514861847f8eSopenharmony_ci     */
514961847f8eSopenharmony_ci    networkId?: string;
515061847f8eSopenharmony_ci
515161847f8eSopenharmony_ci    /**
515261847f8eSopenharmony_ci     * device ip address if available.
515361847f8eSopenharmony_ci     * @type { ?string }
515461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
515561847f8eSopenharmony_ci     * @systemapi
515661847f8eSopenharmony_ci     * @since 10
515761847f8eSopenharmony_ci     */
515861847f8eSopenharmony_ci    ipAddress?: string;
515961847f8eSopenharmony_ci
516061847f8eSopenharmony_ci    /**
516161847f8eSopenharmony_ci     * device provider which supplies the route capability.
516261847f8eSopenharmony_ci     * @type { ?number }
516361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
516461847f8eSopenharmony_ci     * @systemapi
516561847f8eSopenharmony_ci     * @since 10
516661847f8eSopenharmony_ci     */
516761847f8eSopenharmony_ci    providerId?: number;
516861847f8eSopenharmony_ci
516961847f8eSopenharmony_ci    /**
517061847f8eSopenharmony_ci     * The protocols supported by current device, can be union of {@link ProtocolType}.
517161847f8eSopenharmony_ci     * @type { ?number }
517261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
517361847f8eSopenharmony_ci     * @since 11
517461847f8eSopenharmony_ci     */
517561847f8eSopenharmony_ci    /**
517661847f8eSopenharmony_ci     * The protocols supported by current device, can be union of {@link ProtocolType}.
517761847f8eSopenharmony_ci     * @type { ?number }
517861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
517961847f8eSopenharmony_ci     * @atomicservice
518061847f8eSopenharmony_ci     * @since 12
518161847f8eSopenharmony_ci     */
518261847f8eSopenharmony_ci    supportedProtocols?: number;
518361847f8eSopenharmony_ci
518461847f8eSopenharmony_ci    /**
518561847f8eSopenharmony_ci     * The drm capability supported by current device, each drm is represented by uuid.
518661847f8eSopenharmony_ci     * @type { ?Array<string> }
518761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
518861847f8eSopenharmony_ci     * @atomicservice
518961847f8eSopenharmony_ci     * @since 12
519061847f8eSopenharmony_ci     */
519161847f8eSopenharmony_ci    supportedDrmCapabilities?: Array<string>;
519261847f8eSopenharmony_ci
519361847f8eSopenharmony_ci    /**
519461847f8eSopenharmony_ci     * Define different authentication status.
519561847f8eSopenharmony_ci     * 0: Device not authenticated.
519661847f8eSopenharmony_ci     * 1: Device already authenticated.
519761847f8eSopenharmony_ci     * @type { ?number }
519861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
519961847f8eSopenharmony_ci     * @systemapi
520061847f8eSopenharmony_ci     * @since 11
520161847f8eSopenharmony_ci     */
520261847f8eSopenharmony_ci    authenticationStatus?: number;
520361847f8eSopenharmony_ci
520461847f8eSopenharmony_ci    /**
520561847f8eSopenharmony_ci     * Indicates the current device is legacy or not.
520661847f8eSopenharmony_ci     * @type { ?boolean }
520761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
520861847f8eSopenharmony_ci     * @systemapi
520961847f8eSopenharmony_ci     * @since 13
521061847f8eSopenharmony_ci     */
521161847f8eSopenharmony_ci    isLegacy?: boolean;
521261847f8eSopenharmony_ci
521361847f8eSopenharmony_ci    /**
521461847f8eSopenharmony_ci     * Medium types used to discover devices.
521561847f8eSopenharmony_ci     * 1: BLE
521661847f8eSopenharmony_ci     * 2: COAP
521761847f8eSopenharmony_ci     * @type { ?number }
521861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
521961847f8eSopenharmony_ci     * @systemapi
522061847f8eSopenharmony_ci     * @since 13
522161847f8eSopenharmony_ci     */
522261847f8eSopenharmony_ci    mediumTypes?: number;
522361847f8eSopenharmony_ci  }
522461847f8eSopenharmony_ci
522561847f8eSopenharmony_ci  /**
522661847f8eSopenharmony_ci   * Target Device Information Definition
522761847f8eSopenharmony_ci   * @interface OutputDeviceInfo
522861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
522961847f8eSopenharmony_ci   * @since 10
523061847f8eSopenharmony_ci   */
523161847f8eSopenharmony_ci  /**
523261847f8eSopenharmony_ci   * Target Device Information Definition
523361847f8eSopenharmony_ci   * @interface OutputDeviceInfo
523461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
523561847f8eSopenharmony_ci   * @atomicservice
523661847f8eSopenharmony_ci   * @since 12
523761847f8eSopenharmony_ci   */
523861847f8eSopenharmony_ci  interface OutputDeviceInfo {
523961847f8eSopenharmony_ci    /**
524061847f8eSopenharmony_ci     * Arrays of device information
524161847f8eSopenharmony_ci     * @type { Array<DeviceInfo> }
524261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
524361847f8eSopenharmony_ci     * @since 10
524461847f8eSopenharmony_ci     */
524561847f8eSopenharmony_ci    /**
524661847f8eSopenharmony_ci     * Arrays of device information
524761847f8eSopenharmony_ci     * @type { Array<DeviceInfo> }
524861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
524961847f8eSopenharmony_ci     * @atomicservice
525061847f8eSopenharmony_ci     * @since 12
525161847f8eSopenharmony_ci     */
525261847f8eSopenharmony_ci    devices: Array<DeviceInfo>;
525361847f8eSopenharmony_ci  }
525461847f8eSopenharmony_ci
525561847f8eSopenharmony_ci  /**
525661847f8eSopenharmony_ci   * Loop Play Mode Definition
525761847f8eSopenharmony_ci   * @enum { number }
525861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
525961847f8eSopenharmony_ci   * @since 10
526061847f8eSopenharmony_ci   */
526161847f8eSopenharmony_ci  /**
526261847f8eSopenharmony_ci   * Loop Play Mode Definition
526361847f8eSopenharmony_ci   * @enum { number }
526461847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
526561847f8eSopenharmony_ci   * @atomicservice
526661847f8eSopenharmony_ci   * @since 12
526761847f8eSopenharmony_ci   */
526861847f8eSopenharmony_ci  enum LoopMode {
526961847f8eSopenharmony_ci    /**
527061847f8eSopenharmony_ci     * The default mode is sequential playback
527161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
527261847f8eSopenharmony_ci     * @since 10
527361847f8eSopenharmony_ci     */
527461847f8eSopenharmony_ci    /**
527561847f8eSopenharmony_ci     * The default mode is sequential playback
527661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
527761847f8eSopenharmony_ci     * @atomicservice
527861847f8eSopenharmony_ci     * @since 12
527961847f8eSopenharmony_ci     */
528061847f8eSopenharmony_ci    LOOP_MODE_SEQUENCE = 0,
528161847f8eSopenharmony_ci
528261847f8eSopenharmony_ci    /**
528361847f8eSopenharmony_ci     * Single loop mode
528461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
528561847f8eSopenharmony_ci     * @since 10
528661847f8eSopenharmony_ci     */
528761847f8eSopenharmony_ci    /**
528861847f8eSopenharmony_ci     * Single loop mode
528961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
529061847f8eSopenharmony_ci     * @atomicservice
529161847f8eSopenharmony_ci     * @since 12
529261847f8eSopenharmony_ci     */
529361847f8eSopenharmony_ci    LOOP_MODE_SINGLE = 1,
529461847f8eSopenharmony_ci
529561847f8eSopenharmony_ci    /**
529661847f8eSopenharmony_ci     * List loop mode
529761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
529861847f8eSopenharmony_ci     * @since 10
529961847f8eSopenharmony_ci     */
530061847f8eSopenharmony_ci    /**
530161847f8eSopenharmony_ci     * List loop mode
530261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
530361847f8eSopenharmony_ci     * @atomicservice
530461847f8eSopenharmony_ci     * @since 12
530561847f8eSopenharmony_ci     */
530661847f8eSopenharmony_ci    LOOP_MODE_LIST = 2,
530761847f8eSopenharmony_ci
530861847f8eSopenharmony_ci    /**
530961847f8eSopenharmony_ci     * Shuffle playback mode
531061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
531161847f8eSopenharmony_ci     * @since 10
531261847f8eSopenharmony_ci     */
531361847f8eSopenharmony_ci    /**
531461847f8eSopenharmony_ci     * Shuffle playback mode
531561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
531661847f8eSopenharmony_ci     * @atomicservice
531761847f8eSopenharmony_ci     * @since 12
531861847f8eSopenharmony_ci     */
531961847f8eSopenharmony_ci    LOOP_MODE_SHUFFLE = 3,
532061847f8eSopenharmony_ci
532161847f8eSopenharmony_ci    /**
532261847f8eSopenharmony_ci     * Custom playback mode supported by application
532361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
532461847f8eSopenharmony_ci     * @since 11
532561847f8eSopenharmony_ci     */
532661847f8eSopenharmony_ci    /**
532761847f8eSopenharmony_ci     * Custom playback mode supported by application
532861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
532961847f8eSopenharmony_ci     * @atomicservice
533061847f8eSopenharmony_ci     * @since 12
533161847f8eSopenharmony_ci     */
533261847f8eSopenharmony_ci    LOOP_MODE_CUSTOM = 4,
533361847f8eSopenharmony_ci  }
533461847f8eSopenharmony_ci
533561847f8eSopenharmony_ci  /**
533661847f8eSopenharmony_ci   * Supported skip intervals definition
533761847f8eSopenharmony_ci   * @enum { number }
533861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
533961847f8eSopenharmony_ci   * @since 11
534061847f8eSopenharmony_ci   */
534161847f8eSopenharmony_ci  enum SkipIntervals {
534261847f8eSopenharmony_ci    /**
534361847f8eSopenharmony_ci     * 10 seconds
534461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
534561847f8eSopenharmony_ci     * @since 11
534661847f8eSopenharmony_ci     */
534761847f8eSopenharmony_ci    SECONDS_10 = 10,
534861847f8eSopenharmony_ci    /**
534961847f8eSopenharmony_ci     * 15 seconds
535061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
535161847f8eSopenharmony_ci     * @since 11
535261847f8eSopenharmony_ci     */
535361847f8eSopenharmony_ci    SECONDS_15 = 15,
535461847f8eSopenharmony_ci    /**
535561847f8eSopenharmony_ci     * 30 seconds
535661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
535761847f8eSopenharmony_ci     * @since 11
535861847f8eSopenharmony_ci     */
535961847f8eSopenharmony_ci    SECONDS_30 = 30,
536061847f8eSopenharmony_ci  }
536161847f8eSopenharmony_ci
536261847f8eSopenharmony_ci  /**
536361847f8eSopenharmony_ci   * Definition of current playback state
536461847f8eSopenharmony_ci   * @enum { number }
536561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
536661847f8eSopenharmony_ci   * @since 10
536761847f8eSopenharmony_ci   */
536861847f8eSopenharmony_ci  /**
536961847f8eSopenharmony_ci   * Definition of current playback state
537061847f8eSopenharmony_ci   * @enum { number }
537161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
537261847f8eSopenharmony_ci   * @atomicservice
537361847f8eSopenharmony_ci   * @since 12
537461847f8eSopenharmony_ci   */
537561847f8eSopenharmony_ci  enum PlaybackState {
537661847f8eSopenharmony_ci    /**
537761847f8eSopenharmony_ci     * Initial state. The initial state of media file
537861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
537961847f8eSopenharmony_ci     * @since 10
538061847f8eSopenharmony_ci     */
538161847f8eSopenharmony_ci    /**
538261847f8eSopenharmony_ci     * Initial state. The initial state of media file
538361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
538461847f8eSopenharmony_ci     * @atomicservice
538561847f8eSopenharmony_ci     * @since 12
538661847f8eSopenharmony_ci     */
538761847f8eSopenharmony_ci    PLAYBACK_STATE_INITIAL = 0,
538861847f8eSopenharmony_ci
538961847f8eSopenharmony_ci    /**
539061847f8eSopenharmony_ci     * Preparing state. Indicates that the media file is not ready to play,
539161847f8eSopenharmony_ci     * the media is loading or buffering
539261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
539361847f8eSopenharmony_ci     * @since 10
539461847f8eSopenharmony_ci     */
539561847f8eSopenharmony_ci    /**
539661847f8eSopenharmony_ci     * Preparing state. Indicates that the media file is not ready to play,
539761847f8eSopenharmony_ci     * the media is loading or buffering
539861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
539961847f8eSopenharmony_ci     * @atomicservice
540061847f8eSopenharmony_ci     * @since 12
540161847f8eSopenharmony_ci     */
540261847f8eSopenharmony_ci    PLAYBACK_STATE_PREPARE = 1,
540361847f8eSopenharmony_ci
540461847f8eSopenharmony_ci    /**
540561847f8eSopenharmony_ci     * Playing state.
540661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
540761847f8eSopenharmony_ci     * @since 10
540861847f8eSopenharmony_ci     */
540961847f8eSopenharmony_ci    /**
541061847f8eSopenharmony_ci     * Playing state.
541161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
541261847f8eSopenharmony_ci     * @atomicservice
541361847f8eSopenharmony_ci     * @since 12
541461847f8eSopenharmony_ci     */
541561847f8eSopenharmony_ci    PLAYBACK_STATE_PLAY = 2,
541661847f8eSopenharmony_ci
541761847f8eSopenharmony_ci    /**
541861847f8eSopenharmony_ci     * Paused state.
541961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
542061847f8eSopenharmony_ci     * @since 10
542161847f8eSopenharmony_ci     */
542261847f8eSopenharmony_ci    /**
542361847f8eSopenharmony_ci     * Paused state.
542461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
542561847f8eSopenharmony_ci     * @atomicservice
542661847f8eSopenharmony_ci     * @since 12
542761847f8eSopenharmony_ci     */
542861847f8eSopenharmony_ci    PLAYBACK_STATE_PAUSE = 3,
542961847f8eSopenharmony_ci
543061847f8eSopenharmony_ci    /**
543161847f8eSopenharmony_ci     * Fast forwarding state.
543261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
543361847f8eSopenharmony_ci     * @since 10
543461847f8eSopenharmony_ci     */
543561847f8eSopenharmony_ci    /**
543661847f8eSopenharmony_ci     * Fast forwarding state.
543761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
543861847f8eSopenharmony_ci     * @atomicservice
543961847f8eSopenharmony_ci     * @since 12
544061847f8eSopenharmony_ci     */
544161847f8eSopenharmony_ci    PLAYBACK_STATE_FAST_FORWARD = 4,
544261847f8eSopenharmony_ci
544361847f8eSopenharmony_ci    /**
544461847f8eSopenharmony_ci     * Rewinding state.
544561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
544661847f8eSopenharmony_ci     * @since 10
544761847f8eSopenharmony_ci     */
544861847f8eSopenharmony_ci    /**
544961847f8eSopenharmony_ci     * Rewinding state.
545061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
545161847f8eSopenharmony_ci     * @atomicservice
545261847f8eSopenharmony_ci     * @since 12
545361847f8eSopenharmony_ci     */
545461847f8eSopenharmony_ci    PLAYBACK_STATE_REWIND = 5,
545561847f8eSopenharmony_ci
545661847f8eSopenharmony_ci    /**
545761847f8eSopenharmony_ci     * Stopped state.The server will clear the media playback position and other information.
545861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
545961847f8eSopenharmony_ci     * @since 10
546061847f8eSopenharmony_ci     */
546161847f8eSopenharmony_ci    /**
546261847f8eSopenharmony_ci     * Stopped state.The server will clear the media playback position and other information.
546361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
546461847f8eSopenharmony_ci     * @atomicservice
546561847f8eSopenharmony_ci     * @since 12
546661847f8eSopenharmony_ci     */
546761847f8eSopenharmony_ci    PLAYBACK_STATE_STOP = 6,
546861847f8eSopenharmony_ci
546961847f8eSopenharmony_ci    /**
547061847f8eSopenharmony_ci     * Completed state.
547161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
547261847f8eSopenharmony_ci     * @since 10
547361847f8eSopenharmony_ci     */
547461847f8eSopenharmony_ci    /**
547561847f8eSopenharmony_ci     * Completed state.
547661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
547761847f8eSopenharmony_ci     * @atomicservice
547861847f8eSopenharmony_ci     * @since 12
547961847f8eSopenharmony_ci     */
548061847f8eSopenharmony_ci    PLAYBACK_STATE_COMPLETED = 7,
548161847f8eSopenharmony_ci
548261847f8eSopenharmony_ci    /**
548361847f8eSopenharmony_ci     * Released state.
548461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
548561847f8eSopenharmony_ci     * @since 10
548661847f8eSopenharmony_ci     */
548761847f8eSopenharmony_ci    /**
548861847f8eSopenharmony_ci     * Released state.
548961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
549061847f8eSopenharmony_ci     * @atomicservice
549161847f8eSopenharmony_ci     * @since 12
549261847f8eSopenharmony_ci     */
549361847f8eSopenharmony_ci    PLAYBACK_STATE_RELEASED = 8,
549461847f8eSopenharmony_ci
549561847f8eSopenharmony_ci    /**
549661847f8eSopenharmony_ci     * error state.
549761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
549861847f8eSopenharmony_ci     * @since 10
549961847f8eSopenharmony_ci     */
550061847f8eSopenharmony_ci    /**
550161847f8eSopenharmony_ci     * error state.
550261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
550361847f8eSopenharmony_ci     * @atomicservice
550461847f8eSopenharmony_ci     * @since 12
550561847f8eSopenharmony_ci     */
550661847f8eSopenharmony_ci    PLAYBACK_STATE_ERROR = 9,
550761847f8eSopenharmony_ci
550861847f8eSopenharmony_ci    /**
550961847f8eSopenharmony_ci     * Idle state.
551061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
551161847f8eSopenharmony_ci     * @since 11
551261847f8eSopenharmony_ci     */
551361847f8eSopenharmony_ci    /**
551461847f8eSopenharmony_ci     * Idle state.
551561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
551661847f8eSopenharmony_ci     * @atomicservice
551761847f8eSopenharmony_ci     * @since 12
551861847f8eSopenharmony_ci     */
551961847f8eSopenharmony_ci    PLAYBACK_STATE_IDLE = 10,
552061847f8eSopenharmony_ci
552161847f8eSopenharmony_ci    /**
552261847f8eSopenharmony_ci     * Buffering state.
552361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
552461847f8eSopenharmony_ci     * @since 11
552561847f8eSopenharmony_ci     */
552661847f8eSopenharmony_ci    /**
552761847f8eSopenharmony_ci     * Buffering state.
552861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
552961847f8eSopenharmony_ci     * @atomicservice
553061847f8eSopenharmony_ci     * @since 12
553161847f8eSopenharmony_ci     */
553261847f8eSopenharmony_ci    PLAYBACK_STATE_BUFFERING = 11,
553361847f8eSopenharmony_ci  }
553461847f8eSopenharmony_ci
553561847f8eSopenharmony_ci  /**
553661847f8eSopenharmony_ci   * The description of the session
553761847f8eSopenharmony_ci   * @interface AVSessionDescriptor
553861847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Manager
553961847f8eSopenharmony_ci   * @systemapi
554061847f8eSopenharmony_ci   * @since 9
554161847f8eSopenharmony_ci   */
554261847f8eSopenharmony_ci  interface AVSessionDescriptor {
554361847f8eSopenharmony_ci    /**
554461847f8eSopenharmony_ci     * Unique ID of the session
554561847f8eSopenharmony_ci     * @type { string }
554661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Manager
554761847f8eSopenharmony_ci     * @systemapi
554861847f8eSopenharmony_ci     * @since 9
554961847f8eSopenharmony_ci     */
555061847f8eSopenharmony_ci    sessionId: string;
555161847f8eSopenharmony_ci
555261847f8eSopenharmony_ci    /**
555361847f8eSopenharmony_ci     * Session type, currently supports audio or video
555461847f8eSopenharmony_ci     * @type { AVSessionType }
555561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Manager
555661847f8eSopenharmony_ci     * @systemapi
555761847f8eSopenharmony_ci     * @since 9
555861847f8eSopenharmony_ci     */
555961847f8eSopenharmony_ci    type: AVSessionType;
556061847f8eSopenharmony_ci
556161847f8eSopenharmony_ci    /**
556261847f8eSopenharmony_ci     * The session tag set by the application
556361847f8eSopenharmony_ci     * @type { string }
556461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Manager
556561847f8eSopenharmony_ci     * @systemapi
556661847f8eSopenharmony_ci     * @since 9
556761847f8eSopenharmony_ci     */
556861847f8eSopenharmony_ci    sessionTag: string;
556961847f8eSopenharmony_ci
557061847f8eSopenharmony_ci    /**
557161847f8eSopenharmony_ci     * The elementName of the ability that created this session. See {@link ElementName} in bundle/elementName.d.ts
557261847f8eSopenharmony_ci     * @type { ElementName }
557361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Manager
557461847f8eSopenharmony_ci     * @systemapi
557561847f8eSopenharmony_ci     * @since 9
557661847f8eSopenharmony_ci     */
557761847f8eSopenharmony_ci    elementName: ElementName;
557861847f8eSopenharmony_ci
557961847f8eSopenharmony_ci    /**
558061847f8eSopenharmony_ci     * Session active state
558161847f8eSopenharmony_ci     * @type { boolean }
558261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Manager
558361847f8eSopenharmony_ci     * @systemapi
558461847f8eSopenharmony_ci     * @since 9
558561847f8eSopenharmony_ci     */
558661847f8eSopenharmony_ci    isActive: boolean;
558761847f8eSopenharmony_ci
558861847f8eSopenharmony_ci    /**
558961847f8eSopenharmony_ci     * Is it the top priority session
559061847f8eSopenharmony_ci     * @type { boolean }
559161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Manager
559261847f8eSopenharmony_ci     * @systemapi
559361847f8eSopenharmony_ci     * @since 9
559461847f8eSopenharmony_ci     */
559561847f8eSopenharmony_ci    isTopSession: boolean;
559661847f8eSopenharmony_ci
559761847f8eSopenharmony_ci    /**
559861847f8eSopenharmony_ci     * The current output device information.
559961847f8eSopenharmony_ci     * It will be undefined if this is a local session.
560061847f8eSopenharmony_ci     * @type { OutputDeviceInfo }
560161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Manager
560261847f8eSopenharmony_ci     * @systemapi
560361847f8eSopenharmony_ci     * @since 9
560461847f8eSopenharmony_ci     */
560561847f8eSopenharmony_ci    outputDevice: OutputDeviceInfo;
560661847f8eSopenharmony_ci  }
560761847f8eSopenharmony_ci
560861847f8eSopenharmony_ci  /**
560961847f8eSopenharmony_ci   * Session controller,used to control media playback and get media information
561061847f8eSopenharmony_ci   * @interface AVSessionController
561161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
561261847f8eSopenharmony_ci   * @since 10
561361847f8eSopenharmony_ci   */
561461847f8eSopenharmony_ci  /**
561561847f8eSopenharmony_ci   * Session controller,used to control media playback and get media information
561661847f8eSopenharmony_ci   * @typedef AVSessionController
561761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
561861847f8eSopenharmony_ci   * @atomicservice
561961847f8eSopenharmony_ci   * @since 12
562061847f8eSopenharmony_ci   */
562161847f8eSopenharmony_ci  interface AVSessionController {
562261847f8eSopenharmony_ci    /**
562361847f8eSopenharmony_ci     * Unique session Id
562461847f8eSopenharmony_ci     * @type { string }
562561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
562661847f8eSopenharmony_ci     * @since 10
562761847f8eSopenharmony_ci     */
562861847f8eSopenharmony_ci    /**
562961847f8eSopenharmony_ci     * Unique session Id
563061847f8eSopenharmony_ci     * @type { string }
563161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
563261847f8eSopenharmony_ci     * @atomicservice
563361847f8eSopenharmony_ci     * @since 12
563461847f8eSopenharmony_ci     */
563561847f8eSopenharmony_ci    readonly sessionId: string;
563661847f8eSopenharmony_ci
563761847f8eSopenharmony_ci    /**
563861847f8eSopenharmony_ci     * Get the playback status of the current session
563961847f8eSopenharmony_ci     * @param { AsyncCallback<AVPlaybackState> } callback - The triggered asyncCallback when (getAVPlaybackState).
564061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
564161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
564261847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
564361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
564461847f8eSopenharmony_ci     * @since 10
564561847f8eSopenharmony_ci     */
564661847f8eSopenharmony_ci    getAVPlaybackState(callback: AsyncCallback<AVPlaybackState>): void;
564761847f8eSopenharmony_ci
564861847f8eSopenharmony_ci    /**
564961847f8eSopenharmony_ci     * Get the playback status of the current session
565061847f8eSopenharmony_ci     * @returns { Promise<AVPlaybackState> } (AVPlaybackState) returned through promise
565161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
565261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
565361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
565461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
565561847f8eSopenharmony_ci     * @since 10
565661847f8eSopenharmony_ci     */
565761847f8eSopenharmony_ci    /**
565861847f8eSopenharmony_ci     * Get the playback status of the current session
565961847f8eSopenharmony_ci     * @returns { Promise<AVPlaybackState> } (AVPlaybackState) returned through promise
566061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
566161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
566261847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
566361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
566461847f8eSopenharmony_ci     * @atomicservice
566561847f8eSopenharmony_ci     * @since 12
566661847f8eSopenharmony_ci     */
566761847f8eSopenharmony_ci    getAVPlaybackState(): Promise<AVPlaybackState>;
566861847f8eSopenharmony_ci
566961847f8eSopenharmony_ci    /**
567061847f8eSopenharmony_ci     * Get the playback status of the current session
567161847f8eSopenharmony_ci     * @returns { AVPlaybackState } (AVPlaybackState) returned
567261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
567361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
567461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
567561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
567661847f8eSopenharmony_ci     * @since 10
567761847f8eSopenharmony_ci     */
567861847f8eSopenharmony_ci    /**
567961847f8eSopenharmony_ci     * Get the playback status of the current session
568061847f8eSopenharmony_ci     * @returns { AVPlaybackState } (AVPlaybackState) returned
568161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
568261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
568361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
568461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
568561847f8eSopenharmony_ci     * @atomicservice
568661847f8eSopenharmony_ci     * @since 12
568761847f8eSopenharmony_ci     */
568861847f8eSopenharmony_ci    getAVPlaybackStateSync(): AVPlaybackState;
568961847f8eSopenharmony_ci
569061847f8eSopenharmony_ci    /**
569161847f8eSopenharmony_ci     * Get the metadata of the current session
569261847f8eSopenharmony_ci     * @param { AsyncCallback<AVMetadata> } callback - The triggered asyncCallback when (getAVMetadata).
569361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
569461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
569561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
569661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
569761847f8eSopenharmony_ci     * @since 10
569861847f8eSopenharmony_ci     */
569961847f8eSopenharmony_ci    getAVMetadata(callback: AsyncCallback<AVMetadata>): void;
570061847f8eSopenharmony_ci
570161847f8eSopenharmony_ci    /**
570261847f8eSopenharmony_ci     * Get the metadata of the current session
570361847f8eSopenharmony_ci     * @returns { Promise<AVMetadata> } (AVMetadata) returned through promise
570461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
570561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
570661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
570761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
570861847f8eSopenharmony_ci     * @since 10
570961847f8eSopenharmony_ci     */
571061847f8eSopenharmony_ci    /**
571161847f8eSopenharmony_ci     * Get the metadata of the current session
571261847f8eSopenharmony_ci     * @returns { Promise<AVMetadata> } (AVMetadata) returned through promise
571361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
571461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
571561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
571661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
571761847f8eSopenharmony_ci     * @atomicservice
571861847f8eSopenharmony_ci     * @since 12
571961847f8eSopenharmony_ci     */
572061847f8eSopenharmony_ci    getAVMetadata(): Promise<AVMetadata>;
572161847f8eSopenharmony_ci
572261847f8eSopenharmony_ci    /**
572361847f8eSopenharmony_ci     * Get the metadata of the current session
572461847f8eSopenharmony_ci     * @returns { AVMetadata } (AVMetadata) returned
572561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
572661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
572761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
572861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
572961847f8eSopenharmony_ci     * @since 10
573061847f8eSopenharmony_ci     */
573161847f8eSopenharmony_ci    /**
573261847f8eSopenharmony_ci     * Get the metadata of the current session
573361847f8eSopenharmony_ci     * @returns { AVMetadata } (AVMetadata) returned
573461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
573561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
573661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
573761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
573861847f8eSopenharmony_ci     * @atomicservice
573961847f8eSopenharmony_ci     * @since 12
574061847f8eSopenharmony_ci     */
574161847f8eSopenharmony_ci    getAVMetadataSync(): AVMetadata;
574261847f8eSopenharmony_ci
574361847f8eSopenharmony_ci    /**
574461847f8eSopenharmony_ci     * Get the call status of the current session
574561847f8eSopenharmony_ci     * @param { AsyncCallback<AVCallState> } callback - The triggered asyncCallback when (getAVCallState).
574661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
574761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
574861847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
574961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
575061847f8eSopenharmony_ci     * @since 11
575161847f8eSopenharmony_ci     */
575261847f8eSopenharmony_ci    getAVCallState(callback: AsyncCallback<AVCallState>): void;
575361847f8eSopenharmony_ci
575461847f8eSopenharmony_ci    /**
575561847f8eSopenharmony_ci     * Get the call status of the current session
575661847f8eSopenharmony_ci     * @returns { Promise<AVCallState> } (AVCallState) returned through promise
575761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
575861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
575961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
576061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
576161847f8eSopenharmony_ci     * @since 11
576261847f8eSopenharmony_ci     */
576361847f8eSopenharmony_ci    getAVCallState(): Promise<AVCallState>;
576461847f8eSopenharmony_ci
576561847f8eSopenharmony_ci    /**
576661847f8eSopenharmony_ci     * Get the call metadata of the current session
576761847f8eSopenharmony_ci     * @param { AsyncCallback<CallMetadata> } callback - The triggered asyncCallback when (getCallMetadata).
576861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
576961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
577061847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
577161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
577261847f8eSopenharmony_ci     * @since 11
577361847f8eSopenharmony_ci     */
577461847f8eSopenharmony_ci    getCallMetadata(callback: AsyncCallback<CallMetadata>): void;
577561847f8eSopenharmony_ci
577661847f8eSopenharmony_ci    /**
577761847f8eSopenharmony_ci     * Get the call metadata of the current session
577861847f8eSopenharmony_ci     * @returns { Promise<CallMetadata> } (CallMetadata) returned through promise
577961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
578061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
578161847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
578261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
578361847f8eSopenharmony_ci     * @since 11
578461847f8eSopenharmony_ci     */
578561847f8eSopenharmony_ci    getCallMetadata(): Promise<CallMetadata>;
578661847f8eSopenharmony_ci
578761847f8eSopenharmony_ci    /**
578861847f8eSopenharmony_ci     * Get the name of the playlist of the current session
578961847f8eSopenharmony_ci     * @param { AsyncCallback<string> } callback - The triggered asyncCallback when (getAVQueueTitle).
579061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
579161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
579261847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
579361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
579461847f8eSopenharmony_ci     * @since 10
579561847f8eSopenharmony_ci     */
579661847f8eSopenharmony_ci    getAVQueueTitle(callback: AsyncCallback<string>): void;
579761847f8eSopenharmony_ci
579861847f8eSopenharmony_ci    /**
579961847f8eSopenharmony_ci     * Get the name of the playlist of the current session
580061847f8eSopenharmony_ci     * @returns { Promise<string> } (string) returned through promise
580161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
580261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
580361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
580461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
580561847f8eSopenharmony_ci     * @since 10
580661847f8eSopenharmony_ci     */
580761847f8eSopenharmony_ci    /**
580861847f8eSopenharmony_ci     * Get the name of the playlist of the current session
580961847f8eSopenharmony_ci     * @returns { Promise<string> } (string) returned through promise
581061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
581161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
581261847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
581361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
581461847f8eSopenharmony_ci     * @atomicservice
581561847f8eSopenharmony_ci     * @since 12
581661847f8eSopenharmony_ci     */
581761847f8eSopenharmony_ci    getAVQueueTitle(): Promise<string>;
581861847f8eSopenharmony_ci
581961847f8eSopenharmony_ci    /**
582061847f8eSopenharmony_ci     * Get the name of the playlist of the current session
582161847f8eSopenharmony_ci     * @returns { string } (string) returned
582261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
582361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
582461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
582561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
582661847f8eSopenharmony_ci     * @since 10
582761847f8eSopenharmony_ci     */
582861847f8eSopenharmony_ci    /**
582961847f8eSopenharmony_ci     * Get the name of the playlist of the current session
583061847f8eSopenharmony_ci     * @returns { string } (string) returned
583161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
583261847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
583361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
583461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
583561847f8eSopenharmony_ci     * @atomicservice
583661847f8eSopenharmony_ci     * @since 12
583761847f8eSopenharmony_ci     */
583861847f8eSopenharmony_ci    getAVQueueTitleSync(): string;
583961847f8eSopenharmony_ci
584061847f8eSopenharmony_ci    /**
584161847f8eSopenharmony_ci     * Get the playlist of the current session
584261847f8eSopenharmony_ci     * @param { AsyncCallback<Array<AVQueueItem>> } callback - The triggered asyncCallback when (getAVQueueItems).
584361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
584461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
584561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
584661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
584761847f8eSopenharmony_ci     * @since 10
584861847f8eSopenharmony_ci     */
584961847f8eSopenharmony_ci    getAVQueueItems(callback: AsyncCallback<Array<AVQueueItem>>): void;
585061847f8eSopenharmony_ci
585161847f8eSopenharmony_ci    /**
585261847f8eSopenharmony_ci     * Get the playlist of the current session
585361847f8eSopenharmony_ci     * @returns { Promise<Array<AVQueueItem>> } (Array<AVQueueItem>) returned through promise
585461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
585561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
585661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
585761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
585861847f8eSopenharmony_ci     * @since 10
585961847f8eSopenharmony_ci     */
586061847f8eSopenharmony_ci    /**
586161847f8eSopenharmony_ci     * Get the playlist of the current session
586261847f8eSopenharmony_ci     * @returns { Promise<Array<AVQueueItem>> } (Array<AVQueueItem>) returned through promise
586361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
586461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
586561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
586661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
586761847f8eSopenharmony_ci     * @atomicservice
586861847f8eSopenharmony_ci     * @since 12
586961847f8eSopenharmony_ci     */
587061847f8eSopenharmony_ci    getAVQueueItems(): Promise<Array<AVQueueItem>>;
587161847f8eSopenharmony_ci
587261847f8eSopenharmony_ci    /**
587361847f8eSopenharmony_ci     * Get the playlist of the current session
587461847f8eSopenharmony_ci     * @returns { Array<AVQueueItem> } (Array<AVQueueItem>) returned
587561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
587661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
587761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
587861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
587961847f8eSopenharmony_ci     * @since 10
588061847f8eSopenharmony_ci     */
588161847f8eSopenharmony_ci    /**
588261847f8eSopenharmony_ci     * Get the playlist of the current session
588361847f8eSopenharmony_ci     * @returns { Array<AVQueueItem> } (Array<AVQueueItem>) returned
588461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
588561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
588661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
588761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
588861847f8eSopenharmony_ci     * @atomicservice
588961847f8eSopenharmony_ci     * @since 12
589061847f8eSopenharmony_ci     */
589161847f8eSopenharmony_ci    getAVQueueItemsSync(): Array<AVQueueItem>;
589261847f8eSopenharmony_ci
589361847f8eSopenharmony_ci    /**
589461847f8eSopenharmony_ci     * Set the item in the playlist to be played
589561847f8eSopenharmony_ci     * @param { number } itemId - The serial number of the item to be played
589661847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully
589761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
589861847f8eSopenharmony_ci     * 2.Parameter verification failed.
589961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
590061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
590161847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
590261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
590361847f8eSopenharmony_ci     * @since 10
590461847f8eSopenharmony_ci     */
590561847f8eSopenharmony_ci    skipToQueueItem(itemId: number, callback: AsyncCallback<void>): void;
590661847f8eSopenharmony_ci
590761847f8eSopenharmony_ci    /**
590861847f8eSopenharmony_ci     * Set the item in the playlist to be played
590961847f8eSopenharmony_ci     * @param { number } itemId - The serial number of the item to be played
591061847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
591161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
591261847f8eSopenharmony_ci     * 2.Parameter verification failed.
591361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
591461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
591561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
591661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
591761847f8eSopenharmony_ci     * @since 10
591861847f8eSopenharmony_ci     */
591961847f8eSopenharmony_ci    /**
592061847f8eSopenharmony_ci     * Set the item in the playlist to be played
592161847f8eSopenharmony_ci     * @param { number } itemId - The serial number of the item to be played
592261847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
592361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
592461847f8eSopenharmony_ci     * 2.Parameter verification failed.
592561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
592661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
592761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
592861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
592961847f8eSopenharmony_ci     * @atomicservice
593061847f8eSopenharmony_ci     * @since 12
593161847f8eSopenharmony_ci     */
593261847f8eSopenharmony_ci    skipToQueueItem(itemId: number): Promise<void>;
593361847f8eSopenharmony_ci
593461847f8eSopenharmony_ci    /**
593561847f8eSopenharmony_ci     * Get output device information
593661847f8eSopenharmony_ci     * @param { AsyncCallback<OutputDeviceInfo> } callback - The triggered asyncCallback when (getOutputDevice).
593761847f8eSopenharmony_ci     * @throws { BusinessError } 600101 - Session service exception.
593861847f8eSopenharmony_ci     * @throws { BusinessError } 600103 - The session controller does not exist.
593961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
594061847f8eSopenharmony_ci     * @since 10
594161847f8eSopenharmony_ci     */
594261847f8eSopenharmony_ci    getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void;
594361847f8eSopenharmony_ci
594461847f8eSopenharmony_ci    /**
594561847f8eSopenharmony_ci     * Get output device information
594661847f8eSopenharmony_ci     * @returns { Promise<OutputDeviceInfo> } (OutputDeviceInfo) returned through promise
594761847f8eSopenharmony_ci     * @throws { BusinessError } 600101 - Session service exception.
594861847f8eSopenharmony_ci     * @throws { BusinessError } 600103 - The session controller does not exist.
594961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
595061847f8eSopenharmony_ci     * @since 10
595161847f8eSopenharmony_ci     */
595261847f8eSopenharmony_ci    /**
595361847f8eSopenharmony_ci     * Get output device information
595461847f8eSopenharmony_ci     * @returns { Promise<OutputDeviceInfo> } (OutputDeviceInfo) returned through promise
595561847f8eSopenharmony_ci     * @throws { BusinessError } 600101 - Session service exception.
595661847f8eSopenharmony_ci     * @throws { BusinessError } 600103 - The session controller does not exist.
595761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
595861847f8eSopenharmony_ci     * @atomicservice
595961847f8eSopenharmony_ci     * @since 12
596061847f8eSopenharmony_ci     */
596161847f8eSopenharmony_ci    getOutputDevice(): Promise<OutputDeviceInfo>;
596261847f8eSopenharmony_ci
596361847f8eSopenharmony_ci    /**
596461847f8eSopenharmony_ci     * Get output device information
596561847f8eSopenharmony_ci     * @returns { OutputDeviceInfo } (OutputDeviceInfo) returned
596661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
596761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
596861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
596961847f8eSopenharmony_ci     * @since 10
597061847f8eSopenharmony_ci     */
597161847f8eSopenharmony_ci    /**
597261847f8eSopenharmony_ci     * Get output device information
597361847f8eSopenharmony_ci     * @returns { OutputDeviceInfo } (OutputDeviceInfo) returned
597461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
597561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
597661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
597761847f8eSopenharmony_ci     * @atomicservice
597861847f8eSopenharmony_ci     * @since 12
597961847f8eSopenharmony_ci     */
598061847f8eSopenharmony_ci    getOutputDeviceSync(): OutputDeviceInfo;
598161847f8eSopenharmony_ci
598261847f8eSopenharmony_ci    /**
598361847f8eSopenharmony_ci     * Send media key event to this session
598461847f8eSopenharmony_ci     * @param { KeyEvent } event - The KeyEvent
598561847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully.
598661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
598761847f8eSopenharmony_ci     * 2.Parameter verification failed.
598861847f8eSopenharmony_ci     * @throws { BusinessError } 600101 - Session service exception.
598961847f8eSopenharmony_ci     * @throws { BusinessError } 600102 - The session does not exist.
599061847f8eSopenharmony_ci     * @throws { BusinessError } 600103 - The session controller does not exist.
599161847f8eSopenharmony_ci     * @throws { BusinessError } 600105 - Invalid session command.
599261847f8eSopenharmony_ci     * @throws { BusinessError } 600106 - The session is not activated.
599361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
599461847f8eSopenharmony_ci     * @since 10
599561847f8eSopenharmony_ci     */
599661847f8eSopenharmony_ci    sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void;
599761847f8eSopenharmony_ci
599861847f8eSopenharmony_ci    /**
599961847f8eSopenharmony_ci     * Send media key event to this session
600061847f8eSopenharmony_ci     * @param { KeyEvent } event - The KeyEvent
600161847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
600261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
600361847f8eSopenharmony_ci     * 2.Parameter verification failed.
600461847f8eSopenharmony_ci     * @throws { BusinessError } 600101 - Session service exception.
600561847f8eSopenharmony_ci     * @throws { BusinessError } 600102 - The session does not exist.
600661847f8eSopenharmony_ci     * @throws { BusinessError } 600103 - The session controller does not exist.
600761847f8eSopenharmony_ci     * @throws { BusinessError } 600105 - Invalid session command.
600861847f8eSopenharmony_ci     * @throws { BusinessError } 600106 - The session is not activated.
600961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
601061847f8eSopenharmony_ci     * @since 10
601161847f8eSopenharmony_ci     */
601261847f8eSopenharmony_ci    /**
601361847f8eSopenharmony_ci     * Send media key event to this session
601461847f8eSopenharmony_ci     * @param { KeyEvent } event - The KeyEvent
601561847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
601661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
601761847f8eSopenharmony_ci     * 2.Parameter verification failed.
601861847f8eSopenharmony_ci     * @throws { BusinessError } 600101 - Session service exception.
601961847f8eSopenharmony_ci     * @throws { BusinessError } 600102 - The session does not exist.
602061847f8eSopenharmony_ci     * @throws { BusinessError } 600103 - The session controller does not exist.
602161847f8eSopenharmony_ci     * @throws { BusinessError } 600105 - Invalid session command.
602261847f8eSopenharmony_ci     * @throws { BusinessError } 600106 - The session is not activated.
602361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
602461847f8eSopenharmony_ci     * @atomicservice
602561847f8eSopenharmony_ci     * @since 12
602661847f8eSopenharmony_ci     */
602761847f8eSopenharmony_ci    sendAVKeyEvent(event: KeyEvent): Promise<void>;
602861847f8eSopenharmony_ci
602961847f8eSopenharmony_ci    /**
603061847f8eSopenharmony_ci     * Get the {@link WantAgent} of this session that can launch the session ability
603161847f8eSopenharmony_ci     * @param { AsyncCallback<WantAgent> } callback - The asyncCallback triggered when getting the WantAgent.
603261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
603361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
603461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
603561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
603661847f8eSopenharmony_ci     * @since 10
603761847f8eSopenharmony_ci     */
603861847f8eSopenharmony_ci    getLaunchAbility(callback: AsyncCallback<WantAgent>): void;
603961847f8eSopenharmony_ci
604061847f8eSopenharmony_ci    /**
604161847f8eSopenharmony_ci     * Get the {@link WantAgent} of this session that can launch the session ability
604261847f8eSopenharmony_ci     * @returns { Promise<WantAgent> } WantAgent promise
604361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
604461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
604561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
604661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
604761847f8eSopenharmony_ci     * @since 10
604861847f8eSopenharmony_ci     */
604961847f8eSopenharmony_ci    /**
605061847f8eSopenharmony_ci     * Get the {@link WantAgent} of this session that can launch the session ability
605161847f8eSopenharmony_ci     * @returns { Promise<WantAgent> } WantAgent promise
605261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
605361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
605461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
605561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
605661847f8eSopenharmony_ci     * @atomicservice
605761847f8eSopenharmony_ci     * @since 12
605861847f8eSopenharmony_ci     */
605961847f8eSopenharmony_ci    getLaunchAbility(): Promise<WantAgent>;
606061847f8eSopenharmony_ci
606161847f8eSopenharmony_ci    /**
606261847f8eSopenharmony_ci     * Get the adjusted playback position. The time automatically calculated by the system
606361847f8eSopenharmony_ci     * taking into account factors such as playback status, playback speed, and application update time.
606461847f8eSopenharmony_ci     * @returns { number } current playback position in ms.Note that the returns value of each call will be different.
606561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
606661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
606761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
606861847f8eSopenharmony_ci     * @since 10
606961847f8eSopenharmony_ci     */
607061847f8eSopenharmony_ci    /**
607161847f8eSopenharmony_ci     * Get the adjusted playback position. The time automatically calculated by the system
607261847f8eSopenharmony_ci     * taking into account factors such as playback status, playback speed, and application update time.
607361847f8eSopenharmony_ci     * @returns { number } current playback position in ms.Note that the returns value of each call will be different.
607461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
607561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
607661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
607761847f8eSopenharmony_ci     * @atomicservice
607861847f8eSopenharmony_ci     * @since 12
607961847f8eSopenharmony_ci     */
608061847f8eSopenharmony_ci    getRealPlaybackPositionSync(): number;
608161847f8eSopenharmony_ci
608261847f8eSopenharmony_ci    /**
608361847f8eSopenharmony_ci     * Check if the current session is active
608461847f8eSopenharmony_ci     * @param { AsyncCallback<boolean> } callback - The triggered asyncCallback when (isActive).
608561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
608661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
608761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
608861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
608961847f8eSopenharmony_ci     * @since 10
609061847f8eSopenharmony_ci     */
609161847f8eSopenharmony_ci    isActive(callback: AsyncCallback<boolean>): void;
609261847f8eSopenharmony_ci
609361847f8eSopenharmony_ci    /**
609461847f8eSopenharmony_ci     * Check if the current session is active
609561847f8eSopenharmony_ci     * @returns { Promise<boolean> } boolean promise
609661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
609761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
609861847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
609961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
610061847f8eSopenharmony_ci     * @since 10
610161847f8eSopenharmony_ci     */
610261847f8eSopenharmony_ci    /**
610361847f8eSopenharmony_ci     * Check if the current session is active
610461847f8eSopenharmony_ci     * @returns { Promise<boolean> } boolean promise
610561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
610661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
610761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
610861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
610961847f8eSopenharmony_ci     * @atomicservice
611061847f8eSopenharmony_ci     * @since 12
611161847f8eSopenharmony_ci     */
611261847f8eSopenharmony_ci    isActive(): Promise<boolean>;
611361847f8eSopenharmony_ci
611461847f8eSopenharmony_ci    /**
611561847f8eSopenharmony_ci     * Check if the current session is active
611661847f8eSopenharmony_ci     * @returns { boolean } boolean
611761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
611861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
611961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
612061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
612161847f8eSopenharmony_ci     * @since 10
612261847f8eSopenharmony_ci     */
612361847f8eSopenharmony_ci    /**
612461847f8eSopenharmony_ci     * Check if the current session is active
612561847f8eSopenharmony_ci     * @returns { boolean } boolean
612661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
612761847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
612861847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
612961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
613061847f8eSopenharmony_ci     * @atomicservice
613161847f8eSopenharmony_ci     * @since 12
613261847f8eSopenharmony_ci     */
613361847f8eSopenharmony_ci    isActiveSync(): boolean;
613461847f8eSopenharmony_ci
613561847f8eSopenharmony_ci    /**
613661847f8eSopenharmony_ci     * Destroy the server controller
613761847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully.
613861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
613961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
614061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
614161847f8eSopenharmony_ci     * @since 10
614261847f8eSopenharmony_ci     */
614361847f8eSopenharmony_ci    destroy(callback: AsyncCallback<void>): void;
614461847f8eSopenharmony_ci
614561847f8eSopenharmony_ci    /**
614661847f8eSopenharmony_ci     * Destroy the server controller
614761847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
614861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
614961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
615061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
615161847f8eSopenharmony_ci     * @since 10
615261847f8eSopenharmony_ci     */
615361847f8eSopenharmony_ci    /**
615461847f8eSopenharmony_ci     * Destroy the server controller
615561847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
615661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
615761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
615861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
615961847f8eSopenharmony_ci     * @atomicservice
616061847f8eSopenharmony_ci     * @since 12
616161847f8eSopenharmony_ci     */
616261847f8eSopenharmony_ci    destroy(): Promise<void>;
616361847f8eSopenharmony_ci
616461847f8eSopenharmony_ci    /**
616561847f8eSopenharmony_ci     * Get commands supported by the current session
616661847f8eSopenharmony_ci     * @param { AsyncCallback<Array<AVControlCommandType>> } callback - The triggered asyncCallback when (getValidCommands).
616761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
616861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
616961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
617061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
617161847f8eSopenharmony_ci     * @since 10
617261847f8eSopenharmony_ci     */
617361847f8eSopenharmony_ci    getValidCommands(callback: AsyncCallback<Array<AVControlCommandType>>): void;
617461847f8eSopenharmony_ci
617561847f8eSopenharmony_ci    /**
617661847f8eSopenharmony_ci     * Get commands supported by the current session
617761847f8eSopenharmony_ci     * @returns { Promise<Array<AVControlCommandType>> } array of AVControlCommandType promise
617861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
617961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
618061847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
618161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
618261847f8eSopenharmony_ci     * @since 10
618361847f8eSopenharmony_ci     */
618461847f8eSopenharmony_ci    /**
618561847f8eSopenharmony_ci     * Get commands supported by the current session
618661847f8eSopenharmony_ci     * @returns { Promise<Array<AVControlCommandType>> } array of AVControlCommandType promise
618761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
618861847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
618961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
619061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
619161847f8eSopenharmony_ci     * @atomicservice
619261847f8eSopenharmony_ci     * @since 12
619361847f8eSopenharmony_ci     */
619461847f8eSopenharmony_ci    getValidCommands(): Promise<Array<AVControlCommandType>>;
619561847f8eSopenharmony_ci
619661847f8eSopenharmony_ci    /**
619761847f8eSopenharmony_ci     * Get commands supported by the current session
619861847f8eSopenharmony_ci     * @returns {Array<AVControlCommandType> } array of AVControlCommandType
619961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
620061847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
620161847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
620261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
620361847f8eSopenharmony_ci     * @since 10
620461847f8eSopenharmony_ci     */
620561847f8eSopenharmony_ci    /**
620661847f8eSopenharmony_ci     * Get commands supported by the current session
620761847f8eSopenharmony_ci     * @returns {Array<AVControlCommandType> } array of AVControlCommandType
620861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
620961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
621061847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
621161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
621261847f8eSopenharmony_ci     * @atomicservice
621361847f8eSopenharmony_ci     * @since 12
621461847f8eSopenharmony_ci     */
621561847f8eSopenharmony_ci    getValidCommandsSync(): Array<AVControlCommandType>;
621661847f8eSopenharmony_ci
621761847f8eSopenharmony_ci    /**
621861847f8eSopenharmony_ci     * Send control commands to this session
621961847f8eSopenharmony_ci     * @param { AVControlCommand } command - The command to be sent. See {@link AVControlCommand}
622061847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully.
622161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
622261847f8eSopenharmony_ci     * 2.Parameter verification failed.
622361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
622461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
622561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
622661847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command.
622761847f8eSopenharmony_ci     * @throws { BusinessError } 6600106 - The session is not activated.
622861847f8eSopenharmony_ci     * @throws { BusinessError } 6600107 - Too many commands or events.
622961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
623061847f8eSopenharmony_ci     * @since 10
623161847f8eSopenharmony_ci     */
623261847f8eSopenharmony_ci    sendControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void;
623361847f8eSopenharmony_ci
623461847f8eSopenharmony_ci    /**
623561847f8eSopenharmony_ci     * Send control commands to this session
623661847f8eSopenharmony_ci     * @param { AVControlCommand } command - The command to be sent. See {@link AVControlCommand}
623761847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
623861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
623961847f8eSopenharmony_ci     * 2.Parameter verification failed.
624061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
624161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
624261847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
624361847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command.
624461847f8eSopenharmony_ci     * @throws { BusinessError } 6600106 - The session is not activated.
624561847f8eSopenharmony_ci     * @throws { BusinessError } 6600107 - Too many commands or events.
624661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
624761847f8eSopenharmony_ci     * @since 10
624861847f8eSopenharmony_ci     */
624961847f8eSopenharmony_ci    /**
625061847f8eSopenharmony_ci     * Send control commands to this session
625161847f8eSopenharmony_ci     * @param { AVControlCommand } command - The command to be sent. See {@link AVControlCommand}
625261847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
625361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
625461847f8eSopenharmony_ci     * 2.Parameter verification failed.
625561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
625661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
625761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
625861847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command.
625961847f8eSopenharmony_ci     * @throws { BusinessError } 6600106 - The session is not activated.
626061847f8eSopenharmony_ci     * @throws { BusinessError } 6600107 - Too many commands or events.
626161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
626261847f8eSopenharmony_ci     * @atomicservice
626361847f8eSopenharmony_ci     * @since 12
626461847f8eSopenharmony_ci     */
626561847f8eSopenharmony_ci    sendControlCommand(command: AVControlCommand): Promise<void>;
626661847f8eSopenharmony_ci
626761847f8eSopenharmony_ci    /**
626861847f8eSopenharmony_ci     * Send common commands to this session
626961847f8eSopenharmony_ci     * @param { string } command - The command name to be sent.
627061847f8eSopenharmony_ci     * @param { object } args - The parameters of session event
627161847f8eSopenharmony_ci     * @param { AsyncCallback<void> } callback - The asyncCallback triggered when the command is executed successfully.
627261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
627361847f8eSopenharmony_ci     * 2.Parameter verification failed.
627461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
627561847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
627661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
627761847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command.
627861847f8eSopenharmony_ci     * @throws { BusinessError } 6600106 - The session is not activated.
627961847f8eSopenharmony_ci     * @throws { BusinessError } 6600107 - Too many commands or events.
628061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
628161847f8eSopenharmony_ci     * @since 10
628261847f8eSopenharmony_ci     */
628361847f8eSopenharmony_ci    sendCommonCommand(command: string, args: {[key: string]: Object}, callback: AsyncCallback<void>): void;
628461847f8eSopenharmony_ci
628561847f8eSopenharmony_ci    /**
628661847f8eSopenharmony_ci     * Send common commands to this session
628761847f8eSopenharmony_ci     * @param { string } command - The command name to be sent.
628861847f8eSopenharmony_ci     * @param { object } args - The parameters of session event
628961847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
629061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
629161847f8eSopenharmony_ci     * 2.Parameter verification failed.
629261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
629361847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
629461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
629561847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command.
629661847f8eSopenharmony_ci     * @throws { BusinessError } 6600106 - The session is not activated.
629761847f8eSopenharmony_ci     * @throws { BusinessError } 6600107 - Too many commands or events.
629861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
629961847f8eSopenharmony_ci     * @since 10
630061847f8eSopenharmony_ci     */
630161847f8eSopenharmony_ci    /**
630261847f8eSopenharmony_ci     * Send common commands to this session
630361847f8eSopenharmony_ci     * @param { string } command - The command name to be sent.
630461847f8eSopenharmony_ci     * @param { object } args - The parameters of session event
630561847f8eSopenharmony_ci     * @returns { Promise<void> } void promise when executed successfully
630661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
630761847f8eSopenharmony_ci     * 2.Parameter verification failed.
630861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
630961847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
631061847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
631161847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command.
631261847f8eSopenharmony_ci     * @throws { BusinessError } 6600106 - The session is not activated.
631361847f8eSopenharmony_ci     * @throws { BusinessError } 6600107 - Too many commands or events.
631461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
631561847f8eSopenharmony_ci     * @atomicservice
631661847f8eSopenharmony_ci     * @since 12
631761847f8eSopenharmony_ci     */
631861847f8eSopenharmony_ci    sendCommonCommand(command: string, args: {[key: string]: Object}): Promise<void>;
631961847f8eSopenharmony_ci
632061847f8eSopenharmony_ci    /**
632161847f8eSopenharmony_ci     * Get custom media packets provided by the corresponding session
632261847f8eSopenharmony_ci     * @param { AsyncCallback<{[key: string]: Object}> } callback - The triggered asyncCallback when (getExtras).
632361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
632461847f8eSopenharmony_ci     * 2.Incorrect parameter types. 3.Parameter verification failed.
632561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
632661847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
632761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
632861847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command.
632961847f8eSopenharmony_ci     * @throws { BusinessError } 6600107 - Too many commands or events.
633061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
633161847f8eSopenharmony_ci     * @since 10
633261847f8eSopenharmony_ci     */
633361847f8eSopenharmony_ci    getExtras(callback: AsyncCallback<{[key: string]: Object}>): void;
633461847f8eSopenharmony_ci
633561847f8eSopenharmony_ci    /**
633661847f8eSopenharmony_ci     * Get custom media packets provided by the corresponding session
633761847f8eSopenharmony_ci     * @returns { Promise<{[key: string]: Object}> } the parameters of extras
633861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
633961847f8eSopenharmony_ci     * 2.Incorrect parameter types. 3.Parameter verification failed.
634061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
634161847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
634261847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
634361847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command.
634461847f8eSopenharmony_ci     * @throws { BusinessError } 6600107 - Too many commands or events.
634561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
634661847f8eSopenharmony_ci     * @since 10
634761847f8eSopenharmony_ci     */
634861847f8eSopenharmony_ci    /**
634961847f8eSopenharmony_ci     * Get custom media packets provided by the corresponding session
635061847f8eSopenharmony_ci     * @returns { Promise<{[key: string]: Object}> } the parameters of extras
635161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
635261847f8eSopenharmony_ci     * 2.Incorrect parameter types. 3.Parameter verification failed.
635361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
635461847f8eSopenharmony_ci     * @throws { BusinessError } 6600102 - The session does not exist.
635561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
635661847f8eSopenharmony_ci     * @throws { BusinessError } 6600105 - Invalid session command.
635761847f8eSopenharmony_ci     * @throws { BusinessError } 6600107 - Too many commands or events.
635861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
635961847f8eSopenharmony_ci     * @atomicservice
636061847f8eSopenharmony_ci     * @since 12
636161847f8eSopenharmony_ci     */
636261847f8eSopenharmony_ci    getExtras(): Promise<{[key: string]: Object}>;
636361847f8eSopenharmony_ci
636461847f8eSopenharmony_ci    /**
636561847f8eSopenharmony_ci     * Register metadata changed callback
636661847f8eSopenharmony_ci     * @param { 'metadataChange' } type 
636761847f8eSopenharmony_ci     * @param { Array<keyof AVMetadata> | 'all' } filter - The properties of {@link AVMetadata} that you cared about
636861847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle metadata changed event.
636961847f8eSopenharmony_ci     * The callback function provides the {@link AVMetadata} parameter.
637061847f8eSopenharmony_ci     * It only contains the properties set in the filter.
637161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
637261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
637361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
637461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
637561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
637661847f8eSopenharmony_ci     * @since 10
637761847f8eSopenharmony_ci     */
637861847f8eSopenharmony_ci    /**
637961847f8eSopenharmony_ci     * Register metadata changed callback
638061847f8eSopenharmony_ci     * @param { 'metadataChange' } type 
638161847f8eSopenharmony_ci     * @param { Array<keyof AVMetadata> | 'all' } filter - The properties of {@link AVMetadata} that you cared about
638261847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle metadata changed event.
638361847f8eSopenharmony_ci     * The callback function provides the {@link AVMetadata} parameter.
638461847f8eSopenharmony_ci     * It only contains the properties set in the filter.
638561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
638661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
638761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
638861847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
638961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
639061847f8eSopenharmony_ci     * @atomicservice
639161847f8eSopenharmony_ci     * @since 12
639261847f8eSopenharmony_ci     */
639361847f8eSopenharmony_ci    on(type: 'metadataChange', filter: Array<keyof AVMetadata> | 'all', callback: (data: AVMetadata) => void);
639461847f8eSopenharmony_ci
639561847f8eSopenharmony_ci    /**
639661847f8eSopenharmony_ci     * Unregister metadata changed callback
639761847f8eSopenharmony_ci     * @param { 'metadataChange' } type
639861847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle metadata changed event.
639961847f8eSopenharmony_ci     * The callback function provides the {@link AVMetadata} parameter.
640061847f8eSopenharmony_ci     * It only contains the properties set in the filter.
640161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
640261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
640361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
640461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
640561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
640661847f8eSopenharmony_ci     * @since 10
640761847f8eSopenharmony_ci     */
640861847f8eSopenharmony_ci    /**
640961847f8eSopenharmony_ci     * Unregister metadata changed callback
641061847f8eSopenharmony_ci     * @param { 'metadataChange' } type
641161847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle metadata changed event.
641261847f8eSopenharmony_ci     * The callback function provides the {@link AVMetadata} parameter.
641361847f8eSopenharmony_ci     * It only contains the properties set in the filter.
641461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
641561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
641661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
641761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
641861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
641961847f8eSopenharmony_ci     * @atomicservice
642061847f8eSopenharmony_ci     * @since 12
642161847f8eSopenharmony_ci     */
642261847f8eSopenharmony_ci    off(type: 'metadataChange', callback?: (data: AVMetadata) => void);
642361847f8eSopenharmony_ci
642461847f8eSopenharmony_ci    /**
642561847f8eSopenharmony_ci     * Register playback state changed callback
642661847f8eSopenharmony_ci     * @param { 'playbackStateChange' } type
642761847f8eSopenharmony_ci     * @param { Array<keyof AVPlaybackState> | 'all' } filter - The properties of {@link AVPlaybackState} that you cared about
642861847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle playback state changed event.
642961847f8eSopenharmony_ci     * The callback function provides the {@link AVPlaybackState} parameter.
643061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
643161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
643261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
643361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
643461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
643561847f8eSopenharmony_ci     * @since 10
643661847f8eSopenharmony_ci     */
643761847f8eSopenharmony_ci    /**
643861847f8eSopenharmony_ci     * Register playback state changed callback
643961847f8eSopenharmony_ci     * @param { 'playbackStateChange' } type
644061847f8eSopenharmony_ci     * @param { Array<keyof AVPlaybackState> | 'all' } filter - The properties of {@link AVPlaybackState} that you cared about
644161847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle playback state changed event.
644261847f8eSopenharmony_ci     * The callback function provides the {@link AVPlaybackState} parameter.
644361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
644461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
644561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
644661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
644761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
644861847f8eSopenharmony_ci     * @atomicservice
644961847f8eSopenharmony_ci     * @since 12
645061847f8eSopenharmony_ci     */
645161847f8eSopenharmony_ci    on(type: 'playbackStateChange', filter: Array<keyof AVPlaybackState> | 'all', callback: (state: AVPlaybackState) => void);
645261847f8eSopenharmony_ci
645361847f8eSopenharmony_ci    /**
645461847f8eSopenharmony_ci     * Unregister playback state changed callback
645561847f8eSopenharmony_ci     * @param { 'playbackStateChange' } type
645661847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle playback state changed event.
645761847f8eSopenharmony_ci     * The callback function provides the {@link AVPlaybackState} parameter.
645861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
645961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
646061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
646161847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
646261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
646361847f8eSopenharmony_ci     * @since 10
646461847f8eSopenharmony_ci     */
646561847f8eSopenharmony_ci    /**
646661847f8eSopenharmony_ci     * Unregister playback state changed callback
646761847f8eSopenharmony_ci     * @param { 'playbackStateChange' } type
646861847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle playback state changed event.
646961847f8eSopenharmony_ci     * The callback function provides the {@link AVPlaybackState} parameter.
647061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
647161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
647261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
647361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
647461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
647561847f8eSopenharmony_ci     * @atomicservice
647661847f8eSopenharmony_ci     * @since 12
647761847f8eSopenharmony_ci     */
647861847f8eSopenharmony_ci    off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void);
647961847f8eSopenharmony_ci
648061847f8eSopenharmony_ci    /**
648161847f8eSopenharmony_ci     * Register call metadata changed callback
648261847f8eSopenharmony_ci     * @param { 'callMetadataChange' } type - 'callMetadataChange'
648361847f8eSopenharmony_ci     * @param { Array<keyof CallMetadata> | 'all' } filter - The properties of {@link CallMetadata} that you cared about
648461847f8eSopenharmony_ci     * @param { Callback<CallMetadata> } callback - The callback used to handle call metadata changed event.
648561847f8eSopenharmony_ci     * The callback function provides the {@link CallMetadata} parameter.
648661847f8eSopenharmony_ci     * It only contains the properties set in the filter.
648761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
648861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
648961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
649061847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
649161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
649261847f8eSopenharmony_ci     * @since 11
649361847f8eSopenharmony_ci     */
649461847f8eSopenharmony_ci    /**
649561847f8eSopenharmony_ci     * Register call metadata changed callback
649661847f8eSopenharmony_ci     * @param { 'callMetadataChange' } type - 'callMetadataChange'
649761847f8eSopenharmony_ci     * @param { Array<keyof CallMetadata> | 'all' } filter - The properties of {@link CallMetadata} that you cared about
649861847f8eSopenharmony_ci     * @param { Callback<CallMetadata> } callback - The callback used to handle call metadata changed event.
649961847f8eSopenharmony_ci     * The callback function provides the {@link CallMetadata} parameter.
650061847f8eSopenharmony_ci     * It only contains the properties set in the filter.
650161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
650261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
650361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
650461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
650561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
650661847f8eSopenharmony_ci     * @atomicservice
650761847f8eSopenharmony_ci     * @since 12
650861847f8eSopenharmony_ci     */
650961847f8eSopenharmony_ci    on(type: 'callMetadataChange', filter: Array<keyof CallMetadata> | 'all', callback: Callback<CallMetadata>): void;
651061847f8eSopenharmony_ci
651161847f8eSopenharmony_ci    /**
651261847f8eSopenharmony_ci     * Unregister call metadata changed callback
651361847f8eSopenharmony_ci     * @param { 'callMetadataChange' } type - 'callMetadataChange'
651461847f8eSopenharmony_ci     * @param { Callback<CallMetadata> } callback - The callback used to handle call metadata changed event.
651561847f8eSopenharmony_ci     * The callback function provides the {@link CallMetadata} parameter.
651661847f8eSopenharmony_ci     * It only contains the properties set in the filter.
651761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
651861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
651961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
652061847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
652161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
652261847f8eSopenharmony_ci     * @since 11
652361847f8eSopenharmony_ci     */
652461847f8eSopenharmony_ci    /**
652561847f8eSopenharmony_ci     * Unregister call metadata changed callback
652661847f8eSopenharmony_ci     * @param { 'callMetadataChange' } type - 'callMetadataChange'
652761847f8eSopenharmony_ci     * @param { Callback<CallMetadata> } callback - The callback used to handle call metadata changed event.
652861847f8eSopenharmony_ci     * The callback function provides the {@link CallMetadata} parameter.
652961847f8eSopenharmony_ci     * It only contains the properties set in the filter.
653061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
653161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
653261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
653361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
653461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
653561847f8eSopenharmony_ci     * @atomicservice
653661847f8eSopenharmony_ci     * @since 12
653761847f8eSopenharmony_ci     */
653861847f8eSopenharmony_ci    off(type: 'callMetadataChange', callback?: Callback<CallMetadata>): void;
653961847f8eSopenharmony_ci
654061847f8eSopenharmony_ci    /**
654161847f8eSopenharmony_ci     * Register call state changed callback
654261847f8eSopenharmony_ci     * @param { 'callStateChange' } type - 'callStateChange'
654361847f8eSopenharmony_ci     * @param { Array<keyof AVCallState> | 'all' } filter - The properties of {@link AVCallState} that you cared about
654461847f8eSopenharmony_ci     * @param { Callback<AVCallState> } callback - The callback used to handle call state changed event.
654561847f8eSopenharmony_ci     * The callback function provides the {@link AVCallState} parameter.
654661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
654761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
654861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
654961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
655061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
655161847f8eSopenharmony_ci     * @since 11
655261847f8eSopenharmony_ci     */
655361847f8eSopenharmony_ci    /**
655461847f8eSopenharmony_ci     * Register call state changed callback
655561847f8eSopenharmony_ci     * @param { 'callStateChange' } type - 'callStateChange'
655661847f8eSopenharmony_ci     * @param { Array<keyof AVCallState> | 'all' } filter - The properties of {@link AVCallState} that you cared about
655761847f8eSopenharmony_ci     * @param { Callback<AVCallState> } callback - The callback used to handle call state changed event.
655861847f8eSopenharmony_ci     * The callback function provides the {@link AVCallState} parameter.
655961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
656061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
656161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
656261847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
656361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
656461847f8eSopenharmony_ci     * @atomicservice
656561847f8eSopenharmony_ci     * @since 12
656661847f8eSopenharmony_ci     */
656761847f8eSopenharmony_ci    on(type: 'callStateChange', filter: Array<keyof AVCallState> | 'all', callback: Callback<AVCallState>): void;
656861847f8eSopenharmony_ci
656961847f8eSopenharmony_ci    /**
657061847f8eSopenharmony_ci     * Unregister playback state changed callback
657161847f8eSopenharmony_ci     * @param { 'callStateChange' } type - 'callStateChange'
657261847f8eSopenharmony_ci     * @param { Callback<AVCallState> } callback - The callback used to handle call state changed event.
657361847f8eSopenharmony_ci     * The callback function provides the {@link AVCallState} parameter.
657461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
657561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
657661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
657761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
657861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
657961847f8eSopenharmony_ci     * @since 11
658061847f8eSopenharmony_ci     */
658161847f8eSopenharmony_ci    /**
658261847f8eSopenharmony_ci     * Unregister playback state changed callback
658361847f8eSopenharmony_ci     * @param { 'callStateChange' } type - 'callStateChange'
658461847f8eSopenharmony_ci     * @param { Callback<AVCallState> } callback - The callback used to handle call state changed event.
658561847f8eSopenharmony_ci     * The callback function provides the {@link AVCallState} parameter.
658661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
658761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
658861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
658961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
659061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
659161847f8eSopenharmony_ci     * @atomicservice
659261847f8eSopenharmony_ci     * @since 12
659361847f8eSopenharmony_ci     */
659461847f8eSopenharmony_ci    off(type: 'callStateChange', callback?: Callback<AVCallState>): void;
659561847f8eSopenharmony_ci
659661847f8eSopenharmony_ci    /**
659761847f8eSopenharmony_ci     * Register current session destroyed callback
659861847f8eSopenharmony_ci     * @param { 'sessionDestroy' } type
659961847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle current session destroyed event.
660061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
660161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
660261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
660361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
660461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
660561847f8eSopenharmony_ci     * @since 10
660661847f8eSopenharmony_ci     */
660761847f8eSopenharmony_ci    /**
660861847f8eSopenharmony_ci     * Register current session destroyed callback
660961847f8eSopenharmony_ci     * @param { 'sessionDestroy' } type
661061847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle current session destroyed event.
661161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
661261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
661361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
661461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
661561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
661661847f8eSopenharmony_ci     * @atomicservice
661761847f8eSopenharmony_ci     * @since 12
661861847f8eSopenharmony_ci     */
661961847f8eSopenharmony_ci    on(type: 'sessionDestroy', callback: () => void);
662061847f8eSopenharmony_ci
662161847f8eSopenharmony_ci    /**
662261847f8eSopenharmony_ci     * Unregister current session destroyed callback
662361847f8eSopenharmony_ci     * @param { 'sessionDestroy' } type - 'sessionDestroy'
662461847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle current session destroyed event.
662561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
662661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
662761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
662861847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
662961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
663061847f8eSopenharmony_ci     * @since 10
663161847f8eSopenharmony_ci     */
663261847f8eSopenharmony_ci    /**
663361847f8eSopenharmony_ci     * Unregister current session destroyed callback
663461847f8eSopenharmony_ci     * @param { 'sessionDestroy' } type - 'sessionDestroy'
663561847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle current session destroyed event.
663661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
663761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
663861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
663961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
664061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
664161847f8eSopenharmony_ci     * @atomicservice
664261847f8eSopenharmony_ci     * @since 12
664361847f8eSopenharmony_ci     */
664461847f8eSopenharmony_ci    off(type: 'sessionDestroy', callback?: () => void);
664561847f8eSopenharmony_ci
664661847f8eSopenharmony_ci    /**
664761847f8eSopenharmony_ci     * Register the active state of this session changed callback
664861847f8eSopenharmony_ci     * @param { 'activeStateChange' } type - 'activeStateChange'
664961847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle the active state of this session changed event.
665061847f8eSopenharmony_ci     * The callback function provides the changed session state.
665161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
665261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
665361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
665461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
665561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
665661847f8eSopenharmony_ci     * @since 10
665761847f8eSopenharmony_ci     */
665861847f8eSopenharmony_ci    /**
665961847f8eSopenharmony_ci     * Register the active state of this session changed callback
666061847f8eSopenharmony_ci     * @param { 'activeStateChange' } type - 'activeStateChange'
666161847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle the active state of this session changed event.
666261847f8eSopenharmony_ci     * The callback function provides the changed session state.
666361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
666461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
666561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
666661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
666761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
666861847f8eSopenharmony_ci     * @atomicservice
666961847f8eSopenharmony_ci     * @since 12
667061847f8eSopenharmony_ci     */
667161847f8eSopenharmony_ci    on(type: 'activeStateChange', callback: (isActive: boolean) => void);
667261847f8eSopenharmony_ci
667361847f8eSopenharmony_ci    /**
667461847f8eSopenharmony_ci     * Unregister the active state of this session changed callback
667561847f8eSopenharmony_ci     * @param { 'activeStateChange' } type - 'activeStateChange'
667661847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle the active state of this session changed event.
667761847f8eSopenharmony_ci     * The callback function provides the changed session state.
667861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
667961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
668061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
668161847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
668261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
668361847f8eSopenharmony_ci     * @since 10
668461847f8eSopenharmony_ci     */
668561847f8eSopenharmony_ci    /**
668661847f8eSopenharmony_ci     * Unregister the active state of this session changed callback
668761847f8eSopenharmony_ci     * @param { 'activeStateChange' } type - 'activeStateChange'
668861847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle the active state of this session changed event.
668961847f8eSopenharmony_ci     * The callback function provides the changed session state.
669061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
669161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
669261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
669361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
669461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
669561847f8eSopenharmony_ci     * @atomicservice
669661847f8eSopenharmony_ci     * @since 12
669761847f8eSopenharmony_ci     */
669861847f8eSopenharmony_ci    off(type: 'activeStateChange', callback?: (isActive: boolean) => void);
669961847f8eSopenharmony_ci
670061847f8eSopenharmony_ci    /**
670161847f8eSopenharmony_ci     * Register the valid commands of the session changed callback
670261847f8eSopenharmony_ci     * @param { 'validCommandChange' } type - 'validCommandChange'
670361847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle the changes.
670461847f8eSopenharmony_ci     * The callback function provides an array of AVControlCommandType.
670561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
670661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
670761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
670861847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
670961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
671061847f8eSopenharmony_ci     * @since 10
671161847f8eSopenharmony_ci     */
671261847f8eSopenharmony_ci    /**
671361847f8eSopenharmony_ci     * Register the valid commands of the session changed callback
671461847f8eSopenharmony_ci     * @param { 'validCommandChange' } type - 'validCommandChange'
671561847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle the changes.
671661847f8eSopenharmony_ci     * The callback function provides an array of AVControlCommandType.
671761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
671861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
671961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
672061847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
672161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
672261847f8eSopenharmony_ci     * @atomicservice
672361847f8eSopenharmony_ci     * @since 12
672461847f8eSopenharmony_ci     */
672561847f8eSopenharmony_ci    on(type: 'validCommandChange', callback: (commands: Array<AVControlCommandType>) => void);
672661847f8eSopenharmony_ci
672761847f8eSopenharmony_ci    /**
672861847f8eSopenharmony_ci     * Unregister the valid commands of the session changed callback
672961847f8eSopenharmony_ci     * @param { 'validCommandChange' } type - 'validCommandChange'
673061847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle the changes.
673161847f8eSopenharmony_ci     * The callback function provides an array of AVControlCommandType.
673261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
673361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
673461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
673561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
673661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
673761847f8eSopenharmony_ci     * @since 10
673861847f8eSopenharmony_ci     */
673961847f8eSopenharmony_ci    /**
674061847f8eSopenharmony_ci     * Unregister the valid commands of the session changed callback
674161847f8eSopenharmony_ci     * @param { 'validCommandChange' } type - 'validCommandChange'
674261847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle the changes.
674361847f8eSopenharmony_ci     * The callback function provides an array of AVControlCommandType.
674461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
674561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
674661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
674761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
674861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
674961847f8eSopenharmony_ci     * @atomicservice
675061847f8eSopenharmony_ci     * @since 12
675161847f8eSopenharmony_ci     */
675261847f8eSopenharmony_ci    off(type: 'validCommandChange', callback?: (commands: Array<AVControlCommandType>) => void);
675361847f8eSopenharmony_ci
675461847f8eSopenharmony_ci    /**
675561847f8eSopenharmony_ci     * Register session output device change callback
675661847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Registration Type 'outputDeviceChange'
675761847f8eSopenharmony_ci     * @param { function } callback - Used to handle output device changed.
675861847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo} and related connection state {@link ConnectionState}.
675961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
676061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
676161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
676261847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist
676361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
676461847f8eSopenharmony_ci     * @since 10
676561847f8eSopenharmony_ci     */
676661847f8eSopenharmony_ci    /**
676761847f8eSopenharmony_ci     * Register session output device change callback
676861847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Registration Type 'outputDeviceChange'
676961847f8eSopenharmony_ci     * @param { function } callback - Used to handle output device changed.
677061847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo} and related connection state {@link ConnectionState}.
677161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
677261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
677361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
677461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist
677561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
677661847f8eSopenharmony_ci     * @atomicservice
677761847f8eSopenharmony_ci     * @since 12
677861847f8eSopenharmony_ci     */
677961847f8eSopenharmony_ci    on(type: 'outputDeviceChange', callback: (state: ConnectionState, device: OutputDeviceInfo) => void): void;
678061847f8eSopenharmony_ci
678161847f8eSopenharmony_ci    /**
678261847f8eSopenharmony_ci     * Unregister session output device change callback
678361847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Registration Type 'outputDeviceChange'
678461847f8eSopenharmony_ci     * @param { function } callback - Used to handle output device changed.
678561847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo} and related connection state {@link ConnectionState}.
678661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
678761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
678861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
678961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist
679061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
679161847f8eSopenharmony_ci     * @since 10
679261847f8eSopenharmony_ci     */
679361847f8eSopenharmony_ci    /**
679461847f8eSopenharmony_ci     * Unregister session output device change callback
679561847f8eSopenharmony_ci     * @param { 'outputDeviceChange' } type - Registration Type 'outputDeviceChange'
679661847f8eSopenharmony_ci     * @param { function } callback - Used to handle output device changed.
679761847f8eSopenharmony_ci     * The callback provide the new device info {@link OutputDeviceInfo} and related connection state {@link ConnectionState}.
679861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
679961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
680061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception
680161847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist
680261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
680361847f8eSopenharmony_ci     * @atomicservice
680461847f8eSopenharmony_ci     * @since 12
680561847f8eSopenharmony_ci     */
680661847f8eSopenharmony_ci    off(type: 'outputDeviceChange', callback?: (state: ConnectionState, device: OutputDeviceInfo) => void): void;
680761847f8eSopenharmony_ci
680861847f8eSopenharmony_ci    /**
680961847f8eSopenharmony_ci     * Register session event callback
681061847f8eSopenharmony_ci     * @param { 'sessionEvent' } type - 'sessionEvent'
681161847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle session event changed event.
681261847f8eSopenharmony_ci     * The callback function provides the event string and key-value pair parameters.
681361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
681461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
681561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
681661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
681761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
681861847f8eSopenharmony_ci     * @since 10
681961847f8eSopenharmony_ci     */
682061847f8eSopenharmony_ci    /**
682161847f8eSopenharmony_ci     * Register session event callback
682261847f8eSopenharmony_ci     * @param { 'sessionEvent' } type - 'sessionEvent'
682361847f8eSopenharmony_ci     * @param { function } callback - The callback used to handle session event changed event.
682461847f8eSopenharmony_ci     * The callback function provides the event string and key-value pair parameters.
682561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
682661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
682761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
682861847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
682961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
683061847f8eSopenharmony_ci     * @atomicservice
683161847f8eSopenharmony_ci     * @since 12
683261847f8eSopenharmony_ci     */
683361847f8eSopenharmony_ci    on(type: 'sessionEvent', callback: (sessionEvent: string, args: {[key: string]: Object}) => void): void;
683461847f8eSopenharmony_ci
683561847f8eSopenharmony_ci    /**
683661847f8eSopenharmony_ci     * Unregister session event callback
683761847f8eSopenharmony_ci     * @param { 'sessionEvent' } type - 'sessionEvent'
683861847f8eSopenharmony_ci     * @param { function } callback - Used to cancel a specific listener
683961847f8eSopenharmony_ci     * The callback function provides the event string and key-value pair parameters.
684061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
684161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
684261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
684361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
684461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
684561847f8eSopenharmony_ci     * @since 10
684661847f8eSopenharmony_ci     */
684761847f8eSopenharmony_ci    /**
684861847f8eSopenharmony_ci     * Unregister session event callback
684961847f8eSopenharmony_ci     * @param { 'sessionEvent' } type - 'sessionEvent'
685061847f8eSopenharmony_ci     * @param { function } callback - Used to cancel a specific listener
685161847f8eSopenharmony_ci     * The callback function provides the event string and key-value pair parameters.
685261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
685361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
685461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
685561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
685661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
685761847f8eSopenharmony_ci     * @atomicservice
685861847f8eSopenharmony_ci     * @since 12
685961847f8eSopenharmony_ci     */
686061847f8eSopenharmony_ci    off(type: 'sessionEvent', callback?: (sessionEvent: string, args: {[key: string]: Object}) => void): void;
686161847f8eSopenharmony_ci
686261847f8eSopenharmony_ci    /**
686361847f8eSopenharmony_ci     * Register session playlist change callback
686461847f8eSopenharmony_ci     * @param { 'queueItemsChange' } type - Registration Type 'queueItemsChange'
686561847f8eSopenharmony_ci     * @param { function } callback - Used to handle playlist changed.
686661847f8eSopenharmony_ci     * The callback provides the new array of AVQueueItem {@link AVQueueItem}
686761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
686861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
686961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
687061847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
687161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
687261847f8eSopenharmony_ci     * @since 10
687361847f8eSopenharmony_ci     */
687461847f8eSopenharmony_ci    /**
687561847f8eSopenharmony_ci     * Register session playlist change callback
687661847f8eSopenharmony_ci     * @param { 'queueItemsChange' } type - Registration Type 'queueItemsChange'
687761847f8eSopenharmony_ci     * @param { function } callback - Used to handle playlist changed.
687861847f8eSopenharmony_ci     * The callback provides the new array of AVQueueItem {@link AVQueueItem}
687961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
688061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
688161847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
688261847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
688361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
688461847f8eSopenharmony_ci     * @atomicservice
688561847f8eSopenharmony_ci     * @since 12
688661847f8eSopenharmony_ci     */
688761847f8eSopenharmony_ci    on(type: 'queueItemsChange', callback: (items: Array<AVQueueItem>) => void): void;
688861847f8eSopenharmony_ci
688961847f8eSopenharmony_ci    /**
689061847f8eSopenharmony_ci     * Unregister session playlist change callback
689161847f8eSopenharmony_ci     * @param { 'queueItemsChange' } type - Registration Type 'queueItemsChange'
689261847f8eSopenharmony_ci     * @param { function } callback - Used to handle playlist changed.
689361847f8eSopenharmony_ci     * The callback provides the new array of AVQueueItem {@link AVQueueItem}
689461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
689561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
689661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
689761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
689861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
689961847f8eSopenharmony_ci     * @since 10
690061847f8eSopenharmony_ci     */
690161847f8eSopenharmony_ci    /**
690261847f8eSopenharmony_ci     * Unregister session playlist change callback
690361847f8eSopenharmony_ci     * @param { 'queueItemsChange' } type - Registration Type 'queueItemsChange'
690461847f8eSopenharmony_ci     * @param { function } callback - Used to handle playlist changed.
690561847f8eSopenharmony_ci     * The callback provides the new array of AVQueueItem {@link AVQueueItem}
690661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
690761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
690861847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
690961847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
691061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
691161847f8eSopenharmony_ci     * @atomicservice
691261847f8eSopenharmony_ci     * @since 12
691361847f8eSopenharmony_ci     */
691461847f8eSopenharmony_ci    off(type: 'queueItemsChange', callback?: (items: Array<AVQueueItem>) => void): void;
691561847f8eSopenharmony_ci
691661847f8eSopenharmony_ci    /**
691761847f8eSopenharmony_ci     * Register the name of session playlist change callback
691861847f8eSopenharmony_ci     * @param { 'queueTitleChange' } type - Registration Type 'queueTitleChange'
691961847f8eSopenharmony_ci     * @param { function } callback - Used to handle name of playlist changed.
692061847f8eSopenharmony_ci     * The callback provides the new name.
692161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
692261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
692361847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
692461847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
692561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
692661847f8eSopenharmony_ci     * @since 10
692761847f8eSopenharmony_ci     */
692861847f8eSopenharmony_ci    /**
692961847f8eSopenharmony_ci     * Register the name of session playlist change callback
693061847f8eSopenharmony_ci     * @param { 'queueTitleChange' } type - Registration Type 'queueTitleChange'
693161847f8eSopenharmony_ci     * @param { function } callback - Used to handle name of playlist changed.
693261847f8eSopenharmony_ci     * The callback provides the new name.
693361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
693461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
693561847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
693661847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
693761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
693861847f8eSopenharmony_ci     * @atomicservice
693961847f8eSopenharmony_ci     * @since 12
694061847f8eSopenharmony_ci     */
694161847f8eSopenharmony_ci    on(type: 'queueTitleChange', callback: (title: string) => void): void;
694261847f8eSopenharmony_ci
694361847f8eSopenharmony_ci    /**
694461847f8eSopenharmony_ci     * Unregister the name of session playlist change callback
694561847f8eSopenharmony_ci     * @param { 'queueTitleChange' } type - Registration Type 'queueTitleChange'
694661847f8eSopenharmony_ci     * @param { function } callback - Used to handle name of playlist changed.
694761847f8eSopenharmony_ci     * The callback provides the new name.
694861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
694961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
695061847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
695161847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
695261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
695361847f8eSopenharmony_ci     * @since 10
695461847f8eSopenharmony_ci     */
695561847f8eSopenharmony_ci    /**
695661847f8eSopenharmony_ci     * Unregister the name of session playlist change callback
695761847f8eSopenharmony_ci     * @param { 'queueTitleChange' } type - Registration Type 'queueTitleChange'
695861847f8eSopenharmony_ci     * @param { function } callback - Used to handle name of playlist changed.
695961847f8eSopenharmony_ci     * The callback provides the new name.
696061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
696161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
696261847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
696361847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
696461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
696561847f8eSopenharmony_ci     * @atomicservice
696661847f8eSopenharmony_ci     * @since 12
696761847f8eSopenharmony_ci     */
696861847f8eSopenharmony_ci    off(type: 'queueTitleChange', callback?: (title: string) => void): void;
696961847f8eSopenharmony_ci
697061847f8eSopenharmony_ci    /**
697161847f8eSopenharmony_ci     * Register the custom media packets change callback
697261847f8eSopenharmony_ci     * @param { 'extrasChange' } type - Registration Type 'extrasChange'
697361847f8eSopenharmony_ci     * @param { function } callback - Used to handle custom media packets changed.
697461847f8eSopenharmony_ci     * The callback provides the new media packets.
697561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
697661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
697761847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
697861847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
697961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
698061847f8eSopenharmony_ci     * @since 10
698161847f8eSopenharmony_ci     */
698261847f8eSopenharmony_ci    /**
698361847f8eSopenharmony_ci     * Register the custom media packets change callback
698461847f8eSopenharmony_ci     * @param { 'extrasChange' } type - Registration Type 'extrasChange'
698561847f8eSopenharmony_ci     * @param { function } callback - Used to handle custom media packets changed.
698661847f8eSopenharmony_ci     * The callback provides the new media packets.
698761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
698861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
698961847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
699061847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
699161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
699261847f8eSopenharmony_ci     * @atomicservice
699361847f8eSopenharmony_ci     * @since 12
699461847f8eSopenharmony_ci     */
699561847f8eSopenharmony_ci    on(type: 'extrasChange', callback: (extras: {[key: string]: Object}) => void): void;
699661847f8eSopenharmony_ci
699761847f8eSopenharmony_ci    /**
699861847f8eSopenharmony_ci     * Unregister the custom media packets change callback
699961847f8eSopenharmony_ci     * @param { 'extrasChange' } type - Registration Type 'extrasChange'
700061847f8eSopenharmony_ci     * @param { function } callback - Used to handle custom media packets changed.
700161847f8eSopenharmony_ci     * The callback provides the new media packets.
700261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
700361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
700461847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
700561847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
700661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
700761847f8eSopenharmony_ci     * @since 10
700861847f8eSopenharmony_ci     */
700961847f8eSopenharmony_ci    /**
701061847f8eSopenharmony_ci     * Unregister the custom media packets change callback
701161847f8eSopenharmony_ci     * @param { 'extrasChange' } type - Registration Type 'extrasChange'
701261847f8eSopenharmony_ci     * @param { function } callback - Used to handle custom media packets changed.
701361847f8eSopenharmony_ci     * The callback provides the new media packets.
701461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified.
701561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
701661847f8eSopenharmony_ci     * @throws { BusinessError } 6600101 - Session service exception.
701761847f8eSopenharmony_ci     * @throws { BusinessError } 6600103 - The session controller does not exist.
701861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
701961847f8eSopenharmony_ci     * @atomicservice
702061847f8eSopenharmony_ci     * @since 12
702161847f8eSopenharmony_ci     */
702261847f8eSopenharmony_ci    off(type: 'extrasChange', callback?: (extras: {[key: string]: Object}) => void): void;
702361847f8eSopenharmony_ci  }
702461847f8eSopenharmony_ci
702561847f8eSopenharmony_ci  /**
702661847f8eSopenharmony_ci   * The type of control command
702761847f8eSopenharmony_ci   * @typedef { 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind' | 'seek' |
702861847f8eSopenharmony_ci   *     'setSpeed' | 'setLoopMode' | 'toggleFavorite' } AVControlCommandType
702961847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
703061847f8eSopenharmony_ci   * @since 10
703161847f8eSopenharmony_ci   */
703261847f8eSopenharmony_ci  /**
703361847f8eSopenharmony_ci   * The type of control command, add new support 'playFromAssetId' | 'answer' | 'hangUp' | 'toggleCallMute'
703461847f8eSopenharmony_ci   * @typedef { 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind' | 'seek' |
703561847f8eSopenharmony_ci   *     'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'playFromAssetId' | 'answer' | 'hangUp' |
703661847f8eSopenharmony_ci   *     'toggleCallMute' } AVControlCommandType
703761847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
703861847f8eSopenharmony_ci   * @since 11
703961847f8eSopenharmony_ci   */
704061847f8eSopenharmony_ci  /**
704161847f8eSopenharmony_ci   * The type of control command, add new support 'playFromAssetId' | 'answer' | 'hangUp' | 'toggleCallMute'
704261847f8eSopenharmony_ci   * @typedef { 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind' | 'seek' |
704361847f8eSopenharmony_ci   *     'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'playFromAssetId' | 'answer' | 'hangUp' |
704461847f8eSopenharmony_ci   *     'toggleCallMute' } AVControlCommandType
704561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
704661847f8eSopenharmony_ci   * @atomicservice
704761847f8eSopenharmony_ci   * @since 12
704861847f8eSopenharmony_ci   */
704961847f8eSopenharmony_ci  type AVControlCommandType = 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind' |
705061847f8eSopenharmony_ci  'seek' | 'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'playFromAssetId' | 'answer' | 'hangUp' | 'toggleCallMute';
705161847f8eSopenharmony_ci
705261847f8eSopenharmony_ci  /**
705361847f8eSopenharmony_ci   * The definition of command to be sent to the session
705461847f8eSopenharmony_ci   * @interface AVControlCommand
705561847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
705661847f8eSopenharmony_ci   * @since 10
705761847f8eSopenharmony_ci   */
705861847f8eSopenharmony_ci  /**
705961847f8eSopenharmony_ci   * The definition of command to be sent to the session
706061847f8eSopenharmony_ci   * @typedef AVControlCommand
706161847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
706261847f8eSopenharmony_ci   * @atomicservice
706361847f8eSopenharmony_ci   * @since 12
706461847f8eSopenharmony_ci   */
706561847f8eSopenharmony_ci  interface AVControlCommand {
706661847f8eSopenharmony_ci    /**
706761847f8eSopenharmony_ci     * The command value {@link AVControlCommandType}
706861847f8eSopenharmony_ci     * @type { AVControlCommandType }
706961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
707061847f8eSopenharmony_ci     * @since 10
707161847f8eSopenharmony_ci     */
707261847f8eSopenharmony_ci    /**
707361847f8eSopenharmony_ci     * The command value {@link AVControlCommandType}
707461847f8eSopenharmony_ci     * @type { AVControlCommandType }
707561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
707661847f8eSopenharmony_ci     * @atomicservice
707761847f8eSopenharmony_ci     * @since 12
707861847f8eSopenharmony_ci     */
707961847f8eSopenharmony_ci    command: AVControlCommandType;
708061847f8eSopenharmony_ci
708161847f8eSopenharmony_ci    /**
708261847f8eSopenharmony_ci     * parameter of the command. Whether this command requires parameters, see {@link AVSessionCommand}
708361847f8eSopenharmony_ci     * seek command requires a number parameter
708461847f8eSopenharmony_ci     * setSpeed command requires a number parameter
708561847f8eSopenharmony_ci     * setLoopMode command requires a {@link LoopMode} parameter.
708661847f8eSopenharmony_ci     * toggleFavorite command requires assetId {@link AVMetadata.assetId} parameter
708761847f8eSopenharmony_ci     * other commands need no parameter
708861847f8eSopenharmony_ci     * @type { ?(LoopMode | string | number) }
708961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
709061847f8eSopenharmony_ci     * @since 10
709161847f8eSopenharmony_ci     */
709261847f8eSopenharmony_ci    /**
709361847f8eSopenharmony_ci     * parameter of the command. Whether this command requires parameters, see {@link AVSessionCommand}
709461847f8eSopenharmony_ci     * seek command requires a number parameter
709561847f8eSopenharmony_ci     * setSpeed command requires a number parameter
709661847f8eSopenharmony_ci     * setLoopMode command requires a {@link LoopMode} parameter.
709761847f8eSopenharmony_ci     * toggleFavorite command requires assetId {@link AVMetadata.assetId} parameter
709861847f8eSopenharmony_ci     * other commands need no parameter
709961847f8eSopenharmony_ci     * @type { ?(LoopMode | string | number) }
710061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
710161847f8eSopenharmony_ci     * @atomicservice
710261847f8eSopenharmony_ci     * @since 12
710361847f8eSopenharmony_ci     */
710461847f8eSopenharmony_ci    parameter?: LoopMode | string | number;
710561847f8eSopenharmony_ci  }
710661847f8eSopenharmony_ci
710761847f8eSopenharmony_ci  /**
710861847f8eSopenharmony_ci   * Enumerates ErrorCode types, returns in BusinessError.code.
710961847f8eSopenharmony_ci   * @enum { number }
711061847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
711161847f8eSopenharmony_ci   * @since 10
711261847f8eSopenharmony_ci   */
711361847f8eSopenharmony_ci  /**
711461847f8eSopenharmony_ci   * Enumerates ErrorCode types, returns in BusinessError.code.
711561847f8eSopenharmony_ci   * @enum { number }
711661847f8eSopenharmony_ci   * @syscap SystemCapability.Multimedia.AVSession.Core
711761847f8eSopenharmony_ci   * @atomicservice
711861847f8eSopenharmony_ci   * @since 12
711961847f8eSopenharmony_ci   */
712061847f8eSopenharmony_ci  enum AVSessionErrorCode {
712161847f8eSopenharmony_ci    /**
712261847f8eSopenharmony_ci     * Session service exception.
712361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
712461847f8eSopenharmony_ci     * @since 10
712561847f8eSopenharmony_ci     */
712661847f8eSopenharmony_ci    /**
712761847f8eSopenharmony_ci     * Session service exception.
712861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
712961847f8eSopenharmony_ci     * @atomicservice
713061847f8eSopenharmony_ci     * @since 12
713161847f8eSopenharmony_ci     */
713261847f8eSopenharmony_ci    ERR_CODE_SERVICE_EXCEPTION = 6600101,
713361847f8eSopenharmony_ci
713461847f8eSopenharmony_ci    /**
713561847f8eSopenharmony_ci     * The session does not exist
713661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
713761847f8eSopenharmony_ci     * @since 10
713861847f8eSopenharmony_ci     */
713961847f8eSopenharmony_ci    /**
714061847f8eSopenharmony_ci     * The session does not exist
714161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
714261847f8eSopenharmony_ci     * @atomicservice
714361847f8eSopenharmony_ci     * @since 12
714461847f8eSopenharmony_ci     */
714561847f8eSopenharmony_ci    ERR_CODE_SESSION_NOT_EXIST = 6600102,
714661847f8eSopenharmony_ci
714761847f8eSopenharmony_ci    /**
714861847f8eSopenharmony_ci     * The session controller does not exist.
714961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
715061847f8eSopenharmony_ci     * @since 10
715161847f8eSopenharmony_ci     */
715261847f8eSopenharmony_ci    /**
715361847f8eSopenharmony_ci     * The session controller does not exist.
715461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
715561847f8eSopenharmony_ci     * @atomicservice
715661847f8eSopenharmony_ci     * @since 12
715761847f8eSopenharmony_ci     */
715861847f8eSopenharmony_ci    ERR_CODE_CONTROLLER_NOT_EXIST = 6600103,
715961847f8eSopenharmony_ci
716061847f8eSopenharmony_ci    /**
716161847f8eSopenharmony_ci     * The remote session connection failed.
716261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
716361847f8eSopenharmony_ci     * @since 10
716461847f8eSopenharmony_ci     */
716561847f8eSopenharmony_ci    /**
716661847f8eSopenharmony_ci     * The remote session connection failed.
716761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
716861847f8eSopenharmony_ci     * @atomicservice
716961847f8eSopenharmony_ci     * @since 12
717061847f8eSopenharmony_ci     */
717161847f8eSopenharmony_ci    ERR_CODE_REMOTE_CONNECTION_ERR = 6600104,
717261847f8eSopenharmony_ci
717361847f8eSopenharmony_ci    /**
717461847f8eSopenharmony_ci     * Invalid session command.
717561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
717661847f8eSopenharmony_ci     * @since 10
717761847f8eSopenharmony_ci     */
717861847f8eSopenharmony_ci    /**
717961847f8eSopenharmony_ci     * Invalid session command.
718061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
718161847f8eSopenharmony_ci     * @atomicservice
718261847f8eSopenharmony_ci     * @since 12
718361847f8eSopenharmony_ci     */
718461847f8eSopenharmony_ci    ERR_CODE_COMMAND_INVALID = 6600105,
718561847f8eSopenharmony_ci
718661847f8eSopenharmony_ci    /**
718761847f8eSopenharmony_ci     * The session is not activated.
718861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
718961847f8eSopenharmony_ci     * @since 10
719061847f8eSopenharmony_ci     */
719161847f8eSopenharmony_ci    /**
719261847f8eSopenharmony_ci     * The session is not activated.
719361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
719461847f8eSopenharmony_ci     * @atomicservice
719561847f8eSopenharmony_ci     * @since 12
719661847f8eSopenharmony_ci     */
719761847f8eSopenharmony_ci    ERR_CODE_SESSION_INACTIVE = 6600106,
719861847f8eSopenharmony_ci
719961847f8eSopenharmony_ci    /**
720061847f8eSopenharmony_ci     * Too many commands or events.
720161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
720261847f8eSopenharmony_ci     * @since 10
720361847f8eSopenharmony_ci     */
720461847f8eSopenharmony_ci    /**
720561847f8eSopenharmony_ci     * Too many commands or events.
720661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
720761847f8eSopenharmony_ci     * @atomicservice
720861847f8eSopenharmony_ci     * @since 12
720961847f8eSopenharmony_ci     */
721061847f8eSopenharmony_ci    ERR_CODE_MESSAGE_OVERLOAD = 6600107,
721161847f8eSopenharmony_ci
721261847f8eSopenharmony_ci    /**
721361847f8eSopenharmony_ci     * Device connecting failed.
721461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
721561847f8eSopenharmony_ci     * @since 10
721661847f8eSopenharmony_ci     */
721761847f8eSopenharmony_ci    /**
721861847f8eSopenharmony_ci     * Device connecting failed.
721961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
722061847f8eSopenharmony_ci     * @atomicservice
722161847f8eSopenharmony_ci     * @since 12
722261847f8eSopenharmony_ci     */
722361847f8eSopenharmony_ci    ERR_CODE_DEVICE_CONNECTION_FAILED = 6600108,
722461847f8eSopenharmony_ci
722561847f8eSopenharmony_ci    /**
722661847f8eSopenharmony_ci     * The remote connection is not established.
722761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
722861847f8eSopenharmony_ci     * @since 10
722961847f8eSopenharmony_ci     */
723061847f8eSopenharmony_ci    /**
723161847f8eSopenharmony_ci     * The remote connection is not established.
723261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.Core
723361847f8eSopenharmony_ci     * @atomicservice
723461847f8eSopenharmony_ci     * @since 12
723561847f8eSopenharmony_ci     */
723661847f8eSopenharmony_ci    ERR_CODE_REMOTE_CONNECTION_NOT_EXIST = 6600109,
723761847f8eSopenharmony_ci
723861847f8eSopenharmony_ci    /**
723961847f8eSopenharmony_ci     * The error code for cast control is unspecified.
724061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
724161847f8eSopenharmony_ci     * @atomicservice
724261847f8eSopenharmony_ci     * @since 13
724361847f8eSopenharmony_ci     */
724461847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_UNSPECIFIED = 6611000,
724561847f8eSopenharmony_ci
724661847f8eSopenharmony_ci    /**
724761847f8eSopenharmony_ci     * An unspecified error occurs in the remote player.
724861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
724961847f8eSopenharmony_ci     * @atomicservice
725061847f8eSopenharmony_ci     * @since 13
725161847f8eSopenharmony_ci     */
725261847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_REMOTE_ERROR = 6611001,
725361847f8eSopenharmony_ci
725461847f8eSopenharmony_ci    /**
725561847f8eSopenharmony_ci     * The playback position falls behind the live window.
725661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
725761847f8eSopenharmony_ci     * @atomicservice
725861847f8eSopenharmony_ci     * @since 13
725961847f8eSopenharmony_ci     */
726061847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_BEHIND_LIVE_WINDOW = 6611002,
726161847f8eSopenharmony_ci
726261847f8eSopenharmony_ci    /**
726361847f8eSopenharmony_ci     * The process of cast control times out.
726461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
726561847f8eSopenharmony_ci     * @atomicservice
726661847f8eSopenharmony_ci     * @since 13
726761847f8eSopenharmony_ci     */
726861847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_TIMEOUT = 6611003,
726961847f8eSopenharmony_ci
727061847f8eSopenharmony_ci    /**
727161847f8eSopenharmony_ci     * The runtime check failed.
727261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
727361847f8eSopenharmony_ci     * @atomicservice
727461847f8eSopenharmony_ci     * @since 13
727561847f8eSopenharmony_ci     */
727661847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_RUNTIME_CHECK_FAILED = 6611004,
727761847f8eSopenharmony_ci
727861847f8eSopenharmony_ci    /**
727961847f8eSopenharmony_ci     * Cross-device data transmission is locked.
728061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
728161847f8eSopenharmony_ci     * @atomicservice
728261847f8eSopenharmony_ci     * @since 13
728361847f8eSopenharmony_ci     */
728461847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_PLAYER_NOT_WORKING = 6611100,
728561847f8eSopenharmony_ci
728661847f8eSopenharmony_ci    /**
728761847f8eSopenharmony_ci     * The specified seek mode is not supported.
728861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
728961847f8eSopenharmony_ci     * @atomicservice
729061847f8eSopenharmony_ci     * @since 13
729161847f8eSopenharmony_ci     */
729261847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_SEEK_MODE_UNSUPPORTED = 6611101,
729361847f8eSopenharmony_ci
729461847f8eSopenharmony_ci    /**
729561847f8eSopenharmony_ci     * The position to seek to is out of the range of the media asset or the specified seek mode is not supported.
729661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
729761847f8eSopenharmony_ci     * @atomicservice
729861847f8eSopenharmony_ci     * @since 13
729961847f8eSopenharmony_ci     */
730061847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_ILLEGAL_SEEK_TARGET = 6611102,
730161847f8eSopenharmony_ci
730261847f8eSopenharmony_ci    /**
730361847f8eSopenharmony_ci     * The specified playback mode is not supported.
730461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
730561847f8eSopenharmony_ci     * @atomicservice
730661847f8eSopenharmony_ci     * @since 13
730761847f8eSopenharmony_ci     */
730861847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_PLAY_MODE_UNSUPPORTED = 6611103,
730961847f8eSopenharmony_ci
731061847f8eSopenharmony_ci    /**
731161847f8eSopenharmony_ci     * The specified playback speed is not supported.
731261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
731361847f8eSopenharmony_ci     * @atomicservice
731461847f8eSopenharmony_ci     * @since 13
731561847f8eSopenharmony_ci     */
731661847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_PLAY_SPEED_UNSUPPORTED = 6611104,
731761847f8eSopenharmony_ci
731861847f8eSopenharmony_ci    /**
731961847f8eSopenharmony_ci     * The action failed because either the media source device or the media sink device has been revoked.
732061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
732161847f8eSopenharmony_ci     * @atomicservice
732261847f8eSopenharmony_ci     * @since 13
732361847f8eSopenharmony_ci     */
732461847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DEVICE_MISSING = 6611105,
732561847f8eSopenharmony_ci
732661847f8eSopenharmony_ci    /**
732761847f8eSopenharmony_ci     * The parameter is invalid, for example, the url is illegal to play.
732861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
732961847f8eSopenharmony_ci     * @atomicservice
733061847f8eSopenharmony_ci     * @since 13
733161847f8eSopenharmony_ci     */
733261847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_INVALID_PARAM = 6611106,
733361847f8eSopenharmony_ci
733461847f8eSopenharmony_ci    /**
733561847f8eSopenharmony_ci     * Allocation of memory failed.
733661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
733761847f8eSopenharmony_ci     * @atomicservice
733861847f8eSopenharmony_ci     * @since 13
733961847f8eSopenharmony_ci     */
734061847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_NO_MEMORY = 6611107,
734161847f8eSopenharmony_ci
734261847f8eSopenharmony_ci    /**
734361847f8eSopenharmony_ci     * Operation is not allowed.
734461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
734561847f8eSopenharmony_ci     * @atomicservice
734661847f8eSopenharmony_ci     * @since 13
734761847f8eSopenharmony_ci     */
734861847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_OPERATION_NOT_ALLOWED = 6611108,
734961847f8eSopenharmony_ci
735061847f8eSopenharmony_ci    /**
735161847f8eSopenharmony_ci     * An unspecified input/output error occurs.
735261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
735361847f8eSopenharmony_ci     * @atomicservice
735461847f8eSopenharmony_ci     * @since 13
735561847f8eSopenharmony_ci     */
735661847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_UNSPECIFIED = 6612000,
735761847f8eSopenharmony_ci
735861847f8eSopenharmony_ci    /**
735961847f8eSopenharmony_ci     * Network connection failure.
736061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
736161847f8eSopenharmony_ci     * @atomicservice
736261847f8eSopenharmony_ci     * @since 13
736361847f8eSopenharmony_ci     */
736461847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_NETWORK_CONNECTION_FAILED = 6612001,
736561847f8eSopenharmony_ci
736661847f8eSopenharmony_ci    /**
736761847f8eSopenharmony_ci     * Network timeout.
736861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
736961847f8eSopenharmony_ci     * @atomicservice
737061847f8eSopenharmony_ci     * @since 13
737161847f8eSopenharmony_ci     */
737261847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_NETWORK_CONNECTION_TIMEOUT = 6612002,
737361847f8eSopenharmony_ci
737461847f8eSopenharmony_ci    /**
737561847f8eSopenharmony_ci     * Invalid "Content-Type" HTTP header.
737661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
737761847f8eSopenharmony_ci     * @atomicservice
737861847f8eSopenharmony_ci     * @since 13
737961847f8eSopenharmony_ci     */
738061847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_INVALID_HTTP_CONTENT_TYPE = 6612003,
738161847f8eSopenharmony_ci
738261847f8eSopenharmony_ci    /**
738361847f8eSopenharmony_ci     * The HTTP server returns an unexpected HTTP response status code.
738461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
738561847f8eSopenharmony_ci     * @atomicservice
738661847f8eSopenharmony_ci     * @since 13
738761847f8eSopenharmony_ci     */
738861847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_BAD_HTTP_STATUS = 6612004,
738961847f8eSopenharmony_ci
739061847f8eSopenharmony_ci    /**
739161847f8eSopenharmony_ci     * The file does not exist.
739261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
739361847f8eSopenharmony_ci     * @atomicservice
739461847f8eSopenharmony_ci     * @since 13
739561847f8eSopenharmony_ci     */
739661847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_FILE_NOT_FOUND = 6612005,
739761847f8eSopenharmony_ci
739861847f8eSopenharmony_ci    /**
739961847f8eSopenharmony_ci     * No permission is granted to perform the IO operation.
740061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
740161847f8eSopenharmony_ci     * @atomicservice
740261847f8eSopenharmony_ci     * @since 13
740361847f8eSopenharmony_ci     */
740461847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_NO_PERMISSION = 6612006,
740561847f8eSopenharmony_ci
740661847f8eSopenharmony_ci    /**
740761847f8eSopenharmony_ci     * Access to cleartext HTTP traffic is not allowed by the app's network security configuration.
740861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
740961847f8eSopenharmony_ci     * @atomicservice
741061847f8eSopenharmony_ci     * @since 13
741161847f8eSopenharmony_ci     */
741261847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_CLEARTEXT_NOT_PERMITTED = 6612007,
741361847f8eSopenharmony_ci
741461847f8eSopenharmony_ci    /**
741561847f8eSopenharmony_ci     * Reading data out of the data bound.
741661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
741761847f8eSopenharmony_ci     * @atomicservice
741861847f8eSopenharmony_ci     * @since 13
741961847f8eSopenharmony_ci     */
742061847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_READ_POSITION_OUT_OF_RANGE = 6612008,
742161847f8eSopenharmony_ci
742261847f8eSopenharmony_ci    /**
742361847f8eSopenharmony_ci     * The media does not contain any contents that can be played.
742461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
742561847f8eSopenharmony_ci     * @atomicservice
742661847f8eSopenharmony_ci     * @since 13
742761847f8eSopenharmony_ci     */
742861847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_NO_CONTENTS = 6612100,
742961847f8eSopenharmony_ci
743061847f8eSopenharmony_ci    /**
743161847f8eSopenharmony_ci     * The media cannot be read, for example, because of dust or scratches.
743261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
743361847f8eSopenharmony_ci     * @atomicservice
743461847f8eSopenharmony_ci     * @since 13
743561847f8eSopenharmony_ci     */
743661847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_READ_ERROR = 6612101,
743761847f8eSopenharmony_ci
743861847f8eSopenharmony_ci    /**
743961847f8eSopenharmony_ci     * This resource is already in use.
744061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
744161847f8eSopenharmony_ci     * @atomicservice
744261847f8eSopenharmony_ci     * @since 13
744361847f8eSopenharmony_ci     */
744461847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_CONTENT_BUSY = 6612102,
744561847f8eSopenharmony_ci
744661847f8eSopenharmony_ci    /**
744761847f8eSopenharmony_ci     * The content using the validity interval has expired.
744861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
744961847f8eSopenharmony_ci     * @atomicservice
745061847f8eSopenharmony_ci     * @since 13
745161847f8eSopenharmony_ci     */
745261847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_CONTENT_EXPIRED = 6612103,
745361847f8eSopenharmony_ci
745461847f8eSopenharmony_ci    /**
745561847f8eSopenharmony_ci     * Using the requested content to play is not allowed.
745661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
745761847f8eSopenharmony_ci     * @atomicservice
745861847f8eSopenharmony_ci     * @since 13
745961847f8eSopenharmony_ci     */
746061847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_USE_FORBIDDEN = 6612104,
746161847f8eSopenharmony_ci
746261847f8eSopenharmony_ci    /**
746361847f8eSopenharmony_ci     * The use of the allowed content cannot be verified.
746461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
746561847f8eSopenharmony_ci     * @atomicservice
746661847f8eSopenharmony_ci     * @since 13
746761847f8eSopenharmony_ci     */
746861847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_NOT_VERIFIED = 6612105,
746961847f8eSopenharmony_ci
747061847f8eSopenharmony_ci    /**
747161847f8eSopenharmony_ci     * The number of times this content has been used as requested has reached the maximum allowed number of uses.
747261847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
747361847f8eSopenharmony_ci     * @atomicservice
747461847f8eSopenharmony_ci     * @since 13
747561847f8eSopenharmony_ci     */
747661847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_EXHAUSTED_ALLOWED_USES = 6612106,
747761847f8eSopenharmony_ci
747861847f8eSopenharmony_ci    /**
747961847f8eSopenharmony_ci     * An error occurs when sending packet from source device to sink device.
748061847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
748161847f8eSopenharmony_ci     * @atomicservice
748261847f8eSopenharmony_ci     * @since 13
748361847f8eSopenharmony_ci     */
748461847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_IO_NETWORK_PACKET_SENDING_FAILED = 6612107,
748561847f8eSopenharmony_ci
748661847f8eSopenharmony_ci    /**
748761847f8eSopenharmony_ci     * Unspecified error related to content parsing.
748861847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
748961847f8eSopenharmony_ci     * @atomicservice
749061847f8eSopenharmony_ci     * @since 13
749161847f8eSopenharmony_ci     */
749261847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_PARSING_UNSPECIFIED = 6613000,
749361847f8eSopenharmony_ci
749461847f8eSopenharmony_ci    /**
749561847f8eSopenharmony_ci     * Parsing error associated with media container format bit streams.
749661847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
749761847f8eSopenharmony_ci     * @atomicservice
749861847f8eSopenharmony_ci     * @since 13
749961847f8eSopenharmony_ci     */
750061847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_PARSING_CONTAINER_MALFORMED = 6613001,
750161847f8eSopenharmony_ci
750261847f8eSopenharmony_ci    /**
750361847f8eSopenharmony_ci     * Parsing error associated with the media manifest.
750461847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
750561847f8eSopenharmony_ci     * @atomicservice
750661847f8eSopenharmony_ci     * @since 13
750761847f8eSopenharmony_ci     */
750861847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_PARSING_MANIFEST_MALFORMED = 6613002,
750961847f8eSopenharmony_ci
751061847f8eSopenharmony_ci    /**
751161847f8eSopenharmony_ci     * An error occurs when attempting to extract a file with an unsupported media container format
751261847f8eSopenharmony_ci     * or an unsupported media container feature.
751361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
751461847f8eSopenharmony_ci     * @atomicservice
751561847f8eSopenharmony_ci     * @since 13
751661847f8eSopenharmony_ci     */
751761847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_PARSING_CONTAINER_UNSUPPORTED = 6613003,
751861847f8eSopenharmony_ci
751961847f8eSopenharmony_ci    /**
752061847f8eSopenharmony_ci     * Unsupported feature in the media manifest.
752161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
752261847f8eSopenharmony_ci     * @atomicservice
752361847f8eSopenharmony_ci     * @since 13
752461847f8eSopenharmony_ci     */
752561847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_PARSING_MANIFEST_UNSUPPORTED = 6613004,
752661847f8eSopenharmony_ci
752761847f8eSopenharmony_ci    /**
752861847f8eSopenharmony_ci     * Unspecified decoding error.
752961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
753061847f8eSopenharmony_ci     * @atomicservice
753161847f8eSopenharmony_ci     * @since 13
753261847f8eSopenharmony_ci     */
753361847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DECODING_UNSPECIFIED = 6614000,
753461847f8eSopenharmony_ci
753561847f8eSopenharmony_ci    /**
753661847f8eSopenharmony_ci     * Decoder initialization failed.
753761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
753861847f8eSopenharmony_ci     * @atomicservice
753961847f8eSopenharmony_ci     * @since 13
754061847f8eSopenharmony_ci     */
754161847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DECODING_INIT_FAILED = 6614001,
754261847f8eSopenharmony_ci
754361847f8eSopenharmony_ci    /**
754461847f8eSopenharmony_ci     * Decoder query failed.
754561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
754661847f8eSopenharmony_ci     * @atomicservice
754761847f8eSopenharmony_ci     * @since 13
754861847f8eSopenharmony_ci     */
754961847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DECODING_QUERY_FAILED = 6614002,
755061847f8eSopenharmony_ci
755161847f8eSopenharmony_ci    /**
755261847f8eSopenharmony_ci     * Decoding the media samples failed.
755361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
755461847f8eSopenharmony_ci     * @atomicservice
755561847f8eSopenharmony_ci     * @since 13
755661847f8eSopenharmony_ci     */
755761847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DECODING_FAILED = 6614003,
755861847f8eSopenharmony_ci
755961847f8eSopenharmony_ci    /**
756061847f8eSopenharmony_ci     * The format of the content to decode exceeds the capabilities of the device.
756161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
756261847f8eSopenharmony_ci     * @atomicservice
756361847f8eSopenharmony_ci     * @since 13
756461847f8eSopenharmony_ci     */
756561847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DECODING_FORMAT_EXCEEDS_CAPABILITIES = 6614004,
756661847f8eSopenharmony_ci
756761847f8eSopenharmony_ci    /**
756861847f8eSopenharmony_ci     * The format of the content to decode is not supported.
756961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
757061847f8eSopenharmony_ci     * @atomicservice
757161847f8eSopenharmony_ci     * @since 13
757261847f8eSopenharmony_ci     */
757361847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DECODING_FORMAT_UNSUPPORTED = 6614005,
757461847f8eSopenharmony_ci
757561847f8eSopenharmony_ci    /**
757661847f8eSopenharmony_ci     * Unspecified errors related to the audio renderer.
757761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
757861847f8eSopenharmony_ci     * @atomicservice
757961847f8eSopenharmony_ci     * @since 13
758061847f8eSopenharmony_ci     */
758161847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_AUDIO_RENDERER_UNSPECIFIED = 6615000,
758261847f8eSopenharmony_ci
758361847f8eSopenharmony_ci    /**
758461847f8eSopenharmony_ci     * Initializing the audio renderer failed.
758561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
758661847f8eSopenharmony_ci     * @atomicservice
758761847f8eSopenharmony_ci     * @since 13
758861847f8eSopenharmony_ci     */
758961847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_AUDIO_RENDERER_INIT_FAILED = 6615001,
759061847f8eSopenharmony_ci
759161847f8eSopenharmony_ci    /**
759261847f8eSopenharmony_ci     * The audio renderer fails to write data.
759361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
759461847f8eSopenharmony_ci     * @atomicservice
759561847f8eSopenharmony_ci     * @since 13
759661847f8eSopenharmony_ci     */
759761847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_AUDIO_RENDERER_WRITE_FAILED = 6615002,
759861847f8eSopenharmony_ci
759961847f8eSopenharmony_ci    /**
760061847f8eSopenharmony_ci     * Unspecified error related to DRM.
760161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
760261847f8eSopenharmony_ci     * @atomicservice
760361847f8eSopenharmony_ci     * @since 13
760461847f8eSopenharmony_ci     */
760561847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DRM_UNSPECIFIED = 6616000,
760661847f8eSopenharmony_ci
760761847f8eSopenharmony_ci    /**
760861847f8eSopenharmony_ci     * The chosen DRM protection scheme is not supported by the device.
760961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
761061847f8eSopenharmony_ci     * @atomicservice
761161847f8eSopenharmony_ci     * @since 13
761261847f8eSopenharmony_ci     */
761361847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DRM_SCHEME_UNSUPPORTED = 6616001,
761461847f8eSopenharmony_ci
761561847f8eSopenharmony_ci    /**
761661847f8eSopenharmony_ci     * Device provisioning failed.
761761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
761861847f8eSopenharmony_ci     * @atomicservice
761961847f8eSopenharmony_ci     * @since 13
762061847f8eSopenharmony_ci     */
762161847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DRM_PROVISIONING_FAILED = 6616002,
762261847f8eSopenharmony_ci
762361847f8eSopenharmony_ci    /**
762461847f8eSopenharmony_ci     * The DRM-protected content to play is incompatible.
762561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
762661847f8eSopenharmony_ci     * @atomicservice
762761847f8eSopenharmony_ci     * @since 13
762861847f8eSopenharmony_ci     */
762961847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DRM_CONTENT_ERROR = 6616003,
763061847f8eSopenharmony_ci
763161847f8eSopenharmony_ci    /**
763261847f8eSopenharmony_ci     * Failed to obtain a license.
763361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
763461847f8eSopenharmony_ci     * @atomicservice
763561847f8eSopenharmony_ci     * @since 13
763661847f8eSopenharmony_ci     */
763761847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DRM_LICENSE_ACQUISITION_FAILED = 6616004,
763861847f8eSopenharmony_ci
763961847f8eSopenharmony_ci    /**
764061847f8eSopenharmony_ci     * The operation is disallowed by the license policy.
764161847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
764261847f8eSopenharmony_ci     * @atomicservice
764361847f8eSopenharmony_ci     * @since 13
764461847f8eSopenharmony_ci     */
764561847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DRM_DISALLOWED_OPERATION = 6616005,
764661847f8eSopenharmony_ci
764761847f8eSopenharmony_ci    /**
764861847f8eSopenharmony_ci     * An error occurs in the DRM system.
764961847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
765061847f8eSopenharmony_ci     * @atomicservice
765161847f8eSopenharmony_ci     * @since 13
765261847f8eSopenharmony_ci     */
765361847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DRM_SYSTEM_ERROR = 6616006,
765461847f8eSopenharmony_ci
765561847f8eSopenharmony_ci    /**
765661847f8eSopenharmony_ci     * The device has revoked DRM privileges.
765761847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
765861847f8eSopenharmony_ci     * @atomicservice
765961847f8eSopenharmony_ci     * @since 13
766061847f8eSopenharmony_ci     */
766161847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DRM_DEVICE_REVOKED = 6616007,
766261847f8eSopenharmony_ci
766361847f8eSopenharmony_ci    /**
766461847f8eSopenharmony_ci     * The DRM license being loaded into the open DRM session has expired.
766561847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
766661847f8eSopenharmony_ci     * @atomicservice
766761847f8eSopenharmony_ci     * @since 13
766861847f8eSopenharmony_ci     */
766961847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DRM_LICENSE_EXPIRED = 6616008,
767061847f8eSopenharmony_ci
767161847f8eSopenharmony_ci    /**
767261847f8eSopenharmony_ci     * An error occurs when the DRM processes the key response.
767361847f8eSopenharmony_ci     * @syscap SystemCapability.Multimedia.AVSession.AVCast
767461847f8eSopenharmony_ci     * @atomicservice
767561847f8eSopenharmony_ci     * @since 13
767661847f8eSopenharmony_ci     */
767761847f8eSopenharmony_ci    ERR_CODE_CAST_CONTROL_DRM_PROVIDE_KEY_RESPONSE_ERROR = 6616100,
767861847f8eSopenharmony_ci  }
767961847f8eSopenharmony_ci}
768061847f8eSopenharmony_ci
768161847f8eSopenharmony_ciexport default avSession;
7682