1
import * as React from 'react';
2 4
import { createHostComponent } from '@remax/shared';
3

4
export interface VideoProps {
5
  src: string;
6
  id?: string;
7
  className?: string;
8
  style?: React.CSSProperties;
9
  posterSize?: 'contain' | 'fill' | 'cover';
10
  poster?: string;
11
  objectFit?: 'contain' | 'fill' | 'cover';
12
  initialTime?: number;
13
  duration?: number;
14
  controls?: boolean;
15
  autoplay?: boolean;
16
  direction?: number;
17
  loop?: boolean;
18
  muted?: boolean;
19
  showFullscreenBtn?: boolean;
20
  showPlayBtn?: boolean;
21
  showCenterPlayBtn?: boolean;
22
  showMuteBtn?: boolean;
23
  enableProgressGesture?: boolean;
24
  enableNative?: boolean;
25
  mobilenetHintType?: 0 | 1 | 3;
26
  onPlay?: (e: any) => void;
27
  onPause?: (e: any) => void;
28
  onEnded?: (e: any) => void;
29
  onTimeUpdate?: (e: any) => void;
30
  onLoading?: (e: any) => void;
31
  onError?: (e: any) => void;
32
  onFullScreenChange?: (e: any) => void;
33
  onTap?: (e: any) => void;
34
  onUserAction?: (e: any) => void;
35
}
36

37 4
export const Video: React.ComponentType<VideoProps> = createHostComponent<VideoProps>('video');

Read our documentation on viewing source code .

Loading