Skip to content

Commit

Permalink
Merge pull request #151 from xiaoyaocz/dev
Browse files Browse the repository at this point in the history
Release 3.13.5
  • Loading branch information
xiaoyaocz authored Sep 22, 2023
2 parents 4aa9246 + d54e32a commit c31e6f5
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_app_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions assets/app_version.json
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 1 addition & 1 deletion simple_live_app/lib/app/log.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
80 changes: 39 additions & 41 deletions simple_live_app/lib/modules/live_room/live_room_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,51 +148,49 @@ class LiveRoomPage extends GetView<LiveRoomController> {
}

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,
);
}),
),
),
],
);
}

Expand Down
12 changes: 6 additions & 6 deletions simple_live_app/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: simple_live_app
version: 1.3.1+10301
version: 1.3.3+10303
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:
Expand All @@ -13,17 +13,17 @@ 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
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动画
Expand Down
78 changes: 51 additions & 27 deletions simple_live_console/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -166,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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions simple_live_core/lib/src/common/core_log.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}

Expand Down
2 changes: 1 addition & 1 deletion simple_live_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c31e6f5

Please sign in to comment.