Skip to content

Commit 34ca9a2

Browse files
authored
Merge pull request #278 from AgoraIO/dev/3.4.0
Dev/3.4.0
2 parents 7f1060c + 09d6e96 commit 34ca9a2

File tree

65 files changed

+581
-426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+581
-426
lines changed

Group-Video/OpenVideoCall-Android/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ To build and run the sample application, get an App ID:
3939
<string name="agora_access_token"><#YOUR TOKEN#></string>
4040
```
4141

42+
> To ensure communication security, Agora uses tokens (dynamic keys) to authenticate users joining a channel.
43+
>
44+
> Temporary tokens are for demonstration and testing purposes only and remain valid for 24 hours. In a production environment, you need to deploy your own server for generating tokens. See [Generate a Token](https://docs.agora.io/en/Interactive Broadcast/token_server)for details.
45+
4246
### Integrate the Agora Video SDK
4347

4448
The SDK must be integrated into the sample project before it can opened and built. There are two methods for integrating the Agora Video SDK into the sample project. The first method uses JCenter to automatically integrate the SDK files. The second method requires you to manually copy the SDK files to the project.
@@ -69,7 +73,7 @@ Copy from SDK|Copy to Project Folder
6973
**x86** folder|**/app/src/main/jniLibs** folder
7074
**armeabi-v7a** folder|**/app/src/main/jniLibs** folder
7175

72-
76+
7377

7478
### Run the Application
7579

Group-Video/OpenVideoCall-Android/README.zh.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
<string name="agora_access_token"><#YOUR TOKEN#></string>
4141
```
4242

43+
> 为提高项目的安全性,Agora 使用 Token(动态密钥)对即将加入频道的用户进行鉴权。
44+
>
45+
> 临时 Token 仅作为演示和测试用途。在生产环境中,你需要自行部署服务器签发 Token,详见[生成 Token](https://docs.agora.io/cn/Interactive Broadcast/token_server)。
46+
4347
### 集成 Agora 视频 SDK
4448

4549
集成方式有以下两种:

Group-Video/OpenVideoCall-Android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<uses-permission android:name="android.permission.CAMERA" />
88
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
99
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
10-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
1110
<uses-permission android:name="android.permission.BLUETOOTH" />
1211

1312
<application

Group-Video/OpenVideoCall-Android/app/src/main/java/io/agora/openvcall/model/ConstantApp.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public class ConstantApp {
99
public static final int BASE_VALUE_PERMISSION = 0X0001;
1010
public static final int PERMISSION_REQ_ID_RECORD_AUDIO = BASE_VALUE_PERMISSION + 1;
1111
public static final int PERMISSION_REQ_ID_CAMERA = BASE_VALUE_PERMISSION + 2;
12-
public static final int PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE = BASE_VALUE_PERMISSION + 3;
1312

1413
public static final int MAX_PEER_COUNT = 4;
1514

Group-Video/OpenVideoCall-Android/app/src/main/java/io/agora/openvcall/ui/BaseActivity.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ public void run() {
8080

8181
private boolean checkSelfPermissions() {
8282
return checkSelfPermission(Manifest.permission.RECORD_AUDIO, ConstantApp.PERMISSION_REQ_ID_RECORD_AUDIO) &&
83-
checkSelfPermission(Manifest.permission.CAMERA, ConstantApp.PERMISSION_REQ_ID_CAMERA) &&
84-
checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, ConstantApp.PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE);
83+
checkSelfPermission(Manifest.permission.CAMERA, ConstantApp.PERMISSION_REQ_ID_CAMERA);
8584
}
8685

8786
@Override
@@ -164,21 +163,12 @@ public void onRequestPermissionsResult(int requestCode,
164163
case ConstantApp.PERMISSION_REQ_ID_CAMERA: {
165164
if (grantResults.length > 0
166165
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
167-
checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, ConstantApp.PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE);
168166
permissionGranted();
169167
} else {
170168
finish();
171169
}
172170
break;
173171
}
174-
case ConstantApp.PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE: {
175-
if (grantResults.length > 0
176-
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
177-
} else {
178-
finish();
179-
}
180-
break;
181-
}
182172
}
183173
}
184174

