File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,14 +146,14 @@ class HuyaSite implements LiveSite {
146146 }
147147 try {
148148 var result = await HttpClient .instance.getJson (
149- "https://github.iill.moe/xiaoyaocz/dart_simple_live /master/assets/play_config.json" ,
149+ "https://raw.githubusercontent.com/liuchuancong/pure_live /master/assets/play_config.json" ,
150150 queryParameters: {"ts" : DateTime .now ().millisecondsSinceEpoch},
151151 );
152152 playUserAgent = json.decode (result)['huya' ]['user_agent' ];
153153 } catch (e) {
154154 debugPrint (e.toString ());
155155 }
156- return playUserAgent ?? "HYSDK(Windows, 30000002)_APP(pc_exe&6080100 &official)_SDK(trans&2.23 .0.4969 )" ;
156+ return playUserAgent ?? "HYSDK(Windows,30000002)_APP(pc_exe&7030003 &official)_SDK(trans&2.29 .0.5493 )" ;
157157 }
158158
159159 Future <String > getPlayUrl (HuyaLineModel line, int bitRate) async {
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import 'package:get/get.dart';
44import 'package:flutter/services.dart' ;
55import 'package:pure_live/common/index.dart' ;
66import 'package:pure_live/app/app_focus_node.dart' ;
7+ import 'package:pure_live/core/site/huya_site.dart' ;
78import 'package:pure_live/plugins/emoji_manager.dart' ;
89import 'package:pure_live/model/live_play_quality.dart' ;
910import 'package:pure_live/core/interface/live_danmaku.dart' ;
@@ -379,7 +380,7 @@ class LivePlayController extends StateController {
379380 "referer" : "https://live.bilibili.com" ,
380381 };
381382 } else if (currentSite.id == 'huya' ) {
382- var ua = "HYSDK(Windows,30000002)_APP(pc_exe&7030003&official)_SDK(trans&2.29.0.5493)" ;
383+ var ua = await HuyaSite (). getHuYaUA () ;
383384 headers = {"user-agent" : ua, "origin" : "https://www.huya.com" , "cookie" : settings.huyaCookie.value};
384385 }
385386 videoController = VideoController (
You can’t perform that action at this time.
0 commit comments