Skip to content

Commit

Permalink
Merge pull request #278 from AgoraIO/dev/3.4.0
Browse files Browse the repository at this point in the history
Dev/3.4.0
  • Loading branch information
plutoless authored May 11, 2021
2 parents 7f1060c + 09d6e96 commit 34ca9a2
Show file tree
Hide file tree
Showing 65 changed files with 581 additions and 426 deletions.
6 changes: 5 additions & 1 deletion Group-Video/OpenVideoCall-Android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ To build and run the sample application, get an App ID:
<string name="agora_access_token"><#YOUR TOKEN#></string>
```

> To ensure communication security, Agora uses tokens (dynamic keys) to authenticate users joining a channel.
>
> 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.
### Integrate the Agora Video SDK

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.
Expand Down Expand Up @@ -69,7 +73,7 @@ Copy from SDK|Copy to Project Folder
**x86** folder|**/app/src/main/jniLibs** folder
**armeabi-v7a** folder|**/app/src/main/jniLibs** folder



### Run the Application

Expand Down
4 changes: 4 additions & 0 deletions Group-Video/OpenVideoCall-Android/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
<string name="agora_access_token"><#YOUR TOKEN#></string>
```

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

集成方式有以下两种:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BLUETOOTH" />

<application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public class ConstantApp {
public static final int BASE_VALUE_PERMISSION = 0X0001;
public static final int PERMISSION_REQ_ID_RECORD_AUDIO = BASE_VALUE_PERMISSION + 1;
public static final int PERMISSION_REQ_ID_CAMERA = BASE_VALUE_PERMISSION + 2;
public static final int PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE = BASE_VALUE_PERMISSION + 3;

public static final int MAX_PEER_COUNT = 4;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ public void run() {

private boolean checkSelfPermissions() {
return checkSelfPermission(Manifest.permission.RECORD_AUDIO, ConstantApp.PERMISSION_REQ_ID_RECORD_AUDIO) &&
checkSelfPermission(Manifest.permission.CAMERA, ConstantApp.PERMISSION_REQ_ID_CAMERA) &&
checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, ConstantApp.PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE);
checkSelfPermission(Manifest.permission.CAMERA, ConstantApp.PERMISSION_REQ_ID_CAMERA);
}

@Override
Expand Down Expand Up @@ -164,21 +163,12 @@ public void onRequestPermissionsResult(int requestCode,
case ConstantApp.PERMISSION_REQ_ID_CAMERA: {
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, ConstantApp.PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE);
permissionGranted();
} else {
finish();
}
break;
}
case ConstantApp.PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE: {
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
} else {
finish();
}
break;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ public void onMixingAudioClicked(View view) {
@Override
public void onUserJoined(int uid) {
log.debug("onUserJoined " + (uid & 0xFFFFFFFFL));
doRenderRemoteUi(uid);

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

doRenderRemoteUi(uid);
}

private void doRenderRemoteUi(final int uid) {
Expand Down
183 changes: 94 additions & 89 deletions Group-Video/OpenVideoCall-Linux/README.md
Original file line number Diff line number Diff line change
@@ -1,89 +1,94 @@
# Open Video Call Linux

*Read this in other languages: [中文](README.zh.md)*

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.

With this sample app, you can:

- Join / leave channel
- Mute / unmute audio
- Enable / disable video
- Change camera
- Setup resolution, frame rate and bit rate

This demo is written in **C++**

Agora Video SDK supports iOS / Android / Windows / macOS etc. You can find demos of these platform here:

- [OpenVideoCall-Android](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-Android)
- [OpenVideoCall-iOS](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-iOS)
- [OpenVideoCall-macOS](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-macOS)
- [OpenVideoCall-Windows](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-Windows)

## Running the App
First, create a developer account at [Agora.io](https://dashboard.agora.io/signin/), and obtain an App ID. set appID in run.sh

```
--appId "Your app ID"
```

Next, download the **Agora Video SDK** from [Agora.io SDK](https://www.agora.io/en/blog/download/).
Unzip the downloaded SDK package and copy
- libagora_rtc_sdk.so

to the "OpenVideoCall/libs" folder in project(the old one may be over written).

configue parameters in run.sh.
Using 'make' command to build the demo. Using ./run.sh to run demo
openVideoCall is a commandline demo. Commands as follows:
- open

open video call
- close

close video call
- enable_video

enable/disable video, 'enable_video 0' means disable video, 'enable_video 1' means enable video
- enable_audio

enable/disable audio, 'enable_audio 0' means disable audio, 'enable_audio 1' means enable audio
- enable_local_video

enable/disable local video, 'enable_local_video 0' means disable local video(local camera), 'enable_local_video 1' means enable local video
- mute_local_video

mute/unmute local video, 'mute_local_video 0' means unmute local video(local camera), 'mute_local_video 1' means mute local video
- mute_local_audio

mute/unmute local audio, 'mute_local_audio 0' means unmute local audio(local audio device), 'mute_local_audio 1' means mute local audio
- print_device_info

print video and audio device info
- set_cur_camera

set current carmera,'set_cur_camera deviceId' you can get deviceID by print_device_info
- exit

exit app

## Developer Environment Requirements
* Ubuntu 12.04 x64 or higher
* CentOS 7 or higher
* gcc 4.8 or higher


## Contact Us

- For potential issues, take a look at our [FAQ](https://docs.agora.io/en/faq) first
- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials
- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case
- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community)
- You can find full API documentation at [Document Center](https://docs.agora.io/en/)
- If you encounter problems during integration, you can ask question in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io)
- You can file bugs about this sample at [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)

## License

The MIT License (MIT).
# Open Video Call Linux

*Read this in other languages: [中文](README.zh.md)*

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.

With this sample app, you can:

- Join / leave channel
- Mute / unmute audio
- Enable / disable video
- Change camera
- Setup resolution, frame rate and bit rate

This demo is written in **C++**

Agora Video SDK supports iOS / Android / Windows / macOS etc. You can find demos of these platform here:

- [OpenVideoCall-Android](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-Android)
- [OpenVideoCall-iOS](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-iOS)
- [OpenVideoCall-macOS](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-macOS)
- [OpenVideoCall-Windows](https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-Windows)

## Running the App
First, create a developer account at [Agora.io](https://dashboard.agora.io/signin/), and obtain an App ID. set appID in run.sh

```
--appId "Your app ID"
```

> To ensure communication security, Agora uses tokens (dynamic keys) to authenticate users joining a channel.
>
> 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.
Next, download the **Agora Video SDK** from [Agora.io SDK](https://www.agora.io/en/blog/download/).
Unzip the downloaded SDK package and copy

- libagora_rtc_sdk.so

to the "OpenVideoCall/libs" folder in project(the old one may be over written).

configue parameters in run.sh.
Using 'make' command to build the demo. Using ./run.sh to run demo
openVideoCall is a commandline demo. Commands as follows:
- open

open video call
- close

close video call
- enable_video

enable/disable video, 'enable_video 0' means disable video, 'enable_video 1' means enable video
- enable_audio

enable/disable audio, 'enable_audio 0' means disable audio, 'enable_audio 1' means enable audio
- enable_local_video

enable/disable local video, 'enable_local_video 0' means disable local video(local camera), 'enable_local_video 1' means enable local video
- mute_local_video

mute/unmute local video, 'mute_local_video 0' means unmute local video(local camera), 'mute_local_video 1' means mute local video
- mute_local_audio

mute/unmute local audio, 'mute_local_audio 0' means unmute local audio(local audio device), 'mute_local_audio 1' means mute local audio
- print_device_info

print video and audio device info
- set_cur_camera

set current carmera,'set_cur_camera deviceId' you can get deviceID by print_device_info
- exit

exit app

## Developer Environment Requirements
* Ubuntu 12.04 x64 or higher
* CentOS 7 or higher
* gcc 4.8 or higher


## Contact Us

- For potential issues, take a look at our [FAQ](https://docs.agora.io/en/faq) first
- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials
- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case
- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community)
- You can find full API documentation at [Document Center](https://docs.agora.io/en/)
- If you encounter problems during integration, you can ask question in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io)
- You can file bugs about this sample at [issue](https://github.com/AgoraIO/Basic-Video-Call/issues)

## License

The MIT License (MIT).
Loading

0 comments on commit 34ca9a2

Please sign in to comment.