From 7652eed3a783b8bd06a31fc34f0431c0d5397a43 Mon Sep 17 00:00:00 2001 From: caocan <1532643766@qq.com> Date: Sat, 29 Jan 2022 16:57:26 +0800 Subject: [PATCH] modify video interface Signed-off-by: caocan <1532643766@qq.com> Change-Id: I60c807cabb2e0ddb6b1726dee6eeff6daaf40aaa --- api/@internal/component/ets/video.d.ts | 46 +++++--------------------- 1 file changed, 8 insertions(+), 38 deletions(-) diff --git a/api/@internal/component/ets/video.d.ts b/api/@internal/component/ets/video.d.ts index 33fb3d3e82..d80052caf7 100644 --- a/api/@internal/component/ets/video.d.ts +++ b/api/@internal/component/ets/video.d.ts @@ -22,25 +22,25 @@ declare enum SeekMode { * Sync to keyframes before the time point. * @since 8 */ - PreviousSync, + PreviousKeyframe, /** * Sync to keyframes after the time point. * @since 8 */ - NextSync, + NextKeyframe, /** * Sync to closest keyframes. * @since 8 */ - ClosestSync, + ClosestKeyframe, /** * Seek to frames closest the time point. * @since 8 */ - Closest, + Accurate, } /** @@ -81,9 +81,8 @@ declare enum PlaybackSpeed { /** * @since 7 - * @deprecated since 8 */ - interface VideoOptionPre { + interface VideoOption { /** * src of video. * @since 7 @@ -94,36 +93,7 @@ declare enum PlaybackSpeed { * playback rate of video. * @since 7 */ - currentProgressRate?: number | string; - - /** - * preview uri of video. - * @since 7 - */ - previewUri?: string; - - /** - * controller of video. - * @since 7 - */ - controller?: VideoController; - } - - /** - * @since 8 - */ - interface VideoOption { - /** - * src of video. - * @since 8 - */ - src?: string | Resource; - - /** - * playback rate of video. - * @since 8 - */ - currentProgressRate?: PlaybackSpeed; + currentProgressRate?: number | string | PlaybackSpeed; /** * preview uri of video. @@ -133,7 +103,7 @@ declare enum PlaybackSpeed { /** * controller of video. - * @since 8 + * @since 7 */ controller?: VideoController; } @@ -187,7 +157,7 @@ interface VideoInterface { * Set the value. * @since 7 */ - (value: VideoOptionPre | VideoOption): VideoAttribute; + (value: VideoOption): VideoAttribute; } /** -- Gitee