From a34335af9dfb22182b64ed309329f02c52726e53 Mon Sep 17 00:00:00 2001 From: wusongqing Date: Sat, 25 Jun 2022 16:19:55 +0800 Subject: [PATCH] update docs against 5539 Signed-off-by: wusongqing --- en/application-dev/media/video-playback.md | 10 +++------- en/application-dev/reference/apis/js-apis-media.md | 1 + 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/en/application-dev/media/video-playback.md b/en/application-dev/media/video-playback.md index 4317e03627..4045cc12c9 100644 --- a/en/application-dev/media/video-playback.md +++ b/en/application-dev/media/video-playback.md @@ -8,13 +8,11 @@ You can use video playback APIs to convert video data into visible signals, play ![en-us_image_video_state_machine](figures/en-us_image_video_state_machine.png) - - **Figure 2** Layer 0 diagram of video playback ![en-us_image_video_player](figures/en-us_image_video_player.png) -Note: Video playback requires hardware capabilities such as display, audio, and codec. +*Note: Video playback requires hardware capabilities such as display, audio, and codec.* 1. A third-party application obtains a surface ID from the XComponent. 2. The third-party application transfers the surface ID to the VideoPlayer JS. @@ -43,9 +41,7 @@ The full video playback process includes creating an instance, setting the URL, For details about the **url** types supported by **VideoPlayer**, see the [url attribute](../reference/apis/js-apis-media.md#videoplayer_attributes). -For details about how to create an XComponent, see [XComponent](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md). - -*Note: **setSurface** must be called after the URL is set but before **prepare** is called. +For details about how to create an XComponent, see [XComponent](../reference/arkui-ts/ts-basic-components-xcomponent.md). ```js import media from '@ohos.multimedia.media' @@ -120,7 +116,7 @@ export class VideoPlayerDemo { console.info('pause success'); }, this.failureCallback).catch(this.catchCallback); - // Use a promise to obtain the video track information. + // Use a promise to obtain the video track information communication_dsoftbus. let arrayDescription; await videoPlayer.getTrackDescription().then((arrlist) => { if (typeof (arrlist) != 'undefined') { diff --git a/en/application-dev/reference/apis/js-apis-media.md b/en/application-dev/reference/apis/js-apis-media.md index 2b0504a51b..49f6e8f5ab 100644 --- a/en/application-dev/reference/apis/js-apis-media.md +++ b/en/application-dev/reference/apis/js-apis-media.md @@ -1,6 +1,7 @@ # Media > **NOTE** +> > The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. The multimedia subsystem provides a set of simple and easy-to-use APIs for you to access the system and use media resources. -- GitLab