react-native-webrtc 106.0.0-beta.5 → 106.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/android/src/main/java/com/oney/WebRTCModule/GetUserMediaImpl.java +1 -1
- package/android/src/main/java/com/oney/WebRTCModule/PeerConnectionObserver.java +18 -24
- package/android/src/main/java/com/oney/WebRTCModule/VideoTrackAdapter.java +1 -1
- package/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java +59 -68
- package/ios/RCTWebRTC/RCTConvert+WebRTC.m +10 -0
- package/ios/RCTWebRTC/SerializeUtils.m +4 -2
- package/ios/RCTWebRTC/WebRTCModule+RTCPeerConnection.m +73 -60
- package/ios/RCTWebRTC/WebRTCModule+Transceivers.m +23 -22
- package/ios/RCTWebRTC/WebRTCModule+VideoTrackAdapter.m +1 -1
- package/ios/RCTWebRTC/WebRTCModule.h +0 -8
- package/ios/RCTWebRTC/WebRTCModule.m +1 -20
- package/lib/commonjs/MediaStreamTrack.js +24 -7
- package/lib/commonjs/MediaStreamTrack.js.map +1 -1
- package/lib/commonjs/RTCIceCandidate.js +14 -4
- package/lib/commonjs/RTCIceCandidate.js.map +1 -1
- package/lib/commonjs/RTCPeerConnection.js +129 -132
- package/lib/commonjs/RTCPeerConnection.js.map +1 -1
- package/lib/commonjs/RTCRtpSender.js +6 -5
- package/lib/commonjs/RTCRtpSender.js.map +1 -1
- package/lib/commonjs/RTCRtpTransceiver.js +11 -49
- package/lib/commonjs/RTCRtpTransceiver.js.map +1 -1
- package/lib/commonjs/RTCView.js +0 -55
- package/lib/commonjs/RTCView.js.map +1 -1
- package/lib/commonjs/index.js +3 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/MediaStreamTrack.js +25 -8
- package/lib/module/MediaStreamTrack.js.map +1 -1
- package/lib/module/RTCIceCandidate.js +14 -4
- package/lib/module/RTCIceCandidate.js.map +1 -1
- package/lib/module/RTCPeerConnection.js +129 -130
- package/lib/module/RTCPeerConnection.js.map +1 -1
- package/lib/module/RTCRtpSender.js +6 -5
- package/lib/module/RTCRtpSender.js.map +1 -1
- package/lib/module/RTCRtpTransceiver.js +11 -44
- package/lib/module/RTCRtpTransceiver.js.map +1 -1
- package/lib/module/RTCView.js +0 -49
- package/lib/module/RTCView.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/MediaStreamTrack.d.ts +11 -3
- package/lib/typescript/RTCIceCandidate.d.ts +5 -1
- package/lib/typescript/RTCPeerConnection.d.ts +5 -5
- package/lib/typescript/RTCRtpTransceiver.d.ts +2 -8
- package/lib/typescript/RTCView.d.ts +53 -46
- package/package.json +2 -2
- package/src/MediaStreamTrack.ts +23 -7
- package/src/RTCIceCandidate.ts +8 -5
- package/src/RTCPeerConnection.ts +133 -126
- package/src/RTCRtpSender.ts +6 -7
- package/src/RTCRtpTransceiver.ts +15 -45
- package/src/RTCView.ts +53 -49
- package/src/index.ts +2 -0
package/src/RTCView.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { requireNativeComponent } from 'react-native';
|
|
1
|
+
import { requireNativeComponent, ViewProps } from 'react-native';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Native prop validation was removed from RN in:
|
|
@@ -8,53 +7,58 @@ import { requireNativeComponent } from 'react-native';
|
|
|
8
7
|
* So we list them here for documentation purposes.
|
|
9
8
|
*/
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* In the fashion of
|
|
21
|
-
* https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth
|
|
22
|
-
* and https://www.w3.org/TR/html5/rendering.html#video-object-fit,
|
|
23
|
-
* resembles the CSS style object-fit.
|
|
24
|
-
*
|
|
25
|
-
* objectFit: 'contain' | 'cover'
|
|
26
|
-
*/
|
|
10
|
+
interface RTCVideoViewProps extends ViewProps {
|
|
11
|
+
/**
|
|
12
|
+
* Indicates whether the video specified by {@link #streamURL} should be
|
|
13
|
+
* mirrored during rendering. Commonly, applications choose to mirror the
|
|
14
|
+
* user-facing camera.
|
|
15
|
+
*
|
|
16
|
+
* mirror: boolean
|
|
17
|
+
*/
|
|
18
|
+
mirror?: boolean;
|
|
27
19
|
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
/**
|
|
21
|
+
* In the fashion of
|
|
22
|
+
* https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth
|
|
23
|
+
* and https://www.w3.org/TR/html5/rendering.html#video-object-fit,
|
|
24
|
+
* resembles the CSS style object-fit.
|
|
25
|
+
*
|
|
26
|
+
* objectFit: 'contain' | 'cover'
|
|
27
|
+
*/
|
|
28
|
+
objectFit?: 'contain' | 'cover';
|
|
33
29
|
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
30
|
+
/**
|
|
31
|
+
* URL / id of the stream that should be rendered.
|
|
32
|
+
*
|
|
33
|
+
* streamURL: string
|
|
34
|
+
*/
|
|
35
|
+
streamURL: string;
|
|
36
|
+
/**
|
|
37
|
+
* Similarly to the CSS property z-index, specifies the z-order of this
|
|
38
|
+
* RTCView in the stacking space of all RTCViews. When RTCViews overlap,
|
|
39
|
+
* zOrder determines which one covers the other. An RTCView with a larger
|
|
40
|
+
* zOrder generally covers an RTCView with a lower one.
|
|
41
|
+
*
|
|
42
|
+
* Non-overlapping RTCViews may safely share a z-order (because one does not
|
|
43
|
+
* have to cover the other).
|
|
44
|
+
*
|
|
45
|
+
* The support for zOrder is platform-dependent and/or
|
|
46
|
+
* implementation-specific. Thus, specifying a value for zOrder is to be
|
|
47
|
+
* thought of as giving a hint rather than as imposing a requirement. For
|
|
48
|
+
* example, video renderers such as RTCView are commonly implemented using
|
|
49
|
+
* OpenGL and OpenGL views may have different numbers of layers in their
|
|
50
|
+
* stacking space. Android has three: a layer bellow the window (aka
|
|
51
|
+
* default), a layer bellow the window again but above the previous layer
|
|
52
|
+
* (aka media overlay), and above the window. Consequently, it is advisable
|
|
53
|
+
* to limit the number of utilized layers in the stacking space to the
|
|
54
|
+
* minimum sufficient for the desired display. For example, a video call
|
|
55
|
+
* application usually needs a maximum of two zOrder values: 0 for the
|
|
56
|
+
* remote video(s) which appear in the background, and 1 for the local
|
|
57
|
+
* video(s) which appear above the remote video(s).
|
|
58
|
+
*
|
|
59
|
+
* zOrder: number
|
|
60
|
+
*/
|
|
61
|
+
zOrder?: number;
|
|
62
|
+
}
|
|
59
63
|
|
|
60
|
-
export default requireNativeComponent('RTCVideoView');
|
|
64
|
+
export default requireNativeComponent<RTCVideoViewProps>('RTCVideoView');
|
package/src/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import Logger from './Logger';
|
|
|
2
2
|
import mediaDevices from './MediaDevices';
|
|
3
3
|
import MediaStream from './MediaStream';
|
|
4
4
|
import MediaStreamTrack from './MediaStreamTrack';
|
|
5
|
+
import MediaStreamTrackEvent from './MediaStreamTrackEvent';
|
|
5
6
|
import permissions from './Permissions';
|
|
6
7
|
import RTCErrorEvent from './RTCErrorEvent';
|
|
7
8
|
import RTCIceCandidate from './RTCIceCandidate';
|
|
@@ -56,6 +57,7 @@ function registerGlobals(): void {
|
|
|
56
57
|
global.RTCSessionDescription = RTCSessionDescription;
|
|
57
58
|
global.MediaStream = MediaStream;
|
|
58
59
|
global.MediaStreamTrack = MediaStreamTrack;
|
|
60
|
+
global.MediaStreamTrackEvent = MediaStreamTrackEvent;
|
|
59
61
|
global.RTCRtpTransceiver = RTCRtpTransceiver;
|
|
60
62
|
global.RTCRtpReceiver = RTCRtpReceiver;
|
|
61
63
|
global.RTCRtpSender = RTCRtpSender;
|