You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/guides/basic-usage.md
+20-20
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Most of the included functionality is similar to how you would deal with WebRTC
6
6
7
7
If you see functions that are listed in the document above but not listed below then they are likely not supported by this module yet and will most likely be supported in the near future, we're open to contributions.
8
8
9
-
```javascript
9
+
```typescript
10
10
import {
11
11
RTCIceCandidate,
12
12
RTCPeerConnection,
@@ -31,7 +31,7 @@ Some devices might not have more than 1 camera. The following will allow you to
31
31
32
32
You can of-course use `enumerateDevices` to list other media device information too.
33
33
34
-
```javascript
34
+
```typescript
35
35
let cameraCount =0;
36
36
37
37
try {
@@ -52,7 +52,7 @@ try {
52
52
By default we're sending both audio and video.
53
53
This will allow us to toggle the video stream during a call.
54
54
55
-
```javascript
55
+
```typescript
56
56
let mediaConstraints = {
57
57
audio: true,
58
58
video: {
@@ -71,7 +71,7 @@ Fill me in.
71
71
If you only want a voice call then you can flip `isVoiceOnly` over to `true`.
72
72
You can then cycle and enable or disable the video tracks on demand during a call.
73
73
74
-
```javascript
74
+
```typescript
75
75
let localMediaStream;
76
76
let isVoiceOnly =false;
77
77
@@ -95,7 +95,7 @@ This will allow capturing the device screen, requests permission on execution.
95
95
Make sure to follow [these](/guides/extra-steps/android#screen-capture-support-android-10) extra steps for Android and [these](/guides/extra-steps/ios#screen-capture-support) for iOS.
Copy file name to clipboardExpand all lines: src/guides/extra-steps/android.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Android 6+
1
+
# Android 7+
2
2
3
3
Starting with React Native 0.60 due to a new auto linking feature you no longer need to follow manual linking steps but you will need to follow the other steps below if you plan on releasing your app to production.
4
4
@@ -68,7 +68,7 @@ You will be prompted for permissions automatically each time you want to start s
68
68
69
69
A notification channel is also required and created.
You'll only really need to use this function if you are mixing project development with libraries that use browser based WebRTC functions. Also applies if you are making your project compatible with react-native-web.
14
14
15
-
```javascript
15
+
```typescript
16
16
registerGlobals();
17
17
```
18
18
19
19
Here is a list of everything that will be linked up.
Copy file name to clipboardExpand all lines: src/guides/getting-a-call-connected.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ If you want to start the call as voice only then you can flip the boolean but th
21
21
**Don't forget, you will be prompted to accept permissions for the camera and microphone.**
22
22
**Usually it is better to request permissions at an earlier stage to improve the user experience.**
23
23
24
-
```javascript
24
+
```typescript
25
25
let mediaConstraints = {
26
26
audio: true,
27
27
video: {
@@ -63,7 +63,7 @@ In some instances you might find that the `negotiationneeded` event can fire mul
63
63
64
64
The `iceServers` below include one of Googles public STUN servers, you should also provide your own TURN server alongside a STUN server to ensure that connections can actually be established between callers.
65
65
66
-
```javascript
66
+
```typescript
67
67
let peerConstraints = {
68
68
iceServers: [
69
69
{
@@ -150,7 +150,7 @@ But do intend to provide an example app along with signalling app in the near fu
150
150
We've added the media stream to the peer connection and got most of the basic events hooked up.
151
151
You can now start creating an offer which then needs sending off to the other call participant.
152
152
153
-
```javascript
153
+
```typescript
154
154
let sessionConstraints = {
155
155
mandatory: {
156
156
OfferToReceiveAudio: true,
@@ -180,7 +180,7 @@ An easy solution is to hold onto some of the candidates and process them immedia
180
180
181
181
We will process any leftover candidates in the next step.
182
182
183
-
```javascript
183
+
```typescript
184
184
let remoteCandidates = [];
185
185
186
186
function handleRemoteCandidate( iceCandidate ) {
@@ -209,7 +209,7 @@ Set the offer as the remote description, create an answer and set the local desc
209
209
You can now process any candidates if any got caught in-between the handshake process.
210
210
Lastly you need to send the answer back to the caller who gave the offer.
0 commit comments