代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/interface_sdk-js 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file A component which support applications to show moving photo data
* @kit MediaLibraryKit
*/
import photoAccessHelper from './@ohos.file.photoAccessHelper';
/**
* Defines the moving photo view options.
*
* @interface MovingPhotoViewOptions
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
declare interface MovingPhotoViewOptions {
/**
* moving photo data.
*
* @type { photoAccessHelper.MovingPhoto }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
movingPhoto: photoAccessHelper.MovingPhoto;
/**
* controller of MovingPhotoView.
*
* @type { ?MovingPhotoViewController }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
controller?: MovingPhotoViewController;
}
/**
* Defines the moving photo view interface.
*
* @interface MovingPhotoViewInterface
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
interface MovingPhotoViewInterface {
/**
* Set the options.
*
* @param { MovingPhotoViewOptions } options
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
(options: MovingPhotoViewOptions): MovingPhotoViewAttribute;
}
/**
* function that moving photo view media events callback.
*
* @typedef { function } MovingPhotoViewEventCallback
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
declare type MovingPhotoViewEventCallback = () => void;
/**
* Defines the moving photo view attribute functions.
*
* @extends CommonMethod<MovingPhotoViewAttribute>
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
declare class MovingPhotoViewAttribute extends CommonMethod<MovingPhotoViewAttribute> {
/**
* Called when judging whether the video is muted.
*
* @param { boolean } isMuted
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
muted(isMuted: boolean): MovingPhotoViewAttribute;
/**
* Called when determining the zoom type of the view.
*
* @param { ImageFit } value
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
objectFit(value: ImageFit): MovingPhotoViewAttribute;
/**
* Called when the image load completed.
*
* @param { MovingPhotoViewEventCallback } callback
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 13
*/
onComplete(callback: MovingPhotoViewEventCallback): MovingPhotoViewAttribute;
/**
* Called when the video is played.
*
* @param { MovingPhotoViewEventCallback } callback
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
onStart(callback: MovingPhotoViewEventCallback): MovingPhotoViewAttribute;
/**
* Called when the video playback stopped.
*
* @param { MovingPhotoViewEventCallback } callback
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
onStop(callback: MovingPhotoViewEventCallback): MovingPhotoViewAttribute;
/**
* Called when the video playback paused.
*
* @param { MovingPhotoViewEventCallback } callback
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
onPause(callback: MovingPhotoViewEventCallback): MovingPhotoViewAttribute;
/**
* Called when the video playback ends.
*
* @param { MovingPhotoViewEventCallback } callback
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
onFinish(callback: MovingPhotoViewEventCallback): MovingPhotoViewAttribute;
/**
* Called when playback fails.
*
* @param { MovingPhotoViewEventCallback } callback
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
onError(callback: MovingPhotoViewEventCallback): MovingPhotoViewAttribute;
/**
* Sets automatic play period, If not set, the moving photo plays in the full video duration.
* If set, the moving photo plays in the automatic play period.
*
* @param { number } startTime video plays start time
* @param { number } endTime video plays end time
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 13
*/
autoPlayPeriod(startTime: number, endTime: number): MovingPhotoViewAttribute;
/**
* Sets whether to allow automatic play. If the value is true, the moving photo starts
* automatic after the resource is loaded.
*
* @param { boolean } isAutoPlay Whether to automatic play
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 13
*/
autoPlay(isAutoPlay: boolean): MovingPhotoViewAttribute;
/**
* Sets whether to allow repeat play. If the value is true, the moving photo plays
* repeat after the resource is loaded.
*
* @param { boolean } isRepeatPlay Whether to repeat play
* @returns { MovingPhotoViewAttribute }
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 13
*/
repeatPlay(isRepeatPlay: boolean): MovingPhotoViewAttribute;
}
/**
* Defines the MovingPhotoView controller.
*
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
export class MovingPhotoViewController {
/**
* constructor.
*
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
constructor();
/**
* Start play moving photo.
*
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
startPlayback();
/**
* Stop play moving photo.
*
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
stopPlayback();
}
/**
* Defines MovingPhotoView Component.
*
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
declare const MovingPhotoView: MovingPhotoViewInterface;
/**
* Defines MovingPhotoView Component instance.
*
* @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
* @crossplatform
* @atomicservice
* @since 12
*/
declare const MovingPhotoViewInstance: MovingPhotoViewAttribute;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。