mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
react-native-webrtc: Add registerGlobals (#40636)
* Add registerGlobals type * Add test & Fix version
This commit is contained in:
parent
e7ba075c07
commit
ec7e51feeb
4
types/react-native-webrtc/index.d.ts
vendored
4
types/react-native-webrtc/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for react-native-webrtc 1.69
|
||||
// Type definitions for react-native-webrtc 1.75
|
||||
// Project: https://github.com/react-native-webrtc/react-native-webrtc
|
||||
// Definitions by: Carlos Quiroga <https://github.com/KarlosQ>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@ -241,6 +241,8 @@ export class mediaDevices {
|
||||
static getUserMedia(constraints: MediaStreamConstraints): MediaStream;
|
||||
}
|
||||
|
||||
export function registerGlobals(): void;
|
||||
|
||||
export interface RTCViewProps {
|
||||
streamURL: string;
|
||||
mirror?: boolean;
|
||||
|
||||
@ -7,7 +7,8 @@ const {
|
||||
RTCIceCandidate,
|
||||
RTCSessionDescription,
|
||||
MediaStream,
|
||||
RTCView
|
||||
RTCView,
|
||||
registerGlobals,
|
||||
} = WebRTC;
|
||||
|
||||
mediaDevices.getUserMedia({
|
||||
@ -59,6 +60,8 @@ MediaStreamInit.toURL();
|
||||
|
||||
peer.addStream(MediaStreamInit);
|
||||
|
||||
registerGlobals();
|
||||
|
||||
export const VideoCall = () => (
|
||||
<RTCView objectFit={"cover"} zOrder={0} style={{}} streamURL={""} />
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user