diff --git a/api/@ohos.multimedia.media.d.ts b/api/@ohos.multimedia.media.d.ts index 859234ed409cc4d6be706f20c6709e0912dcaff4..0744f66f6e54e509b4bac4acd196e9e3aae4829e 100755 --- a/api/@ohos.multimedia.media.d.ts +++ b/api/@ohos.multimedia.media.d.ts @@ -742,12 +742,19 @@ declare namespace media { /** * Sets the network media source URL and configures request headers. + * @permission ohos.permission.INTERNET * @param { string } url - The URL of the media resource. - * @param { Record } headers - Optional request headers. + * @param { Record } [headers] - Optional request headers. + * @returns { Promise } A Promise instance used to return the operation result. + * @throws { BusinessError } 201 - Permission denied, requires internet access permission. Returned by promise. + * @throws { BusinessError } 5400102 - Operation not allowed, + * the URL source has already been set and cannot be modified. Returned by promise. + * @throws { BusinessError } 5400108 - Parameter check failed. Returned by promise. * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @since 20 + * @arkts 1.1&1.2 */ - setUrlSource(url: string, headers?: Record): void; + setUrlSource(url: string, headers?: Record): Promise; /** * It will decode the given video resource. Then fetch a picture