diff --git a/QNDroidRTCDemo/app/build.gradle b/QNDroidRTCDemo/app/build.gradle index dc13ad5..85828c2 100644 --- a/QNDroidRTCDemo/app/build.gradle +++ b/QNDroidRTCDemo/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "com.qiniu.droid.rtc.demo" minSdkVersion 18 targetSdkVersion 28 - versionCode 18 - versionName "2.1.0" + versionCode 21 + versionName "2.1.1" buildConfigField "long", "BUILD_TIMESTAMP", System.currentTimeMillis() + "L" } diff --git a/QNDroidRTCDemo/app/libs/qndroid-rtc-2.1.0.jar b/QNDroidRTCDemo/app/libs/qndroid-rtc-2.1.0.jar deleted file mode 100644 index ed5b1df..0000000 Binary files a/QNDroidRTCDemo/app/libs/qndroid-rtc-2.1.0.jar and /dev/null differ diff --git a/QNDroidRTCDemo/app/libs/qndroid-rtc-2.1.1.jar b/QNDroidRTCDemo/app/libs/qndroid-rtc-2.1.1.jar new file mode 100644 index 0000000..ad17d29 Binary files /dev/null and b/QNDroidRTCDemo/app/libs/qndroid-rtc-2.1.1.jar differ diff --git a/QNDroidRTCDemo/app/src/main/java/com/qiniu/droid/rtc/demo/activity/RoomActivity.java b/QNDroidRTCDemo/app/src/main/java/com/qiniu/droid/rtc/demo/activity/RoomActivity.java index 74c8d99..37e6a40 100644 --- a/QNDroidRTCDemo/app/src/main/java/com/qiniu/droid/rtc/demo/activity/RoomActivity.java +++ b/QNDroidRTCDemo/app/src/main/java/com/qiniu/droid/rtc/demo/activity/RoomActivity.java @@ -445,17 +445,22 @@ public void onCreateMergeJobSuccess(String mergeJobId) { @Override public void onError(int errorCode, String description) { - if (errorCode == QNErrorCode.ERROR_TOKEN_ERROR - || errorCode == QNErrorCode.ERROR_TOKEN_EXPIRED - || errorCode == QNErrorCode.ERROR_AUTH_FAIL - || errorCode == QNErrorCode.ERROR_RECONNECT_TOKEN_ERROR - || errorCode == QNErrorCode.ERROR_SIGNAL_IO_EXCEPTION - || errorCode == QNErrorCode.ERROR_TOKEN_INVALID) { + if (errorCode == QNErrorCode.ERROR_TOKEN_INVALID + || errorCode == QNErrorCode.ERROR_TOKEN_ERROR + || errorCode == QNErrorCode.ERROR_TOKEN_EXPIRED) { reportError("roomToken 错误,请重新加入房间"); + } else if (errorCode == QNErrorCode.ERROR_AUTH_FAIL + || errorCode == QNErrorCode.ERROR_RECONNECT_TOKEN_ERROR) { + // reset TrackWindowMgr + mTrackWindowMgr.reset(); + // display local videoTrack + List localTrackListExcludeScreenTrack = new ArrayList<>(mLocalTrackList); + localTrackListExcludeScreenTrack.remove(mLocalScreenTrack); + mTrackWindowMgr.addTrackInfo(mUserId, localTrackListExcludeScreenTrack); + // rejoin Room + mEngine.joinRoom(mRoomToken); } else if (errorCode == QNErrorCode.ERROR_PUBLISH_FAIL) { reportError("发布失败,请重新加入房间发布"); - } else if (errorCode == QNErrorCode.ERROR_ACCESSTOKEN_INVALID) { - reportError("服务端发生了一些问题,加入房间失败,请重试"); } else { logAndToast("errorCode:" + errorCode + " description:" + description); } diff --git a/QNDroidRTCDemo/app/src/main/java/com/qiniu/droid/rtc/demo/utils/TrackWindowMgr.java b/QNDroidRTCDemo/app/src/main/java/com/qiniu/droid/rtc/demo/utils/TrackWindowMgr.java index 615ff55..4ba02ed 100644 --- a/QNDroidRTCDemo/app/src/main/java/com/qiniu/droid/rtc/demo/utils/TrackWindowMgr.java +++ b/QNDroidRTCDemo/app/src/main/java/com/qiniu/droid/rtc/demo/utils/TrackWindowMgr.java @@ -11,6 +11,7 @@ import org.webrtc.Logging; import java.util.ArrayList; +import java.util.Collection; import java.util.List; public class TrackWindowMgr { @@ -305,4 +306,11 @@ private void updateLayoutParams(UserTrackView targetView, int width, int height, lp.setMarginStart(marginStart); targetView.setLayoutParams(lp); } + + public void reset() { + Collection users = new ArrayList<>(mUserWindowMap.keySet()); + for (String userId : users) { + removeTrackWindow(userId); + } + } } diff --git a/QNDroidRTCDemo/app/src/main/jniLibs/arm64-v8a/libqndroid_rtc.so b/QNDroidRTCDemo/app/src/main/jniLibs/arm64-v8a/libqndroid_rtc.so index 11fe11e..9a3264b 100755 Binary files a/QNDroidRTCDemo/app/src/main/jniLibs/arm64-v8a/libqndroid_rtc.so and b/QNDroidRTCDemo/app/src/main/jniLibs/arm64-v8a/libqndroid_rtc.so differ diff --git a/QNDroidRTCDemo/app/src/main/jniLibs/armeabi-v7a/libqndroid_rtc.so b/QNDroidRTCDemo/app/src/main/jniLibs/armeabi-v7a/libqndroid_rtc.so index abf1bce..e8aa35d 100755 Binary files a/QNDroidRTCDemo/app/src/main/jniLibs/armeabi-v7a/libqndroid_rtc.so and b/QNDroidRTCDemo/app/src/main/jniLibs/armeabi-v7a/libqndroid_rtc.so differ diff --git a/QNDroidRTCDemo/app/src/main/jniLibs/armeabi/libqndroid_rtc.so b/QNDroidRTCDemo/app/src/main/jniLibs/armeabi/libqndroid_rtc.so index eb58c78..bd1d208 100755 Binary files a/QNDroidRTCDemo/app/src/main/jniLibs/armeabi/libqndroid_rtc.so and b/QNDroidRTCDemo/app/src/main/jniLibs/armeabi/libqndroid_rtc.so differ diff --git a/QNDroidRTCDemo/app/src/main/jniLibs/x86/libqndroid_rtc.so b/QNDroidRTCDemo/app/src/main/jniLibs/x86/libqndroid_rtc.so index 9785e4f..d9c11da 100755 Binary files a/QNDroidRTCDemo/app/src/main/jniLibs/x86/libqndroid_rtc.so and b/QNDroidRTCDemo/app/src/main/jniLibs/x86/libqndroid_rtc.so differ diff --git a/README.md b/README.md index 2b138cb..59a1aed 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,9 @@ QNDroidRTC 是七牛云推出的一款适用于 Android 平台的实时音视频 - 支持自动订阅功能 - 支持本地发布多路视频 - 支持音频与视频分开发布 -- 支持蓝牙耳机通话 +- 支持蓝牙耳机通话 - 支持截帧功能 +- 支持采集分辨率与编码分辨率分别采用不同朝向 # 3 方案介绍 diff --git a/ReleaseNotes/release-notes-2.1.1.md b/ReleaseNotes/release-notes-2.1.1.md new file mode 100644 index 0000000..da43a1f --- /dev/null +++ b/ReleaseNotes/release-notes-2.1.1.md @@ -0,0 +1,31 @@ +# QNDroidRTC Release Notes for 2.1.1 + +## 简介 + +QNDroidRTC 是七牛推出的一款适用于 Android 平台的音视频通话 SDK,提供了包括美颜、滤镜、水印、音视频通话等多种功能,提供灵活的接口,支持高度定制以及二次开发。 + +## 版本 + +- 发布 qndroid-rtc-2.1.1.jar +- 更新 libqndroid_rtc.so + +## 功能 + +- 支持在硬编时自动调节分辨率 +- 支持采集分辨率与编码分辨率分别采用不同朝向 +- 新增销毁指定 Track 的接口 +- 本地视频预览增加开始采集/停止采集回调 + +## 缺陷 + +- 修复部分机型及部分情况下的花屏问题 +- 修复统计信息接口无法统计所有用户信息的问题 + +## 优化 + +- 合并部分状态码以便开发者处理 +- SDK 内部增加对订阅失败及发布失败的重试逻辑 + +## 问题反馈 + +当你遇到任何问题时,可以通过在 GitHub 的 repo 提交 `issues` 来反馈问题,请尽可能的描述清楚遇到的问题,如果有错误信息也一同附带,并且在 ```Labels``` 中指明类型为 bug 或者其他。 [通过这里查看已有的 issues 和提交 bug](https://github.com/pili-engineering/QNRTC-Android/issues) diff --git a/releases/arm64-v8a/libqndroid_rtc.so b/releases/arm64-v8a/libqndroid_rtc.so index 11fe11e..9a3264b 100755 Binary files a/releases/arm64-v8a/libqndroid_rtc.so and b/releases/arm64-v8a/libqndroid_rtc.so differ diff --git a/releases/armeabi-v7a/libqndroid_rtc.so b/releases/armeabi-v7a/libqndroid_rtc.so index abf1bce..e8aa35d 100755 Binary files a/releases/armeabi-v7a/libqndroid_rtc.so and b/releases/armeabi-v7a/libqndroid_rtc.so differ diff --git a/releases/armeabi/libqndroid_rtc.so b/releases/armeabi/libqndroid_rtc.so index eb58c78..bd1d208 100755 Binary files a/releases/armeabi/libqndroid_rtc.so and b/releases/armeabi/libqndroid_rtc.so differ diff --git a/releases/qndroid-rtc-2.1.0.jar b/releases/qndroid-rtc-2.1.0.jar deleted file mode 100644 index ed5b1df..0000000 Binary files a/releases/qndroid-rtc-2.1.0.jar and /dev/null differ diff --git a/releases/qndroid-rtc-2.1.1.jar b/releases/qndroid-rtc-2.1.1.jar new file mode 100644 index 0000000..ad17d29 Binary files /dev/null and b/releases/qndroid-rtc-2.1.1.jar differ diff --git a/releases/x86/libqndroid_rtc.so b/releases/x86/libqndroid_rtc.so index 9785e4f..d9c11da 100755 Binary files a/releases/x86/libqndroid_rtc.so and b/releases/x86/libqndroid_rtc.so differ