From 7ba2a6585702b6910ca660b6bd71c026d0b534e0 Mon Sep 17 00:00:00 2001 From: xiaoyaocz Date: Thu, 14 Sep 2023 11:18:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E9=BB=91=E5=B1=8F=E9=97=AE=E9=A2=98=20#125?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/modules/live_room/live_room_page.dart | 80 +++++++++---------- 1 file changed, 39 insertions(+), 41 deletions(-) diff --git a/simple_live_app/lib/modules/live_room/live_room_page.dart b/simple_live_app/lib/modules/live_room/live_room_page.dart index d6615ca3..8f90825f 100644 --- a/simple_live_app/lib/modules/live_room/live_room_page.dart +++ b/simple_live_app/lib/modules/live_room/live_room_page.dart @@ -148,51 +148,49 @@ class LiveRoomPage extends GetView { } Widget buildMediaPlayer() { - return Obx( - (() { - if (!controller.liveStatus.value) { - return Container( - alignment: Alignment.center, - color: Colors.black, - child: AspectRatio( - aspectRatio: 16 / 9, - child: Center( + return Stack( + children: [ + Obx(() { + var boxFit = BoxFit.contain; + double? aspectRatio; + if (AppSettingsController.instance.scaleMode.value == 0) { + boxFit = BoxFit.contain; + } else if (AppSettingsController.instance.scaleMode.value == 1) { + boxFit = BoxFit.fill; + } else if (AppSettingsController.instance.scaleMode.value == 2) { + boxFit = BoxFit.cover; + } else if (AppSettingsController.instance.scaleMode.value == 3) { + boxFit = BoxFit.contain; + aspectRatio = 16 / 9; + } else if (AppSettingsController.instance.scaleMode.value == 4) { + boxFit = BoxFit.contain; + aspectRatio = 4 / 3; + } + return Video( + controller: controller.videoController, + pauseUponEnteringBackgroundMode: false, + controls: (state) { + return playerControls(state, controller); + }, + aspectRatio: aspectRatio, + fit: boxFit, + ); + }), + Obx( + () => Visibility( + visible: !controller.liveStatus.value, + child: Container( + color: Colors.black.withOpacity(.5), + child: const Center( child: Text( - controller.errorMsg.value.isEmpty - ? "未开播" - : controller.errorMsg.value, - style: const TextStyle(fontSize: 16, color: Colors.white), + "未开播", + style: TextStyle(fontSize: 16, color: Colors.white), ), ), ), - ); - } - var boxFit = BoxFit.contain; - double? aspectRatio; - if (AppSettingsController.instance.scaleMode.value == 0) { - boxFit = BoxFit.contain; - } else if (AppSettingsController.instance.scaleMode.value == 1) { - boxFit = BoxFit.fill; - } else if (AppSettingsController.instance.scaleMode.value == 2) { - boxFit = BoxFit.cover; - } else if (AppSettingsController.instance.scaleMode.value == 3) { - boxFit = BoxFit.contain; - aspectRatio = 16 / 9; - } else if (AppSettingsController.instance.scaleMode.value == 4) { - boxFit = BoxFit.contain; - aspectRatio = 4 / 3; - } - - return Video( - controller: controller.videoController, - pauseUponEnteringBackgroundMode: false, - controls: (state) { - return playerControls(state, controller); - }, - aspectRatio: aspectRatio, - fit: boxFit, - ); - }), + ), + ), + ], ); } From f0ae1d49ac87c26c333279cda18a70a1247624f5 Mon Sep 17 00:00:00 2001 From: xiaoyaocz Date: Mon, 18 Sep 2023 10:55:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8C=85=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple_live_app/lib/app/log.dart | 2 +- simple_live_app/pubspec.yaml | 10 +-- simple_live_console/pubspec.lock | 74 ++++++++++++------- simple_live_core/lib/src/common/core_log.dart | 6 +- simple_live_core/pubspec.yaml | 2 +- 5 files changed, 59 insertions(+), 35 deletions(-) diff --git a/simple_live_app/lib/app/log.dart b/simple_live_app/lib/app/log.dart index cd768f71..b2b61160 100644 --- a/simple_live_app/lib/app/log.dart +++ b/simple_live_app/lib/app/log.dart @@ -45,7 +45,7 @@ class Log { static void e(String message, StackTrace stackTrace) { addDebugLog('$message\r\n\r\n$stackTrace', Colors.red); - logger.e("${DateTime.now().toString()}\n$message", null, stackTrace); + logger.e("${DateTime.now().toString()}\n$message", stackTrace: stackTrace); } static void w(String message) { diff --git a/simple_live_app/pubspec.yaml b/simple_live_app/pubspec.yaml index 33819aca..88ece753 100644 --- a/simple_live_app/pubspec.yaml +++ b/simple_live_app/pubspec.yaml @@ -1,9 +1,9 @@ name: simple_live_app -version: 1.3.1+10301 +version: 1.3.2+10302 publish_to: none description: "Simple Live APP" environment: - sdk: '>=2.19.1 <3.0.0' + sdk: '>=3.0.5 <4.0.0' dependencies: simple_live_core: @@ -13,12 +13,12 @@ dependencies: remixicon: ^1.0.0 #Remix图标 # 框架、工具 - get: 4.6.5 #状态管理、路由管理、国际化 + get: ^4.6.6 #状态管理、路由管理、国际化 dio: ^5.3.2 #网络请求 hive: 2.2.3 #持久化存储 hive_flutter: 1.1.0 #持久化存储 - logger: 1.1.0 #日志 - intl: 0.18.0 #国际化 + logger: ^2.0.2 #日志 + intl: ^0.18.1 #国际化 #Widget flutter_staggered_grid_view: ^0.6.2 #瀑布流/GridView diff --git a/simple_live_console/pubspec.lock b/simple_live_console/pubspec.lock index 5697672e..16097f3a 100644 --- a/simple_live_console/pubspec.lock +++ b/simple_live_console/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 url: "https://pub.flutter-io.cn" source: hosted - version: "61.0.0" + version: "64.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" url: "https://pub.flutter-io.cn" source: hosted - version: "5.13.0" + version: "6.2.0" args: dependency: transitive description: @@ -41,14 +41,22 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.1.1" + brotli: + dependency: transitive + description: + name: brotli + sha256: "7f891558ed779aab2bed874f0a36b8123f9ff3f19cf6efbee89e18ed294945ae" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.6.0" collection: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.flutter-io.cn" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -86,10 +94,10 @@ packages: dependency: transitive description: name: dio - sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" + sha256: ce75a1b40947fea0a0e16ce73337122a86762e38b982e1ccb909daa3b9bc4197 url: "https://pub.flutter-io.cn" source: hosted - version: "4.0.6" + version: "5.3.2" file: dependency: transitive description: @@ -98,6 +106,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.0" frontend_server_client: dependency: transitive description: @@ -190,10 +206,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.flutter-io.cn" source: hosted - version: "1.9.1" + version: "1.10.0" mime: dependency: transitive description: @@ -234,6 +250,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.5.1" + protobuf: + dependency: transitive + description: + name: protobuf + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.0" pub_semver: dependency: transitive description: @@ -280,7 +304,7 @@ packages: path: "../simple_live_core" relative: true source: path - version: "1.0.1" + version: "1.0.2" source_map_stack_trace: dependency: transitive description: @@ -309,18 +333,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.flutter-io.cn" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: @@ -341,26 +365,26 @@ packages: dependency: "direct dev" description: name: test - sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" + sha256: "9b0dd8e36af4a5b1569029949d50a52cb2a2a2fdaa20cebb96e6603b9ae241f9" url: "https://pub.flutter-io.cn" source: hosted - version: "1.24.3" + version: "1.24.6" test_api: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.0" + version: "0.6.1" test_core: dependency: transitive description: name: test_core - sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" + sha256: "4bef837e56375537055fdbbbf6dd458b1859881f4c7e6da936158f77d61ab265" url: "https://pub.flutter-io.cn" source: hosted - version: "0.5.3" + version: "0.5.6" typed_data: dependency: transitive description: @@ -373,10 +397,10 @@ packages: dependency: transitive description: name: vm_service - sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 url: "https://pub.flutter-io.cn" source: hosted - version: "11.7.1" + version: "11.10.0" watcher: dependency: transitive description: @@ -397,10 +421,10 @@ packages: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.2.1" yaml: dependency: transitive description: diff --git a/simple_live_core/lib/src/common/core_log.dart b/simple_live_core/lib/src/common/core_log.dart index 95513a08..5a1c45e4 100644 --- a/simple_live_core/lib/src/common/core_log.dart +++ b/simple_live_core/lib/src/common/core_log.dart @@ -35,15 +35,15 @@ class CoreLog { if (!enableLog) { return; } - logger.e("${DateTime.now().toString()}\n$message", null, stackTrace); + logger.e("${DateTime.now().toString()}\n$message", stackTrace: stackTrace); } static void error(e) { onPrintLog?.call(Level.error, e.toString()); logger.e( "${DateTime.now().toString()}\n${e.toString()}", - e, - (e is Error) ? e.stackTrace : StackTrace.current, + error: e, + stackTrace: (e is Error) ? e.stackTrace : StackTrace.current, ); } diff --git a/simple_live_core/pubspec.yaml b/simple_live_core/pubspec.yaml index 48b35557..6dedadf4 100644 --- a/simple_live_core/pubspec.yaml +++ b/simple_live_core/pubspec.yaml @@ -8,7 +8,7 @@ environment: dependencies: dio: ^5.3.2 - logger: ^1.1.0 + logger: ^2.0.2 web_socket_channel: ^2.4.0 html_unescape: ^2.0.0 protobuf: ^3.1.0 From d54e32a2703fabc4d00ed7639bdb6c2210309a58 Mon Sep 17 00:00:00 2001 From: xiaoyaocz Date: Fri, 22 Sep 2023 10:22:14 +0800 Subject: [PATCH 3/3] release 1.3.3 --- .github/workflows/publish_app_release.yml | 2 +- assets/app_version.json | 6 +++--- simple_live_app/pubspec.yaml | 4 ++-- simple_live_console/pubspec.lock | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish_app_release.yml b/.github/workflows/publish_app_release.yml index de93b5f9..92f22b9f 100644 --- a/.github/workflows/publish_app_release.yml +++ b/.github/workflows/publish_app_release.yml @@ -37,7 +37,7 @@ jobs: - name: Flutter action uses: subosito/flutter-action@v2 with: - flutter-version: '3.10.6' + flutter-version: '3.13.5' cache: true #更新Flutter的packages - name: Restore packages diff --git a/assets/app_version.json b/assets/app_version.json index accbd3b4..01d2b6f9 100644 --- a/assets/app_version.json +++ b/assets/app_version.json @@ -1,7 +1,7 @@ { - "version": "1.3.1", - "version_num": 10301, - "version_desc": "1. 支持直播间内设置定时关闭 #124\n2. 支持主页与平台自定义排序 #16,#76\n3. 支持跳转至原APP中打开直播间 #118\n4. 斗鱼增加录播判断 #6,#103\n5. 修复抖音直播问题 #121\n6. 播放失败尝试自动重连", + "version": "1.3.3", + "version_num": 10303, + "version_desc": "1. 修复直播间黑屏问题 #125\n2. 更新Flutter版本至3.13.5", "prerelease":false, "download_url": "https://github.com/xiaoyaocz/dart_simple_live/releases" } \ No newline at end of file diff --git a/simple_live_app/pubspec.yaml b/simple_live_app/pubspec.yaml index 88ece753..5ca722ba 100644 --- a/simple_live_app/pubspec.yaml +++ b/simple_live_app/pubspec.yaml @@ -1,5 +1,5 @@ name: simple_live_app -version: 1.3.2+10302 +version: 1.3.3+10303 publish_to: none description: "Simple Live APP" environment: @@ -23,7 +23,7 @@ dependencies: #Widget flutter_staggered_grid_view: ^0.6.2 #瀑布流/GridView flutter_easyrefresh: 2.2.2 #下拉刷新、上拉加载 - extended_image: ^8.0.2 #拓展Image,支持缓存 + extended_image: ^8.1.1 #拓展Image,支持缓存 flutter_smart_dialog: ^4.9.2 #各种弹窗 Toast/Dialog/Popup sticky_headers: ^0.3.0+2 #吸顶 lottie: ^1.4.3 #lottie动画 diff --git a/simple_live_console/pubspec.lock b/simple_live_console/pubspec.lock index 16097f3a..0c92ebad 100644 --- a/simple_live_console/pubspec.lock +++ b/simple_live_console/pubspec.lock @@ -182,10 +182,10 @@ packages: dependency: transitive description: name: logger - sha256: "7ad7215c15420a102ec687bb320a7312afd449bac63bfb1c60d9787c27b9767f" + sha256: ba3bc83117b2b49bdd723c0ea7848e8285a0fbc597ba09203b20d329d020c24a url: "https://pub.flutter-io.cn" source: hosted - version: "1.4.0" + version: "2.0.2" logging: dependency: transitive description: