19 lines
776 B
TypeScript
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;
|