diff --git a/PLDroidMediaStreamingDemo/app/build.gradle b/PLDroidMediaStreamingDemo/app/build.gradle index f6e5bc2..cae0210 100644 --- a/PLDroidMediaStreamingDemo/app/build.gradle +++ b/PLDroidMediaStreamingDemo/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.qiniu.pili.droid.streaming.demo" minSdkVersion 18 targetSdkVersion 29 - versionCode 74 - versionName "3.1.1" + versionCode 75 + versionName "3.1.2" } buildTypes { release { diff --git a/PLDroidMediaStreamingDemo/app/libs/pldroid-media-streaming-3.1.1.jar b/PLDroidMediaStreamingDemo/app/libs/pldroid-media-streaming-3.1.1.jar deleted file mode 100644 index ede9293..0000000 Binary files a/PLDroidMediaStreamingDemo/app/libs/pldroid-media-streaming-3.1.1.jar and /dev/null differ diff --git a/PLDroidMediaStreamingDemo/app/libs/pldroid-media-streaming-3.1.2.jar b/PLDroidMediaStreamingDemo/app/libs/pldroid-media-streaming-3.1.2.jar new file mode 100644 index 0000000..bba6388 Binary files /dev/null and b/PLDroidMediaStreamingDemo/app/libs/pldroid-media-streaming-3.1.2.jar differ diff --git a/PLDroidMediaStreamingDemo/app/src/main/AndroidManifest.xml b/PLDroidMediaStreamingDemo/app/src/main/AndroidManifest.xml index 5a02f31..a35f197 100644 --- a/PLDroidMediaStreamingDemo/app/src/main/AndroidManifest.xml +++ b/PLDroidMediaStreamingDemo/app/src/main/AndroidManifest.xml @@ -7,13 +7,11 @@ - + - - diff --git a/PLDroidMediaStreamingDemo/app/src/main/java/com/qiniu/pili/droid/streaming/demo/MainActivity.java b/PLDroidMediaStreamingDemo/app/src/main/java/com/qiniu/pili/droid/streaming/demo/MainActivity.java index ac5b0a1..277fc0b 100644 --- a/PLDroidMediaStreamingDemo/app/src/main/java/com/qiniu/pili/droid/streaming/demo/MainActivity.java +++ b/PLDroidMediaStreamingDemo/app/src/main/java/com/qiniu/pili/droid/streaming/demo/MainActivity.java @@ -240,6 +240,12 @@ public void run() { } public void scanQRCode(View v) { + // API < M, no need to request permissions, so always true. + boolean isPermissionOK = Build.VERSION.SDK_INT < Build.VERSION_CODES.M || mPermissionChecker.checkPermission(); + if (!isPermissionOK) { + Util.showToast(this, "请授予相关权限!!!"); + return; + } IntentIntegrator integrator = new IntentIntegrator(this); integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES); integrator.setOrientationLocked(true); diff --git a/PLDroidMediaStreamingDemo/app/src/main/java/com/qiniu/pili/droid/streaming/demo/utils/PermissionChecker.java b/PLDroidMediaStreamingDemo/app/src/main/java/com/qiniu/pili/droid/streaming/demo/utils/PermissionChecker.java index 6cd38d5..75efa6f 100644 --- a/PLDroidMediaStreamingDemo/app/src/main/java/com/qiniu/pili/droid/streaming/demo/utils/PermissionChecker.java +++ b/PLDroidMediaStreamingDemo/app/src/main/java/com/qiniu/pili/droid/streaming/demo/utils/PermissionChecker.java @@ -56,12 +56,6 @@ public boolean checkPermission() { if (!addPermission(permissionsList, Manifest.permission.WRITE_EXTERNAL_STORAGE)) { permissionsNeeded.add("Write external storage"); } - if (!addPermission(permissionsList, Manifest.permission.READ_PHONE_STATE)) { - permissionsNeeded.add("Read phone state"); - } - if (!addPermission(permissionsList, Manifest.permission.ACCESS_FINE_LOCATION)) { - permissionsNeeded.add("Access fine location"); - } if (!permissionsNeeded.isEmpty()) { // Need Rationale diff --git a/README.md b/README.md index 3f46d21..66c2d2b 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,14 @@ PLDroidCameraStreaming 是一个适用于 Android 的 RTMP 直播推流 SDK, ## 版本升级须知 +### v3.1.2 + +- 从 v3.1.2 版本开始,SDK 将不再强制要求获取 READ_PHONE_STATE 和 ACCESS_FINE_LOCATION 的权限 + +### v3.1.1 + +- 从 v3.1.1 版本开始,Happy DNS 库建议到 0.2.18 版本 + ### v3.0.2 - 从 v3.0.2 版本开始,请务必添加 `android.arch.lifecycle:extensions:x.y.z` 的依赖 - 从 v3.0.2 版本开始,`StreamingEnv.init(Context context)` 已被弃用,请更新到 `StreamingEnv.init(Context contex, String userId)` 进行环境的初始化,其中,userId 代表用户的唯一标识符,用于区分不同的用户 diff --git a/ReleaseNotes/release-notes-3.1.2.md b/ReleaseNotes/release-notes-3.1.2.md new file mode 100644 index 0000000..b53551f --- /dev/null +++ b/ReleaseNotes/release-notes-3.1.2.md @@ -0,0 +1,30 @@ +# PLDroidMediaStreaming Release Notes for 3.1.2 + +本次更新: + +## 版本 + +- 发布 pldroid-media-streaming-3.1.2.jar + +## 功能 + +- 新增硬编场景码率控制模式的设置 + +## 优化 + +- 优化自适应码率的调整逻辑 + +## 缺陷 + +- 修复个别场景下的空指针异常 +- 修复录屏场景下偶现的音画不同步问题 + +## 注意事项 + +- 从 v3.1.2 版本开始,SDK 将不再强制要求获取 READ_PHONE_STATE 和 ACCESS_FINE_LOCATION 的权限 +- 从 v3.1.1 版本开始,Happy DNS 库建议到 0.2.18 版本 +- **从 v3.0.2 版本开始,请务必添加 `android.arch.lifecycle:extensions:x.y.z` 的依赖** +- 从 v3.0.2 版本开始,`StreamingEnv.init(Context context)` 已被弃用,请更新到 `StreamingEnv.init(Context contex, String userId)` 进行环境的初始化,其中,userId 代表用户的唯一标识符,用于区分不同的用户 +- **从 v3.0.0 版本开始,七牛直播推流 SDK 需要先获取授权才能使用。授权分为试用版和正式版,可通过 400-808-9176 转 2 号线联系七牛商务咨询,或者 [通过工单](https://support.qiniu.com/?ref=developer.qiniu.com) 联系七牛的技术支持。** +- **v3.0.0 之前的版本不受影响,请继续放心使用。** +- **老客户升级 v3.0.0 版本之前,请先联系七牛获取相应授权,以免发生鉴权不通过的现象。** \ No newline at end of file diff --git a/releases/pldroid-media-streaming-3.1.1.jar b/releases/pldroid-media-streaming-3.1.1.jar deleted file mode 100644 index ede9293..0000000 Binary files a/releases/pldroid-media-streaming-3.1.1.jar and /dev/null differ diff --git a/releases/pldroid-media-streaming-3.1.2.jar b/releases/pldroid-media-streaming-3.1.2.jar new file mode 100644 index 0000000..bba6388 Binary files /dev/null and b/releases/pldroid-media-streaming-3.1.2.jar differ