-
Notifications
You must be signed in to change notification settings - Fork 120
Expand file tree
/
Copy pathnative.ts
More file actions
39 lines (34 loc) · 927 Bytes
/
Copy pathnative.ts
File metadata and controls
39 lines (34 loc) · 927 Bytes
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
import {
NativeModules,
Platform,
StyleProp,
ViewStyle,
} from 'react-native'
export const 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,
} as const
type Values<T> = T[keyof T];
export type VideoAspectMode = Values<typeof VideoAspectModeEnum>;
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?: VideoAspectMode
}
export interface NativeVideoProps {
style?: StyleProp<ViewStyle>
layout: NativeLayoutUnit[]
}
export const RNZoomUs = NativeModules.RNZoomUs
if (!RNZoomUs) console.error('[react-native-zoom-us] RNZoomUs native module is not linked.')