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.
Files changed (69) hide show
  1. package/.prettierignore +9 -0
  2. package/.prettierrc.json +10 -0
  3. package/README.md +4 -1
  4. package/android/libs/.placeholder +0 -0
  5. package/android/src/main/java/com/oney/WebRTCModule/GetUserMediaImpl.java +0 -5
  6. package/android/src/main/java/com/oney/WebRTCModule/LibraryLoader.java +21 -0
  7. package/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java +301 -324
  8. package/android/src/main/java/com/oney/WebRTCModule/WebRTCView.java +9 -84
  9. package/apple/.placeholder +0 -0
  10. package/ios/RCTWebRTC/RCTConvert+WebRTC.m +3 -0
  11. package/ios/RCTWebRTC/ScreenCapturePickerViewManager.m +4 -1
  12. package/ios/RCTWebRTC/VideoCaptureController.h +2 -2
  13. package/ios/RCTWebRTC/VideoCaptureController.m +131 -48
  14. package/ios/RCTWebRTC/WebRTCModule+RTCPeerConnection.m +56 -26
  15. package/metro.config.js +3 -4
  16. package/metro.config.macos.js +7 -8
  17. package/package.json +21 -12
  18. package/react-native.config.js +5 -6
  19. package/{EventEmitter.js → src/EventEmitter.js} +1 -1
  20. package/{MediaDevices.js → src/MediaDevices.js} +6 -12
  21. package/src/MediaStream.js +128 -0
  22. package/src/MediaStreamError.js +12 -0
  23. package/src/MediaStreamErrorEvent.js +11 -0
  24. package/src/MediaStreamEvent.js +11 -0
  25. package/src/MediaStreamTrack.js +104 -0
  26. package/src/MediaStreamTrackEvent.js +11 -0
  27. package/src/MessageEvent.js +10 -0
  28. package/{Permissions.js → src/Permissions.js} +26 -23
  29. package/src/RTCDataChannel.js +143 -0
  30. package/src/RTCDataChannelEvent.js +11 -0
  31. package/src/RTCEvent.js +8 -0
  32. package/src/RTCIceCandidate.js +20 -0
  33. package/src/RTCIceCandidateEvent.js +15 -0
  34. package/src/RTCPeerConnection.js +349 -0
  35. package/src/RTCSessionDescription.js +22 -0
  36. package/{RTCUtil.js → src/RTCUtil.js} +56 -57
  37. package/src/RTCView.js +60 -0
  38. package/src/ScreenCapturePickerView.js +4 -0
  39. package/{getDisplayMedia.js → src/getDisplayMedia.js} +8 -11
  40. package/src/getUserMedia.js +98 -0
  41. package/src/index.js +44 -0
  42. package/tools/build-webrtc.py +60 -46
  43. package/tools/downloadBitcode.sh +4 -16
  44. package/tools/downloadWebRTC.js +100 -0
  45. package/MediaStream.js +0 -138
  46. package/MediaStreamError.js +0 -14
  47. package/MediaStreamErrorEvent.js +0 -12
  48. package/MediaStreamEvent.js +0 -12
  49. package/MediaStreamTrack.js +0 -118
  50. package/MediaStreamTrackEvent.js +0 -12
  51. package/MessageEvent.js +0 -11
  52. package/RTCDataChannel.js +0 -161
  53. package/RTCDataChannelEvent.js +0 -12
  54. package/RTCEvent.js +0 -9
  55. package/RTCIceCandidate.js +0 -21
  56. package/RTCIceCandidateEvent.js +0 -16
  57. package/RTCPeerConnection.js +0 -390
  58. package/RTCSessionDescription.js +0 -23
  59. package/RTCView.js +0 -70
  60. package/ScreenCapturePickerView.js +0 -7
  61. package/android/libs/libjingle_peerconnection.so.jar +0 -0
  62. package/android/libs/libwebrtc.jar +0 -0
  63. package/apple/WebRTC.xcframework.tgz +0 -0
  64. package/getUserMedia.js +0 -98
  65. package/index.js +0 -47
  66. package/ios/RCTWebRTC.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  67. package/ios/RCTWebRTC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  68. package/ios/RCTWebRTC.xcodeproj/project.xcworkspace/xcuserdata/saghul.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  69. package/ios/RCTWebRTC.xcodeproj/xcuserdata/saghul.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
@@ -0,0 +1,9 @@
1
+ android
2
+ apple
3
+ examples
4
+ ios
5
+ macos
6
+ tools
7
+ Documentation
8
+ *.md
9
+ *.json
@@ -0,0 +1,10 @@
1
+ {
2
+ "printWidth": 120,
3
+ "tabWidth": 4,
4
+ "useTabs": false,
5
+ "semi": true,
6
+ "singleQuote": true,
7
+ "trailingComma": "none",
8
+ "bracketSpacing": true,
9
+ "arrowParens": "avoid"
10
+ }
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: [M89](https://github.com/jitsi/webrtc/commit/7ba1fdf35209c4cf5d2aa47d1507e097f88a07ac)
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
+ }