From 28e7980c47d0105819771be4ab924c76b6cbfcf5 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Thu, 22 Jun 2023 16:15:20 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20av=E6=9B=BF=E6=8D=A2=E4=B8=BAbv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/widgets/video_card_h.dart | 3 +- lib/common/widgets/video_card_v.dart | 3 +- lib/http/reply.dart | 4 +- lib/http/video.dart | 46 +++++++++---------- lib/models/search/result.dart | 1 + lib/pages/favDetail/controller.dart | 4 +- lib/pages/favDetail/view.dart | 4 +- .../favDetail/widget/fav_video_card.dart | 4 +- lib/pages/history/widgets/item.dart | 4 +- lib/pages/video/detail/controller.dart | 7 +-- .../video/detail/introduction/controller.dart | 31 +++++++------ .../video/detail/related/controller.dart | 4 +- lib/pages/video/detail/reply/controller.dart | 10 ++-- lib/pages/video/detail/reply/view.dart | 28 ++++++----- .../video/detail/replyReply/controller.dart | 7 +-- lib/pages/video/detail/replyReply/view.dart | 3 +- lib/pages/video/detail/view.dart | 6 +-- 17 files changed, 98 insertions(+), 71 deletions(-) diff --git a/lib/common/widgets/video_card_h.dart b/lib/common/widgets/video_card_h.dart index 7f0c9372..50bf9ae4 100644 --- a/lib/common/widgets/video_card_h.dart +++ b/lib/common/widgets/video_card_h.dart @@ -22,6 +22,7 @@ class VideoCardH extends StatelessWidget { @override Widget build(BuildContext context) { int aid = videoItem.aid; + String bvid = videoItem.bvid; String heroTag = Utils.makeHeroTag(aid); return GestureDetector( onLongPress: () { @@ -37,7 +38,7 @@ class VideoCardH extends StatelessWidget { child: InkWell( onTap: () async { await Future.delayed(const Duration(milliseconds: 200)); - Get.toNamed('/video?aid=$aid&cid=${videoItem.cid}', + Get.toNamed('/video?bvid=$bvid&cid=${videoItem.cid}', arguments: {'videoItem': videoItem, 'heroTag': heroTag}); }, child: Column( diff --git a/lib/common/widgets/video_card_v.dart b/lib/common/widgets/video_card_v.dart index 293644a4..c449f756 100644 --- a/lib/common/widgets/video_card_v.dart +++ b/lib/common/widgets/video_card_v.dart @@ -44,7 +44,8 @@ class VideoCardV extends StatelessWidget { child: InkWell( onTap: () async { await Future.delayed(const Duration(milliseconds: 200)); - Get.toNamed('/video?aid=${videoItem.id}&cid=${videoItem.cid}', + print(videoItem.bvid); + Get.toNamed('/video?bvid=${videoItem.bvid}&cid=${videoItem.cid}', arguments: {'videoItem': videoItem, 'heroTag': heroTag}); }, child: Column( diff --git a/lib/http/reply.dart b/lib/http/reply.dart index 2e976994..51c9b8fe 100644 --- a/lib/http/reply.dart +++ b/lib/http/reply.dart @@ -3,7 +3,7 @@ import 'package:pilipala/http/init.dart'; class ReplyHttp { static Future replyList({ - required String oid, + required int oid, required int pageNum, required int type, int sort = 1, @@ -36,7 +36,7 @@ class ReplyHttp { } static Future replyReplyList({ - required String oid, + required int oid, required String root, required int pageNum, required int type, diff --git a/lib/http/video.dart b/lib/http/video.dart index 547bf2ec..dd756386 100644 --- a/lib/http/video.dart +++ b/lib/http/video.dart @@ -62,10 +62,10 @@ class VideoHttp { // 视频流 static Future videoUrl( - {int? avid, int? bvid, required int cid, int? qn}) async { + {int? avid, String? bvid, required int cid, int? qn}) async { Map data = { - 'avid': avid, - // 'bvid': bvid, + // 'avid': avid, + 'bvid': bvid, 'cid': cid, // 'qn': qn ?? 80, // 获取所有格式的视频 @@ -99,8 +99,8 @@ class VideoHttp { } // 视频信息 标题、简介 - static Future videoIntro({required String aid}) async { - var res = await Request().get(Api.videoIntro, data: {'aid': aid}); + static Future videoIntro({required String bvid}) async { + var res = await Request().get(Api.videoIntro, data: {'bvid': bvid}); VideoDetailResponse result = VideoDetailResponse.fromJson(res.data); if (result.code == 0) { return {'status': true, 'data': result.data!}; @@ -121,8 +121,8 @@ class VideoHttp { } // 相关视频 - static Future relatedVideoList({required String aid}) async { - var res = await Request().get(Api.relatedList, data: {'aid': aid}); + static Future relatedVideoList({required String bvid}) async { + var res = await Request().get(Api.relatedList, data: {'bvid': bvid}); if (res.data['code'] == 0) { List list = []; for (var i in res.data['data']) { @@ -135,8 +135,8 @@ class VideoHttp { } // 获取点赞状态 - static Future hasLikeVideo({required String aid}) async { - var res = await Request().get(Api.hasLikeVideo, data: {'aid': aid}); + static Future hasLikeVideo({required String bvid}) async { + var res = await Request().get(Api.hasLikeVideo, data: {'bvid': bvid}); if (res.data['code'] == 0) { return {'status': true, 'data': res.data['data']}; } else { @@ -145,8 +145,8 @@ class VideoHttp { } // 获取投币状态 - static Future hasCoinVideo({required String aid}) async { - var res = await Request().get(Api.hasCoinVideo, data: {'aid': aid}); + static Future hasCoinVideo({required String bvid}) async { + var res = await Request().get(Api.hasCoinVideo, data: {'bvid': bvid}); if (res.data['code'] == 0) { return {'status': true, 'data': res.data['data']}; } else { @@ -155,11 +155,11 @@ class VideoHttp { } // 投币 - static Future coinVideo({required String aid, required int multiply}) async { + static Future coinVideo({required String bvid, required int multiply}) async { var res = await Request().post( Api.coinVideo, queryParameters: { - 'aid': aid, + 'bvid': bvid, 'multiply': multiply, 'select_like': 0, 'csrf': await Request.getCsrf(), @@ -173,7 +173,7 @@ class VideoHttp { } // 获取收藏状态 - static Future hasFavVideo({required String aid}) async { + static Future hasFavVideo({required int aid}) async { var res = await Request().get(Api.hasFavVideo, data: {'aid': aid}); if (res.data['code'] == 0) { return {'status': true, 'data': res.data['data']}; @@ -183,11 +183,11 @@ class VideoHttp { } // 一键三连 - static Future oneThree({required String aid}) async { + static Future oneThree({required String bvid}) async { var res = await Request().post( Api.oneThree, queryParameters: { - 'aid': aid, + 'bvid': bvid, 'csrf': await Request.getCsrf(), }, ); @@ -199,11 +199,11 @@ class VideoHttp { } // (取消)点赞 - static Future likeVideo({required String aid, required bool type}) async { + static Future likeVideo({required String bvid, required bool type}) async { var res = await Request().post( Api.likeVideo, queryParameters: { - 'aid': aid, + 'bvid': bvid, 'like': type ? 1 : 2, 'csrf': await Request.getCsrf(), }, @@ -217,7 +217,7 @@ class VideoHttp { // (取消)收藏 static Future favVideo( - {required String aid, String? addIds, String? delIds}) async { + {required int aid, String? addIds, String? delIds}) async { var res = await Request().post(Api.favVideo, queryParameters: { 'rid': aid, 'type': 2, @@ -233,7 +233,7 @@ class VideoHttp { } // 查看视频被收藏在哪个文件夹 - static Future videoInFolder({required int mid, required String rid}) async { + static Future videoInFolder({required int mid, required int rid}) async { var res = await Request() .get(Api.videoInFolder, data: {'up_mid': mid, 'rid': rid}); if (res.data['code'] == 0) { @@ -305,10 +305,10 @@ class VideoHttp { } // 视频播放进度 - static Future heartBeat({aid, progress, realtime}) async { + static Future heartBeat({bvid, progress, realtime}) async { var res = await Request().post(Api.heartBeat, queryParameters: { - 'aid': aid, - // 'bvid': '', + // 'aid': aid, + 'bvid': bvid, // 'cid': '', // 'epid': '', // 'sid': '', diff --git a/lib/models/search/result.dart b/lib/models/search/result.dart index 3a932851..7e14d045 100644 --- a/lib/models/search/result.dart +++ b/lib/models/search/result.dart @@ -76,6 +76,7 @@ class SearchVideoItemModel { cid = json['id']; arcurl = json['arcurl']; aid = json['aid']; + bvid = json['bvid']; title = json['title'].replaceAll(RegExp(r'<.*?>'), ''); description = json['description']; pic = 'https:${json['pic']}'; diff --git a/lib/pages/favDetail/controller.dart b/lib/pages/favDetail/controller.dart index cc59676a..52ddebc8 100644 --- a/lib/pages/favDetail/controller.dart +++ b/lib/pages/favDetail/controller.dart @@ -4,6 +4,7 @@ import 'package:pilipala/http/user.dart'; import 'package:pilipala/http/video.dart'; import 'package:pilipala/models/user/fav_detail.dart'; import 'package:pilipala/models/user/fav_folder.dart'; +import 'package:pilipala/utils/id_utils.dart'; class FavDetailController extends GetxController { FavFolderItemData? item; @@ -20,6 +21,7 @@ class FavDetailController extends GetxController { } Future queryUserFavFolderDetail() async { + print('🐯🐯虎'); var res = await await UserHttp.userFavFolderDetail( pn: 1, ps: 15, @@ -31,7 +33,7 @@ class FavDetailController extends GetxController { onCancelFav(int id) async { var result = await VideoHttp.favVideo( - aid: id.toString(), addIds: '', delIds: mediaId.toString()); + aid: id, addIds: '', delIds: mediaId.toString()); if (result['status']) { if (result['data']['prompt']) { List dataList = favDetailData.value.medias!; diff --git a/lib/pages/favDetail/view.dart b/lib/pages/favDetail/view.dart index 7ee7d429..ad7cdb99 100644 --- a/lib/pages/favDetail/view.dart +++ b/lib/pages/favDetail/view.dart @@ -20,10 +20,12 @@ class _FavDetailPageState extends State { final FavDetailController _favDetailController = Get.put(FavDetailController()); late StreamController titleStreamC; // a + Future? _futureBuilderFuture; @override void initState() { super.initState(); + _futureBuilderFuture = _favDetailController.queryUserFavFolderDetail(); titleStreamC = StreamController(); _controller.addListener( () { @@ -165,7 +167,7 @@ class _FavDetailPageState extends State { ), ), FutureBuilder( - future: _favDetailController.queryUserFavFolderDetail(), + future: _futureBuilderFuture, builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.done) { Map data = snapshot.data; diff --git a/lib/pages/favDetail/widget/fav_video_card.dart b/lib/pages/favDetail/widget/fav_video_card.dart index a0d6d56e..8bf12f8a 100644 --- a/lib/pages/favDetail/widget/fav_video_card.dart +++ b/lib/pages/favDetail/widget/fav_video_card.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:pilipala/common/constants.dart'; import 'package:pilipala/common/widgets/stat/danmu.dart'; import 'package:pilipala/common/widgets/stat/view.dart'; +import 'package:pilipala/utils/id_utils.dart'; import 'package:pilipala/utils/utils.dart'; import 'package:pilipala/common/widgets/network_img_layer.dart'; @@ -19,6 +20,7 @@ class FavVideoCardH extends StatelessWidget { @override Widget build(BuildContext context) { int id = videoItem.id; + String bvid = IdUtils.av2bv(id); String heroTag = Utils.makeHeroTag(id); return Dismissible( movementDuration: const Duration(milliseconds: 300), @@ -43,7 +45,7 @@ class FavVideoCardH extends StatelessWidget { child: InkWell( onTap: () async { await Future.delayed(const Duration(milliseconds: 200)); - Get.toNamed('/video?aid=$id&cid=${videoItem.cid}', + Get.toNamed('/video?bvid=$bvid&cid=${videoItem.cid}', arguments: {'videoItem': videoItem, 'heroTag': heroTag}); }, child: Column( diff --git a/lib/pages/history/widgets/item.dart b/lib/pages/history/widgets/item.dart index 9f266e49..4cacb45c 100644 --- a/lib/pages/history/widgets/item.dart +++ b/lib/pages/history/widgets/item.dart @@ -3,6 +3,7 @@ import 'package:get/get.dart'; import 'package:pilipala/common/constants.dart'; import 'package:pilipala/common/widgets/network_img_layer.dart'; import 'package:pilipala/models/common/business_type.dart'; +import 'package:pilipala/utils/id_utils.dart'; import 'package:pilipala/utils/utils.dart'; class HistoryItem extends StatelessWidget { @@ -12,6 +13,7 @@ class HistoryItem extends StatelessWidget { @override Widget build(BuildContext context) { int aid = videoItem.history.oid; + String bvid = videoItem.history.bvid; String heroTag = Utils.makeHeroTag(aid); return InkWell( onTap: () async { @@ -29,7 +31,7 @@ class HistoryItem extends StatelessWidget { }, ); } else { - Get.toNamed('/video?aid=$aid&cid=${videoItem.history.cid}', + Get.toNamed('/video?bvid=$bvid&cid=${videoItem.history.cid}', arguments: {'heroTag': heroTag, 'pic': videoItem.cover}); } }, diff --git a/lib/pages/video/detail/controller.dart b/lib/pages/video/detail/controller.dart index 72f1f74d..85521a52 100644 --- a/lib/pages/video/detail/controller.dart +++ b/lib/pages/video/detail/controller.dart @@ -16,7 +16,7 @@ class VideoDetailController extends GetxController { RxList tabs = ['简介', '评论'].obs; // 视频aid - int aid = int.parse(Get.parameters['aid']!); + String bvid = Get.parameters['bvid']!; int cid = int.parse(Get.parameters['cid']!); // 是否预渲染 骨架屏 @@ -113,7 +113,8 @@ class VideoDetailController extends GetxController { // 视频链接 queryVideoUrl() async { - var result = await VideoHttp.videoUrl(cid: cid, avid: aid); + print('🐶🐶🐶'); + var result = await VideoHttp.videoUrl(cid: cid, bvid: bvid); // log('result: ${result.toString()}'); if (result['status']) { PlayUrlModel data = result['data']; @@ -133,7 +134,7 @@ class VideoDetailController extends GetxController { void markHeartBeat() async { Duration progress = meeduPlayerController.position.value; - await VideoHttp.heartBeat(aid: aid, progress: progress.inSeconds); + await VideoHttp.heartBeat(bvid: bvid, progress: progress.inSeconds); } @override diff --git a/lib/pages/video/detail/introduction/controller.dart b/lib/pages/video/detail/introduction/controller.dart index 697c7319..40125e7b 100644 --- a/lib/pages/video/detail/introduction/controller.dart +++ b/lib/pages/video/detail/introduction/controller.dart @@ -8,12 +8,13 @@ import 'package:pilipala/http/video.dart'; import 'package:pilipala/models/user/fav_folder.dart'; import 'package:pilipala/models/video_detail_res.dart'; import 'package:pilipala/pages/video/detail/controller.dart'; +import 'package:pilipala/utils/id_utils.dart'; import 'package:pilipala/utils/storage.dart'; import 'package:share_plus/share_plus.dart'; class VideoIntroController extends GetxController { - // 视频aid - String aid = Get.parameters['aid']!; + // 视频bvid + String bvid = Get.parameters['bvid']!; // 是否预渲染 骨架屏 bool preRender = false; @@ -69,7 +70,7 @@ class VideoIntroController extends GetxController { // 获取视频简介 Future queryVideoIntro() async { - var result = await VideoHttp.videoIntro(aid: aid); + var result = await VideoHttp.videoIntro(bvid: bvid); if (result['status']) { videoDetail.value = result['data']!; Get.find(tag: Get.arguments['heroTag']) @@ -104,21 +105,25 @@ class VideoIntroController extends GetxController { // 获取点赞状态 Future queryHasLikeVideo() async { - var result = await VideoHttp.hasLikeVideo(aid: aid); + var result = await VideoHttp.hasLikeVideo(bvid: bvid); // data num 被点赞标志 0:未点赞 1:已点赞 hasLike.value = result["data"] == 1 ? true : false; } // 获取投币状态 Future queryHasCoinVideo() async { - var result = await VideoHttp.hasCoinVideo(aid: aid); + var result = await VideoHttp.hasCoinVideo(bvid: bvid); hasCoin.value = result["data"]['multiply'] == 0 ? false : true; } // 获取收藏状态 Future queryHasFavVideo() async { - var result = await VideoHttp.hasFavVideo(aid: aid); - hasFav.value = result["data"]['favoured']; + var result = await VideoHttp.hasFavVideo(aid: IdUtils.bv2av(bvid)); + if (result['status']) { + hasFav.value = result["data"]['favoured']; + } else { + hasFav.value = false; + } } // 一键三连 @@ -141,7 +146,7 @@ class VideoIntroController extends GetxController { child: const Text('点错了')), TextButton( onPressed: () async { - var result = await VideoHttp.oneThree(aid: aid); + var result = await VideoHttp.oneThree(bvid: bvid); if (result['status']) { hasLike.value = result["data"]["like"]; hasCoin.value = result["data"]["coin"]; @@ -162,7 +167,7 @@ class VideoIntroController extends GetxController { // (取消)点赞 Future actionLikeVideo() async { - var result = await VideoHttp.likeVideo(aid: aid, type: !hasLike.value); + var result = await VideoHttp.likeVideo(bvid: bvid, type: !hasLike.value); if (result['status']) { // hasLike.value = result["data"] == 1 ? true : false; if (!hasLike.value) { @@ -216,7 +221,7 @@ class VideoIntroController extends GetxController { TextButton( onPressed: () async { var res = await VideoHttp.coinVideo( - aid: aid, multiply: _tempThemeValue); + bvid: bvid, multiply: _tempThemeValue); print(res); if (res['status']) { SmartDialog.showToast('投币成功'); @@ -244,7 +249,7 @@ class VideoIntroController extends GetxController { } } catch (e) {} var result = await VideoHttp.favVideo( - aid: aid, + aid: IdUtils.bv2av(bvid), addIds: addMediaIdsNew.join(','), delIds: delMediaIdsNew.join(',')); if (result['status']) { @@ -262,7 +267,7 @@ class VideoIntroController extends GetxController { // 分享视频 Future actionShareVideo() async { var result = - await Share.share('${HttpString.baseUrl}/video/$aid').whenComplete(() { + await Share.share('${HttpString.baseUrl}/video/$bvid').whenComplete(() { print("share completion block "); }); return result; @@ -270,7 +275,7 @@ class VideoIntroController extends GetxController { Future queryVideoInFolder() async { var result = await VideoHttp.videoInFolder( - mid: user.get(UserBoxKey.userMid), rid: aid); + mid: user.get(UserBoxKey.userMid), rid: IdUtils.bv2av(bvid)); if (result['status']) { favFolderData.value = result['data']; } diff --git a/lib/pages/video/detail/related/controller.dart b/lib/pages/video/detail/related/controller.dart index 20cf3b55..eb1a14d5 100644 --- a/lib/pages/video/detail/related/controller.dart +++ b/lib/pages/video/detail/related/controller.dart @@ -4,11 +4,11 @@ import 'package:pilipala/http/video.dart'; class ReleatedController extends GetxController { // 视频aid - String aid = Get.parameters['aid']!; + String bvid = Get.parameters['bvid']!; // 推荐视频列表 List relatedVideoList = []; OverlayEntry? popupDialog; - Future queryRelatedVideo() => VideoHttp.relatedVideoList(aid: aid); + Future queryRelatedVideo() => VideoHttp.relatedVideoList(bvid: bvid); } diff --git a/lib/pages/video/detail/reply/controller.dart b/lib/pages/video/detail/reply/controller.dart index efb11147..5047036f 100644 --- a/lib/pages/video/detail/reply/controller.dart +++ b/lib/pages/video/detail/reply/controller.dart @@ -10,10 +10,14 @@ import 'package:pilipala/models/video/reply/data.dart'; import 'package:pilipala/models/video/reply/item.dart'; class VideoReplyController extends GetxController { - VideoReplyController(this.aid, this.rpid, this.level); + VideoReplyController( + this.aid, + this.rpid, + this.level, + ); final ScrollController scrollController = ScrollController(); // 视频aid 请求时使用的oid - String? aid; + int? aid; // 层级 2为楼中楼 String? level; // rpid 请求楼中楼回复 @@ -95,7 +99,7 @@ class VideoReplyController extends GetxController { Future submitReplyAdd() async { var result = await VideoHttp.replyAdd( type: ReplyType.video, - oid: int.parse(aid!), + oid: aid!, root: replyLevel == '0' ? 0 : replyLevel == '1' diff --git a/lib/pages/video/detail/reply/view.dart b/lib/pages/video/detail/reply/view.dart index 5bb4c138..3549a66c 100644 --- a/lib/pages/video/detail/reply/view.dart +++ b/lib/pages/video/detail/reply/view.dart @@ -7,16 +7,17 @@ import 'package:pilipala/common/skeleton/video_reply.dart'; import 'package:pilipala/common/widgets/http_error.dart'; import 'package:pilipala/models/video/reply/item.dart'; import 'package:pilipala/pages/video/detail/replyNew/index.dart'; +import 'package:pilipala/utils/id_utils.dart'; import 'controller.dart'; import 'widgets/reply_item.dart'; class VideoReplyPanel extends StatefulWidget { - int oid; + String? bvid; int rpid; String? level; Key? key; VideoReplyPanel({ - this.oid = 0, + this.bvid, this.rpid = 0, this.level, super.key, @@ -42,17 +43,19 @@ class _VideoReplyPanelState extends State @override void initState() { + int oid = widget.bvid != null ? IdUtils.bv2av(widget.bvid!) : 0; super.initState(); replyLevel = widget.level ?? '1'; if (widget.level != null && widget.level == '2') { _videoReplyController = Get.put( - VideoReplyController( - widget.oid.toString(), widget.rpid.toString(), '2'), + VideoReplyController(oid, widget.rpid.toString(), '2'), tag: widget.rpid.toString()); _videoReplyController.rPid = widget.rpid; } else { - _videoReplyController = Get.put( - VideoReplyController(Get.parameters['aid']!, '', '1'), + int oid = Get.parameters['bvid'] != null + ? IdUtils.bv2av(Get.parameters['bvid']!) + : 0; + _videoReplyController = Get.put(VideoReplyController(oid, '', '1'), tag: Get.arguments['heroTag']); } @@ -213,15 +216,18 @@ class _VideoReplyPanelState extends State builder: (builder) { return VideoReplyNewDialog( replyLevel: '0', - oid: int.parse(Get.parameters['aid']!), + oid: IdUtils.bv2av(Get.parameters['bvid']!), root: 0, parent: 0, ); }, - ).then((value) => { - // 完成评论,数据添加 - _videoReplyController.replyList.add(value['data']) - }); + ).then( + (value) => { + // 完成评论,数据添加 + if (value != null && value['data']) + {_videoReplyController.replyList.add(value['data'])} + }, + ); }, tooltip: '发表评论', child: const Icon(Icons.reply), diff --git a/lib/pages/video/detail/replyReply/controller.dart b/lib/pages/video/detail/replyReply/controller.dart index 83d44cae..26653d41 100644 --- a/lib/pages/video/detail/replyReply/controller.dart +++ b/lib/pages/video/detail/replyReply/controller.dart @@ -8,7 +8,7 @@ class VideoReplyReplyController extends GetxController { VideoReplyReplyController(this.aid, this.rpid); final ScrollController scrollController = ScrollController(); // 视频aid 请求时使用的oid - String? aid; + int? aid; // rpid 请求楼中楼回复 String? rpid; RxList replyList = [ReplyItemModel()].obs; @@ -29,13 +29,14 @@ class VideoReplyReplyController extends GetxController { super.onInit(); currentPage = 0; } + // 上拉加载 Future onLoad() async { queryReplyList(type: 'onLoad'); } Future queryReplyList({type = 'init'}) async { - if(type == 'init'){ + if (type == 'init') { currentPage = 0; } isLoadingMore = true; @@ -87,4 +88,4 @@ class VideoReplyReplyController extends GetxController { currentPage = 0; super.onClose(); } -} \ No newline at end of file +} diff --git a/lib/pages/video/detail/replyReply/view.dart b/lib/pages/video/detail/replyReply/view.dart index 682ab1c8..0db76e96 100644 --- a/lib/pages/video/detail/replyReply/view.dart +++ b/lib/pages/video/detail/replyReply/view.dart @@ -31,8 +31,7 @@ class _VideoReplyReplyPanelState extends State { @override void initState() { _videoReplyReplyController = Get.put( - VideoReplyReplyController( - widget.oid.toString(), widget.rpid.toString()), + VideoReplyReplyController(widget.oid, widget.rpid.toString()), tag: widget.rpid.toString()); super.initState(); diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 52069e3f..85125cab 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -46,15 +46,15 @@ class _VideoDetailPageState extends State _meeduPlayerController = videoDetailController.meeduPlayerController; _playerEventSubs = _meeduPlayerController!.onPlayerStatusChanged.listen( (PlayerStatus status) { - videoDetailController.markHeartBeat(); + // videoDetailController.markHeartBeat(); if (status == PlayerStatus.playing) { Wakelock.enable(); isPlay = false; isShowCover = false; setState(() {}); - videoDetailController.loopHeartBeat(); + // videoDetailController.loopHeartBeat(); } else { - videoDetailController.timer!.cancel(); + // videoDetailController.timer!.cancel(); isPlay = true; setState(() {}); Wakelock.disable();