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: README.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,12 @@ It's based on official WebRTC native library version **`1.0.27771`**
12
12
13
13
The [official](https://webrtc.org/) description
14
14
15
-
"WebRTC is a free, open project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose."
15
+
"WebRTC is a free, open project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimised to best serve this purpose."
16
16
17
17
18
18
Simply, it's a cross-platform API that allows developers to implement peer-to-peer real-time communication.
19
19
20
-
Imagine an API that allows you to send voice, video and/or data (text,images...etc) across mobile apps and web apps.
20
+
Imagine an API that allows you to send voice, video and/or data (text,images...etc) across mobile apps and web apps.
21
21
22
22
---
23
23
## How does it work (The simple version)
@@ -32,7 +32,7 @@ You have a signalling server that coordinates the initiation of the communicatio
32
32
33
33
The signalling server then sends this "offer" to (B).
34
34
35
-
(B) recieves the offer and it will create an SDP of it's own and send it back to the signalling server. We will call it "answer".
35
+
(B) receives the offer and it will create an SDP of its own and send it back to the signalling server. We will call it "answer".
36
36
37
37
The signalling server then send this "answer" to (A).
38
38
@@ -54,9 +54,9 @@ Let's label the device we are working on as a "Peer". We need to setup its conne
54
54
55
55
WebRTC library has `PeerConnectionFactory` that creates the `PeerConnection` for you. However, we need to `initialize` and `configure` this factory first.
56
56
57
-
### Initializing`PeerConnectionFactory`
57
+
### Initialising`PeerConnectionFactory`
58
58
59
-
First we need to say that we need to trace what's happening in th background then specify which features we want the Native library to turn on. In our case we want `H264` video format.
59
+
First we need to say that we need to trace what's happening in the background then specify which features we want the Native library to turn on. In our case we want `H264` video format.
60
60
61
61
```java
62
62
val options =PeerConnectionFactory.InitializationOptions.builder(context)
@@ -70,7 +70,7 @@ val options = PeerConnectionFactory.InitializationOptions.builder(context)
70
70
71
71
Now we can use `PeerConnectionFactory.Builder` to build an instance of `PeerConnectionFactory`.
72
72
73
-
When building `PeerConnectionFactory` it's crucial to specify the video codecs you are using. In this sample, we will be usingthe default video codecs. In addition, we will be disabling encryption.
73
+
When building `PeerConnectionFactory` it's crucial to specify the video codecs you are using. In this sample, we will be using the default video codecs. In addition, we will be disabling encryption.
74
74
75
75
```java
76
76
val rootEglBase:EglBase=EglBase.create()
@@ -87,7 +87,7 @@ PeerConnectionFactory
87
87
88
88
### Setting the video output
89
89
90
-
Native WebRTC library relies on `SurfaceViewRenderer` view to output the videp data. It's a `SurfaceView` that is setup to work will the callbacks of other WebRTC functionalities.
90
+
Native WebRTC library relies on `SurfaceViewRenderer` view to output the video data. It's a `SurfaceView` that is setup to work will the callbacks of other WebRTC functionalities.
91
91
92
92
```xml
93
93
<?xml version="1.0" encoding="utf-8"?>
@@ -110,7 +110,7 @@ Native WebRTC library relies on `SurfaceViewRenderer` view to output the videp d
We will also need to mirror the video stream we are providing and enable hardware accelration.
113
+
We will also need to mirror the video stream we are providing and enable hardware acceleration.
114
114
115
115
```java
116
116
local_view.setMirror(true)
@@ -167,7 +167,7 @@ This should run the server on port `8080`. You can change the port from `applica
167
167
168
168
[Ktor](https://ktor.io/) is also used as a client in the mobile app to send/receive data from `WebSocket`.
169
169
170
-
Checkout this [file](https://github.com/amrfarid140/webrtc-android-codelab/blob/step/remote-video/mobile/app/src/main/java/me/amryousef/webrtc_demo/SignallingClient.kt) for implemenation details.
170
+
Checkout this [file](https://github.com/amrfarid140/webrtc-android-codelab/blob/step/remote-video/mobile/app/src/main/java/me/amryousef/webrtc_demo/SignallingClient.kt) for implementation details.
171
171
172
172
**Note that you will beed to change `HOST_ADDRESS` to match your IP address for your laptop**
173
173
@@ -330,7 +330,7 @@ First, You will need to checkout the [master branch](https://github.com/amrfarid
330
330
331
331
Second, Open `server` in IntelliJ Idea and run the server. Make sure it's running on port 8080.
332
332
333
-
Third, Open `mobile` in Android Studio then navigate to `SignallingClient`. You find `HOST_ADDRESS`, change it's value with your local IP address.
333
+
Third, Open `mobile` in Android Studio then navigate to `SignallingClient`. You find `HOST_ADDRESS`, change its value with your local IP address.
334
334
335
335
Finally, use Android studio to install the application on two different devices then click the "call" button from one of them. If all goes well, a voice call should've started for you.
0 commit comments