forked from mieszko4/react-native-zoom-us
-
Notifications
You must be signed in to change notification settings - Fork 0
/
native.ts
42 lines (37 loc) · 1 KB
/
native.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import {
NativeModules,
HostComponent,
requireNativeComponent,
Platform,
StyleProp,
ViewStyle,
} from 'react-native'
export enum VideoAspectModeEnum {
VIDEO_ASPECT_ORIGINAL = 0,
VIDEO_ASPECT_FULL_FILLED = 1,
VIDEO_ASPECT_LETTER_BOX = 2,
VIDEO_ASPECT_PAN_AND_SCAN = 3,
VIDEO_ASPECT_TRUSTEE = 4,
}
export interface NativeLayoutUnit {
kind: "active" | "preview" | "share" | "attendee" | "active-share"
x: number
y: number
width: number
height: number
border?: boolean
showUsername?: boolean
showAudioOff?: boolean
userIndex?: number
background?: string
aspectMode?: VideoAspectModeEnum
}
export interface NativeVideoProps {
style?: StyleProp<ViewStyle>
layout: NativeLayoutUnit[]
}
// TODO: implement for iOS -> https://github.com/mieszko4/react-native-zoom-us/issues/113
export const RNZoomUsVideoView = (
Platform.OS === 'android' ? requireNativeComponent('RNZoomUsVideoView') : null
) as HostComponent<NativeVideoProps> | null
export const RNZoomUs = NativeModules.RNZoomUs