react-native-webrtc 1.89.3 → 1.94.0
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/.prettierignore +9 -0
- package/.prettierrc.json +10 -0
- package/README.md +4 -1
- package/android/libs/.placeholder +0 -0
- package/android/src/main/java/com/oney/WebRTCModule/GetUserMediaImpl.java +0 -5
- package/android/src/main/java/com/oney/WebRTCModule/LibraryLoader.java +21 -0
- package/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java +301 -324
- package/android/src/main/java/com/oney/WebRTCModule/WebRTCView.java +9 -84
- package/apple/.placeholder +0 -0
- package/ios/RCTWebRTC/RCTConvert+WebRTC.m +3 -0
- package/ios/RCTWebRTC/ScreenCapturePickerViewManager.m +4 -1
- package/ios/RCTWebRTC/VideoCaptureController.h +2 -2
- package/ios/RCTWebRTC/VideoCaptureController.m +131 -48
- package/ios/RCTWebRTC/WebRTCModule+RTCPeerConnection.m +56 -26
- package/metro.config.js +3 -4
- package/metro.config.macos.js +7 -8
- package/package.json +21 -12
- package/react-native.config.js +5 -6
- package/{EventEmitter.js → src/EventEmitter.js} +1 -1
- package/{MediaDevices.js → src/MediaDevices.js} +6 -12
- package/src/MediaStream.js +128 -0
- package/src/MediaStreamError.js +12 -0
- package/src/MediaStreamErrorEvent.js +11 -0
- package/src/MediaStreamEvent.js +11 -0
- package/src/MediaStreamTrack.js +104 -0
- package/src/MediaStreamTrackEvent.js +11 -0
- package/src/MessageEvent.js +10 -0
- package/{Permissions.js → src/Permissions.js} +26 -23
- package/src/RTCDataChannel.js +143 -0
- package/src/RTCDataChannelEvent.js +11 -0
- package/src/RTCEvent.js +8 -0
- package/src/RTCIceCandidate.js +20 -0
- package/src/RTCIceCandidateEvent.js +15 -0
- package/src/RTCPeerConnection.js +349 -0
- package/src/RTCSessionDescription.js +22 -0
- package/{RTCUtil.js → src/RTCUtil.js} +56 -57
- package/src/RTCView.js +60 -0
- package/src/ScreenCapturePickerView.js +4 -0
- package/{getDisplayMedia.js → src/getDisplayMedia.js} +8 -11
- package/src/getUserMedia.js +98 -0
- package/src/index.js +44 -0
- package/tools/build-webrtc.py +60 -46
- package/tools/downloadBitcode.sh +4 -16
- package/tools/downloadWebRTC.js +100 -0
- package/MediaStream.js +0 -138
- package/MediaStreamError.js +0 -14
- package/MediaStreamErrorEvent.js +0 -12
- package/MediaStreamEvent.js +0 -12
- package/MediaStreamTrack.js +0 -118
- package/MediaStreamTrackEvent.js +0 -12
- package/MessageEvent.js +0 -11
- package/RTCDataChannel.js +0 -161
- package/RTCDataChannelEvent.js +0 -12
- package/RTCEvent.js +0 -9
- package/RTCIceCandidate.js +0 -21
- package/RTCIceCandidateEvent.js +0 -16
- package/RTCPeerConnection.js +0 -390
- package/RTCSessionDescription.js +0 -23
- package/RTCView.js +0 -70
- package/ScreenCapturePickerView.js +0 -7
- package/android/libs/libjingle_peerconnection.so.jar +0 -0
- package/android/libs/libwebrtc.jar +0 -0
- package/apple/WebRTC.xcframework.tgz +0 -0
- package/getUserMedia.js +0 -98
- package/index.js +0 -47
- package/ios/RCTWebRTC.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/RCTWebRTC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/RCTWebRTC.xcodeproj/project.xcworkspace/xcuserdata/saghul.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RCTWebRTC.xcodeproj/xcuserdata/saghul.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Everyone is welcome to our [Discourse community](https://react-native-webrtc.dis
|
|
|
15
15
|
|
|
16
16
|
## WebRTC Revision
|
|
17
17
|
|
|
18
|
-
* Currently used revision: [
|
|
18
|
+
* Currently used revision: [M92](https://github.com/jitsi/webrtc/commit/4f97ba956083bdd402aa6d3f55cc064831f88f50)
|
|
19
19
|
* Supported architectures
|
|
20
20
|
* Android: armeabi-v7a, arm64-v8a, x86, x86_64
|
|
21
21
|
* iOS: arm64, x86_64 (for bitcode support, run [this script](https://github.com/react-native-webrtc/react-native-webrtc/blob/master/tools/downloadBitcode.sh))
|
|
@@ -116,6 +116,7 @@ Rendering RTCView.
|
|
|
116
116
|
By calling this method the JavaScript global namespace gets "polluted" with the following additions:
|
|
117
117
|
|
|
118
118
|
* `navigator.mediaDevices.getUserMedia()`
|
|
119
|
+
* `navigator.mediaDevices.getDisplayMedia()`
|
|
119
120
|
* `navigator.mediaDevices.enumerateDevices()`
|
|
120
121
|
* `window.RTCPeerConnection`
|
|
121
122
|
* `window.RTCIceCandidate`
|
|
@@ -141,6 +142,8 @@ it back to `true` will re-enable the camera.
|
|
|
141
142
|
|
|
142
143
|
The [react-native-webrtc](https://github.com/react-native-webrtc) organization provides a number of packages which are useful when developing Real Time Communications applications.
|
|
143
144
|
|
|
145
|
+
The [react-native-webrtc-web-shim](https://github.com/react-native-webrtc/react-native-webrtc-web-shim) project provides a shim for react-native-web support, allowing you to use [(almost)](https://github.com/react-native-webrtc/react-native-webrtc-web-shim/tree/main#setup) the same code in react-native-web as in react-native.
|
|
146
|
+
|
|
144
147
|
## Acknowledgements
|
|
145
148
|
|
|
146
149
|
Thanks to all [contributors](https://github.com/react-native-webrtc/react-native-webrtc/graphs/contributors) for helping with the project!
|
|
File without changes
|
|
@@ -180,11 +180,6 @@ class GetUserMediaImpl {
|
|
|
180
180
|
final ReadableMap constraints,
|
|
181
181
|
final Callback successCallback,
|
|
182
182
|
final Callback errorCallback) {
|
|
183
|
-
// TODO: change getUserMedia constraints format to support new syntax
|
|
184
|
-
// constraint format seems changed, and there is no mandatory any more.
|
|
185
|
-
// and has a new syntax/attrs to specify resolution
|
|
186
|
-
// should change `parseConstraints()` according
|
|
187
|
-
// see: https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackConstraints
|
|
188
183
|
|
|
189
184
|
AudioTrack audioTrack = null;
|
|
190
185
|
VideoTrack videoTrack = null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
package com.oney.WebRTCModule;
|
|
2
|
+
|
|
3
|
+
import org.webrtc.Logging;
|
|
4
|
+
import org.webrtc.NativeLibraryLoader;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Custom library loader. WebRTC's default library loader swallows errors, which
|
|
8
|
+
* makes debugging impossible if all we have is a crash log. Let it throw since
|
|
9
|
+
* the app is going to crash anyway. This way we'll have the information in the
|
|
10
|
+
* backtrace.
|
|
11
|
+
*/
|
|
12
|
+
public class LibraryLoader implements NativeLibraryLoader {
|
|
13
|
+
private static String TAG = "LibraryLoader";
|
|
14
|
+
|
|
15
|
+
@Override
|
|
16
|
+
public boolean load(String name) {
|
|
17
|
+
Logging.d(TAG, "Loading library: " + name);
|
|
18
|
+
System.loadLibrary(name);
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
}
|