Group-Video/OpenVideoCall-Android/app/src/main/java/io/agora/openvcall/ui/CallActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ public void onMixingAudioClicked(View view) {
524524
@Override
525525
public void onUserJoined(int uid) {
526526
log.debug("onUserJoined " + (uid & 0xFFFFFFFFL));
527+
doRenderRemoteUi(uid);
527528

528529
runOnUiThread(new Runnable() {
529530
@Override
@@ -537,7 +538,6 @@ public void run() {
537538
public void onFirstRemoteVideoDecoded(int uid, int width, int height, int elapsed) {
538539
log.debug("onFirstRemoteVideoDecoded " + (uid & 0xFFFFFFFFL) + " " + width + " " + height + " " + elapsed);
539540

540-
doRenderRemoteUi(uid);
541541
}
542542

543543
private void doRenderRemoteUi(final int uid) {
Lines changed: 94 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,94 @@
1-
# Open Video Call Linux
2-
3-
*Read this in other languages: [中文](README.zh.md)*
4-
5-
The Open Video Call Linux Sample App is an open-source demo that will help you get video chat integrated directly into your Linux applications using the Agora Video SDK.
6-
7-
With this sample app, you can:
8-
9-
- Join / leave channel
10-
- Mute / unmute audio
11-
- Enable / disable video
12-
- Change camera
13-
- Setup resolution, frame rate and bit rate
14-
15-
This demo is written in **C++**
16-
17-
Agora Video SDK supports iOS / Android / Windows / macOS etc. You can find demos of these platform here:
18-
19-
- [OpenVideoCall-Android](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-Android)
20-
- [OpenVideoCall-iOS](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-iOS)
21-
- [OpenVideoCall-macOS](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-macOS)
22-
- [OpenVideoCall-Windows](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-Windows)
23-
24-
## Running the App
25-
First, create a developer account at [Agora.io](https://dashboard.agora.io/signin/), and obtain an App ID. set appID in run.sh
26-
27-
```
28-
--appId "Your app ID"
29-
```
30-
31-
Next, download the **Agora Video SDK** from [Agora.io SDK](https://www.agora.io/en/blog/download/).
32-
Unzip the downloaded SDK package and copy
33-
- libagora_rtc_sdk.so
34-
35-
to the "OpenVideoCall/libs" folder in project(the old one may be over written).
36-
37-
configue parameters in run.sh.
38-
Using 'make' command to build the demo. Using ./run.sh to run demo
39-
openVideoCall is a commandline demo. Commands as follows:
40-
- open
41-
42-
open video call
43-
- close
44-
45-
close video call
46-
- enable_video
47-
48-
enable/disable video, 'enable_video 0' means disable video, 'enable_video 1' means enable video
49-
- enable_audio
50-
51-
enable/disable audio, 'enable_audio 0' means disable audio, 'enable_audio 1' means enable audio
52-
- enable_local_video
53-
54-
enable/disable local video, 'enable_local_video 0' means disable local video(local camera), 'enable_local_video 1' means enable local video
55-
- mute_local_video
56-
57-
mute/unmute local video, 'mute_local_video 0' means unmute local video(local camera), 'mute_local_video 1' means mute local video
58-
- mute_local_audio
59-
60-
mute/unmute local audio, 'mute_local_audio 0' means unmute local audio(local audio device), 'mute_local_audio 1' means mute local audio
61-
- print_device_info
62-
63-
print video and audio device info
64-
- set_cur_camera
65-
66-
set current carmera,'set_cur_camera deviceId' you can get deviceID by print_device_info
67-
- exit
68-
69-
exit app
70-
71-
## Developer Environment Requirements
72-
* Ubuntu 12.04 x64 or higher
73-
* CentOS 7 or higher
74-
* gcc 4.8 or higher
75-
76-
77-
## Contact Us
78-
79-
- For potential issues, take a look at our [FAQ](https://docs.agora.io/en/faq) first
80-
- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials
81-
- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case
82-
- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community)
83-
- You can find full API documentation at [Document Center](https://docs.agora.io/en/)
84-
- If you encounter problems during integration, you can ask question in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io)
85-
- You can file bugs about this sample at [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)
86-
87-
## License
88-
89-
The MIT License (MIT).
1+
# Open Video Call Linux
2+
3+
*Read this in other languages: [中文](README.zh.md)*
4+
5+
The Open Video Call Linux Sample App is an open-source demo that will help you get video chat integrated directly into your Linux applications using the Agora Video SDK.
6+
7+
With this sample app, you can:
8+
9+
- Join / leave channel
10+
- Mute / unmute audio
11+
- Enable / disable video
12+
- Change camera
13+
- Setup resolution, frame rate and bit rate
14+
15+
This demo is written in **C++**
16+
17+
Agora Video SDK supports iOS / Android / Windows / macOS etc. You can find demos of these platform here:
18+
19+
- [OpenVideoCall-Android](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-Android)
20+
- [OpenVideoCall-iOS](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-iOS)
21+
- [OpenVideoCall-macOS](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-macOS)
22+
- [OpenVideoCall-Windows](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-Windows)
23+
24+
## Running the App
25+
First, create a developer account at [Agora.io](https://dashboard.agora.io/signin/), and obtain an App ID. set appID in run.sh
26+
27+
```
28+
--appId "Your app ID"
29+
```
30+
31+
> To ensure communication security, Agora uses tokens (dynamic keys) to authenticate users joining a channel.
32+
>
33+
> Temporary tokens are for demonstration and testing purposes only and remain valid for 24 hours. In a production environment, you need to deploy your own server for generating tokens. See [Generate a Token](https://docs.agora.io/en/Interactive Broadcast/token_server)for details.
34+
35+
Next, download the **Agora Video SDK** from [Agora.io SDK](https://www.agora.io/en/blog/download/).
36+
Unzip the downloaded SDK package and copy
37+
38+
- libagora_rtc_sdk.so
39+
40+
to the "OpenVideoCall/libs" folder in project(the old one may be over written).
41+
42+
configue parameters in run.sh.
43+
Using 'make' command to build the demo. Using ./run.sh to run demo
44+
openVideoCall is a commandline demo. Commands as follows:
45+
- open
46+
47+
open video call
48+
- close
49+
50+
close video call
51+
- enable_video
52+
53+
enable/disable video, 'enable_video 0' means disable video, 'enable_video 1' means enable video
54+
- enable_audio
55+
56+
enable/disable audio, 'enable_audio 0' means disable audio, 'enable_audio 1' means enable audio
57+
- enable_local_video
58+
59+
enable/disable local video, 'enable_local_video 0' means disable local video(local camera), 'enable_local_video 1' means enable local video
60+
- mute_local_video
61+
62+
mute/unmute local video, 'mute_local_video 0' means unmute local video(local camera), 'mute_local_video 1' means mute local video
63+
- mute_local_audio
64+
65+
mute/unmute local audio, 'mute_local_audio 0' means unmute local audio(local audio device), 'mute_local_audio 1' means mute local audio
66+
- print_device_info
67+
68+
print video and audio device info
69+
- set_cur_camera
70+
71+
set current carmera,'set_cur_camera deviceId' you can get deviceID by print_device_info
72+
- exit
73+
74+
exit app
75+
76+
## Developer Environment Requirements
77+
* Ubuntu 12.04 x64 or higher
78+
* CentOS 7 or higher
79+
* gcc 4.8 or higher
80+
81+
82+
## Contact Us
83+
84+
- For potential issues, take a look at our [FAQ](https://docs.agora.io/en/faq) first
85+
- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials
86+
- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case
87+
- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community)
88+
- You can find full API documentation at [Document Center](https://docs.agora.io/en/)
89+
- If you encounter problems during integration, you can ask question in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io)
90+
- You can file bugs about this sample at [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)
91+
92+
## License
93+
94+
The MIT License (MIT).

0 commit comments

Comments
 (0)