nicecode-v2/packages/meta/es/VideoPlayer/VideoPlayer.d.ts
2024-01-16 11:44:26 +08:00

19 lines
776 B
TypeScript

import React, { Dispatch, ReactElement, SetStateAction } from 'react';
import { Rect, IScreenshotButtonProp, AlignType } from '@zhst/types';
import './index.less';
export interface VideoViewProps {
url: string;
maxDuration?: number;
screenshotButtonAlign?: AlignType;
screenshotButtonRender?: (screenshotButtonProp: IScreenshotButtonProp) => ReactElement;
defautlNormalizationRect?: Rect;
onCropChange?: (showCrop: boolean, normalizationRect: null | Rect) => void;
}
export interface VideoViewRef {
cropAble: boolean;
setShowCrop: Dispatch<SetStateAction<boolean>>;
downloadVideoframe: () => void;
}
declare const VideoPlayer: React.ForwardRefExoticComponent<VideoViewProps & React.RefAttributes<VideoViewRef>>;
export default VideoPlayer;