Skip to content

Commit

Permalink
Merge pull request #217 from xiaoyaocz/dev
Browse files Browse the repository at this point in the history
Release 1.4.4
  • Loading branch information
xiaoyaocz authored Nov 6, 2023
2 parents 1a43d5c + fdaba15 commit 28cdf40
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 13 deletions.
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.4.1",
"version_num": 10401,
"version_desc": "1. 修复修改平台排序后链接解析失败 #156\n2. Android平台支持小窗播放 #157, #13\n3. 关注列表支持按状态筛选主播\n4. 支持将关注列表导出为文本\n5. 直播间内可快速切换关注的直播间\n6. 直播间内可设置屏蔽关键词 #153\n7. 全屏播放器手势限制滑动区域防误操作 #129",
"version": "1.4.4",
"version_num": 10404,
"version_desc": "- 优化聊天区使用体验 #52 #130 #139\n- 修复虎牙部分直播间观看一段时间后自动断开 #185\n- SC仅在哔哩哔哩平台显示\n- 修复全屏进入未直播的直播间无法返回问题 #205\n- 增加小窗时是否关闭弹幕选项\n- 房间内关注列表只显示开播房间 #183(#208 @AprDeci)\n- 添加自动关闭延迟弹窗 (#208 @AprDeci)\n- 哔哩哔哩支持登录账号,解决#209,#150\n\n桌面平台:\n- 鼠标侧键优先退出全屏 \n- esc退出全屏播放(#197 @AprDeci)\n- 添加桌面端鼠标滑动操控(#197 @AprDeci)\n- 支持音量调节 #147(#204 @AprDeci)\n- 桌面支持小窗(#204 @AprDeci)",
"prerelease":false,
"download_url": "https://github.com/xiaoyaocz/dart_simple_live/releases"
}
2 changes: 1 addition & 1 deletion simple_live_app/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BiliBiliWebLoginController extends BaseController {
webViewController = controller;
webViewController!.loadUrl(
urlRequest: URLRequest(
url: WebUri("https://passport.bilibili.com/login"),
url: Uri.parse("https://passport.bilibili.com/login"),
),
);
}
Expand All @@ -22,17 +22,30 @@ class BiliBiliWebLoginController extends BaseController {
Get.back();
}

void onLoadStop(InAppWebViewController controller, WebUri? uri) async {
void onLoadStop(InAppWebViewController controller, Uri? uri) async {
if (uri == null) {
return;
}
if (uri.host == "m.bilibili.com") {
var cookies = await cookieManager.getCookies(url: uri);
logined();
}
}

Future<bool> logined() async {
try {
var cookies = await cookieManager.getCookies(
url: Uri.parse("https://bilibili.com"));
if (cookies.isEmpty) {
return false;
}
var cookieStr = cookies.map((e) => "${e.name}=${e.value}").join(";");
Log.i(cookieStr);
BiliBiliAccountService.instance.setCookie(cookieStr);
await BiliBiliAccountService.instance.loadUserInfo();
Get.back();
return true;
} catch (e) {
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,24 @@ class BiliBiliWebLoginPage extends GetView<BiliBiliWebLoginController> {
body: InAppWebView(
onWebViewCreated: controller.onWebViewCreated,
onLoadStop: controller.onLoadStop,
initialSettings: InAppWebViewSettings(
userAgent:
"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/118.0.0.0",
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
userAgent:
"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/118.0.0.0",
useShouldOverrideUrlLoading: true,
),
),
shouldOverrideUrlLoading: (webController, navigationAction) async {
var uri = navigationAction.request.url;
if (uri == null) {
return NavigationActionPolicy.ALLOW;
}
if (uri.host == "m.bilibili.com" || uri.host == "www.bilibili.com") {
await controller.logined();
return NavigationActionPolicy.CANCEL;
}
return NavigationActionPolicy.ALLOW;
},
),
);
}
Expand Down
4 changes: 2 additions & 2 deletions simple_live_app/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: simple_live_app
version: 1.4.3+10403
version: 1.4.4+10404
publish_to: none
description: "Simple Live APP"
environment:
Expand Down Expand Up @@ -48,7 +48,7 @@ dependencies:
wakelock_plus: ^1.1.1 #屏幕常亮
file_picker: ^5.3.3 #文件选择
floating: ^2.0.1 #PIP画中画
flutter_inappwebview: ^6.0.0-beta.25 #WebView
flutter_inappwebview: ^5.8.0 #WebView

# 视频播放
media_kit: ^1.1.10
Expand Down

0 comments on commit 28cdf40

Please sign in to comment.