From 3d7519d3b205f273ff5af1d49e8f3650337dcda1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E6=B4=AA=E5=BF=97?= Date: Tue, 24 Jun 2025 11:38:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=9C=A8=E7=BA=BF=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=96=B0=E5=A2=9E=E6=8A=9B=E5=87=BA=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蔡洪志 --- api/@ohos.multimedia.media.d.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/api/@ohos.multimedia.media.d.ts b/api/@ohos.multimedia.media.d.ts index 859234ed40..0744f66f6e 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 -- Gitee