diff --git a/zh-cn/application-dev/reference/apis/js-apis-avsession.md b/zh-cn/application-dev/reference/apis/js-apis-avsession.md index 6ef5769506965f53e49bbb386908a7ed0198c324..bae11a23986e8e5717d4f9ed9534d12b677823f6 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-avsession.md +++ b/zh-cn/application-dev/reference/apis/js-apis-avsession.md @@ -1250,13 +1250,6 @@ on(type: 'deviceAvailable', callback: (device: OutputDeviceInfo) => void): void | type | string | 是 | 事件回调类型,支持事件`'deviceAvailable'`,有设备被发现时触发回调。 | | callback | (device: OutputDeviceInfo) => void | 是 | 回调函数。当监听事件注册成功,err为undefined,否则返回错误对象。 | -**错误码:** -以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 - -| 错误码ID | 错误信息 | -| -------- | ---------------------------------------- | -| 6600101 | Session service exception. | - **示例:** ```js @@ -1283,13 +1276,6 @@ off(type: 'deviceAvailable', callback?: (device: OutputDeviceInfo) => void): voi | ------ | ---------------------- | ---- | ------------------------------------------------------- | | type | string | 是 | 事件回调类型,支持事件`'deviceAvailable'`:设备发现回调。| -**错误码:** -以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 - -| 错误码ID | 错误信息 | -| -------- | ---------------------------------------- | -| 6600101 | Session service exception. | - **示例:** ```js @@ -1321,7 +1307,7 @@ getAVCastController(sessionId: string, callback: AsyncCallback\): void | 错误码ID | 错误信息 | | -------- | ---------------------------------------- | | 6600102 | The session does not exist. | -| 6600110 | The remote connection is not established. | +| 6600109 | The remote connection is not established. | **示例:** @@ -2528,7 +2506,7 @@ getAVCastController(): Promise\; | 错误码ID | 错误信息 | | -------- | ---------------------------------------- | | 6600102 | The session does not exist. | -| 6600110 | The remote connection is not established. | +| 6600109 | The remote connection is not established. | **示例:** @@ -4055,6 +4033,7 @@ prepare(item: AVQueueItem, callback: AsyncCallback\): void | 错误码ID | 错误信息 | | -------- | ---------------------------------------- | | 6600101 | Session service exception. | +| 6600109 | The remote connection is not established. | **示例:** @@ -4063,7 +4042,7 @@ prepare(item: AVQueueItem, callback: AsyncCallback\): void var playItem = { itemId: 0, description: { - mediaId: '12345', + assetId: '12345', mediaName: 'song1', mediaType: 'AUDIO', mediaUri: 'http://resource1_address', @@ -4074,7 +4053,6 @@ var playItem = { albumTitle: 'song1_title', albumCoverUri: "http://resource1_album_address", lyricUri: "http://resource1_lyric_address", - iconUri: "http://resource1_icon_address", appName: 'MyMusic' } }; @@ -4112,7 +4090,7 @@ prepare(item: AVQueueItem): Promise\ | 错误码ID | 错误信息 | | -------- | ---------------------------------------- | | 6600101 | Session service exception. | - +| 6600109 | The remote connection is not established. | **示例:** @@ -4121,7 +4099,7 @@ prepare(item: AVQueueItem): Promise\ var playItem = { itemId: 0, description: { - mediaId: '12345', + assetId: '12345', mediaName: 'song1', mediaType: 'AUDIO', mediaUri: 'http://resource1_address', @@ -4132,7 +4110,6 @@ var playItem = { albumTitle: 'song1_title', albumCoverUri: "http://resource1_album_address", lyricUri: "http://resource1_lyric_address", - iconUri: "http://resource1_icon_address", appName: 'MyMusic' } }; @@ -4163,6 +4140,7 @@ start(item: AVQueueItem, callback: AsyncCallback\): void | 错误码ID | 错误信息 | | -------- | ---------------------------------------- | | 6600101 | Session service exception. | +| 6600109 | The remote connection is not established. | **示例:** @@ -4171,7 +4149,7 @@ start(item: AVQueueItem, callback: AsyncCallback\): void var playItem = { itemId: 0, description: { - mediaId: '12345', + assetId: '12345', mediaName: 'song1', mediaType: 'AUDIO', mediaUri: 'http://resource1_address', @@ -4182,7 +4160,6 @@ description: { albumTitle: 'song1_title', albumCoverUri: "http://resource1_album_address", lyricUri: "http://resource1_lyric_address", - iconUri: "http://resource1_icon_address", appName: 'MyMusic' } }; @@ -4220,7 +4197,7 @@ start(item: AVQueueItem): Promise\ | 错误码ID | 错误信息 | | -------- | ---------------------------------------- | | 6600101 | Session service exception. | - +| 6600109 | The remote connection is not established. | **示例:** @@ -4229,7 +4206,7 @@ start(item: AVQueueItem): Promise\ var playItem = { itemId: 0, description: { - mediaId: '12345', + assetId: '12345', mediaName: 'song1', mediaType: 'AUDIO', mediaUri: 'http://resource1_address', @@ -4240,7 +4217,6 @@ description: { albumTitle: 'song1_title', albumCoverUri: "http://resource1_album_address", lyricUri: "http://resource1_lyric_address", - iconUri: "http://resource1_icon_address", appName: 'MyMusic' } }; @@ -4624,6 +4600,13 @@ on(type: 'videoSizeChange', callback: (width:number, height:number) => void): vo | type | string | 是 | 事件回调类型,支持事件`'videoSizeChange'`:当video尺寸更改时,触发该事件。 | | callback | (width:number, height:number) => void | 是 | 回调函数,返回video的宽度和高度 | +**错误码:** +以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 6600101 | Session service exception. | + **示例:** ```js @@ -4648,6 +4631,13 @@ off(type: 'videoSizeChange'): void | 参数名 | 类型 | 必填 | 说明 | | type | string | 是 | 取消对应的监听事件,支持事件`'videoSizeChange'`。 | +**错误码:** +以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 6600101 | Session service exception. | + **示例:** ```js @@ -4681,6 +4671,7 @@ on(type: 'error', callback: ErrorCallback): void | 5400104 | Time out. | | 5400105 | Service died. | | 5400106 | Unsupport format. | +| 6600101 | Session service exception. | **示例:** @@ -4717,6 +4708,7 @@ off(type: 'error'): void | 5400104 | Time out. | | 5400105 | Service died. | | 5400106 | Unsupport format. | +| 6600101 | Session service exception. | **示例:** @@ -4768,12 +4760,11 @@ aVCastController.off('error') | 名称 | 类型 | 必填 | 说明 | | ------------ | ----------------------- | ---- | ----------------------- | -| mediaId | string | 是 | 播放列表媒体ID。 | +| assetId | string | 是 | 播放列表媒体ID。 | | title | string | 否 | 播放列表媒体标题。 | | subtitle | string | 否 | 播放列表媒体子标题。 | | description | string | 否 | 播放列表媒体描述的文本。 | -| icon | image.PixelMap | 否 | 播放列表媒体图片像素数据。 | -| iconUri | string | 否 | 播放列表媒体图片路径地址。 | +| mediaImage | image.PixelMap | string | 否 | 图片的像素数据或者图片路径地址(本地路径或网络路径)。 | | extras | {[key: string]: any} | 否 | 播放列表媒体额外字段。 | | mediaUri | string | 否 | 播放列表媒体URI。 | | mediaType | string | 否 | 播放列表媒体类型。 |