Skip to content

Commit a92f48b

Browse files
committed
update android webrtc introduction
1 parent 9f0e601 commit a92f48b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

AdavancedPart/Android WebRTC简介.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Android WebRTC简介
22
===
33

44

5-
![image](https://raw.githubusercontent.com/CharonChui/Pictures/master/webrtc-logo.png?raw=true)
5+
![image](https://github.com/CharonChui/Pictures/blob/master/webrtc-logo.png?raw=true)
66

77

88
WebRTC简介
@@ -56,7 +56,7 @@ dependencies {
5656
- `npm start`
5757
服务默认会运行在3000端口,你可以在浏览器中打开`localhost:3000`
5858

59-
![image](https://raw.githubusercontent.com/CharonChui/Pictures/master/webrtc_web_1.png?raw=true)
59+
![image](https://github.com/CharonChui/Pictures/blob/master/webrtc_web_1.png?raw=true)
6060

6161
如图就表示运行成功了。
6262

@@ -73,21 +73,21 @@ dependencies {
7373
好了,现在再运行`android`项目,然后打开浏览器输入`localhost:3000`,在浏览器页面点击`start`,你就可以看到电脑摄像头获取的画面,如下图:
7474

7575

76-
![image](https://raw.githubusercontent.com/CharonChui/Pictures/master/webrtc_web_start.png?raw=true)
76+
![image](https://github.com/CharonChui/Pictures/blob/master/webrtc_web_start.png?raw=true)
7777

7878

7979
然后点击左边的`call`,就会去申请连手机端,接下来你就可以在浏览器和手机端看到画面了,如下图:
8080

81-
![image](https://raw.githubusercontent.com/CharonChui/Pictures/master/webrtc_web_call.png?raw=true)
81+
![image](https://github.com/CharonChui/Pictures/blob/master/webrtc_web_call.png?raw=true)
8282

8383
手机端的画面:
8484

85-
![image](https://raw.githubusercontent.com/CharonChui/Pictures/master/webrtc_android.jpg?raw=true)
85+
![image](https://github.com/CharonChui/Pictures/blob/master/webrtc_android.jpg?raw=true)
8686

8787
既然连通了,下面就仔细分析一下代码:
8888
代码文件比较少,主要是三个类:
8989

90-
![image](https://raw.githubusercontent.com/CharonChui/Pictures/master/webrtc_demo_file.png?raw=true)
90+
![image](https://github.com/CharonChui/Pictures/blob/master/webrtc_demo_file.png?raw=true)
9191

9292
其中在`WebRtcClient`中实现的逻辑最为核心,我们就从他入手。
9393

@@ -103,7 +103,7 @@ dependencies {
103103

104104
我们先到`WebRtcClient`文件中找到`PeerConnectionFactory`初始化的地方:
105105

106-
![image](https://raw.githubusercontent.com/CharonChui/Pictures/master/webrtc_factory_code.png?raw=true)
106+
![image](https://github.com/CharonChui/Pictures/blob/master/webrtc_factory_code.png?raw=true)
107107

108108
`initializeAndroidGlobals`的参数分别是:
109109
- `context`:应用上下文

0 commit comments

Comments
 (0)