Merge branch 'feature-collections'
This commit is contained in:
@ -73,6 +73,7 @@ class VideoDetailController extends GetxController
|
||||
ReplyItemModel? firstFloor;
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
RxString bgCover = ''.obs;
|
||||
RxString cover = ''.obs;
|
||||
PlPlayerController plPlayerController = PlPlayerController.getInstance();
|
||||
|
||||
late VideoItem firstVideo;
|
||||
@ -120,10 +121,12 @@ class VideoDetailController extends GetxController
|
||||
var args = argMap['videoItem'];
|
||||
if (args.pic != null && args.pic != '') {
|
||||
videoItem['pic'] = args.pic;
|
||||
cover.value = args.pic;
|
||||
}
|
||||
}
|
||||
if (keys.contains('pic')) {
|
||||
videoItem['pic'] = argMap['pic'];
|
||||
cover.value = argMap['pic'];
|
||||
}
|
||||
}
|
||||
tabCtr = TabController(length: 2, vsync: this);
|
||||
|
||||
@ -432,7 +432,7 @@ class VideoIntroController extends GetxController {
|
||||
}
|
||||
|
||||
// 修改分P或番剧分集
|
||||
Future changeSeasonOrbangu(bvid, cid, aid) async {
|
||||
Future changeSeasonOrbangu(bvid, cid, aid, cover) async {
|
||||
// 重新获取视频资源
|
||||
final VideoDetailController videoDetailCtr =
|
||||
Get.find<VideoDetailController>(tag: heroTag);
|
||||
@ -447,6 +447,7 @@ class VideoIntroController extends GetxController {
|
||||
videoDetailCtr.oid.value = aid ?? IdUtils.bv2av(bvid);
|
||||
videoDetailCtr.cid.value = cid;
|
||||
videoDetailCtr.danmakuCid.value = cid;
|
||||
videoDetailCtr.cover.value = cover;
|
||||
videoDetailCtr.queryVideoUrl();
|
||||
// 重新请求评论
|
||||
try {
|
||||
@ -494,6 +495,7 @@ class VideoIntroController extends GetxController {
|
||||
void nextPlay() {
|
||||
final List episodes = [];
|
||||
bool isPages = false;
|
||||
late String cover;
|
||||
if (videoDetail.value.ugcSeason != null) {
|
||||
final UgcSeason ugcSeason = videoDetail.value.ugcSeason!;
|
||||
final List<SectionItem> sections = ugcSeason.sections!;
|
||||
@ -510,6 +512,7 @@ class VideoIntroController extends GetxController {
|
||||
final int currentIndex =
|
||||
episodes.indexWhere((e) => e.cid == lastPlayCid.value);
|
||||
int nextIndex = currentIndex + 1;
|
||||
cover = episodes[nextIndex].cover;
|
||||
final VideoDetailController videoDetailCtr =
|
||||
Get.find<VideoDetailController>(tag: heroTag);
|
||||
final PlayRepeat platRepeat = videoDetailCtr.plPlayerController.playRepeat;
|
||||
@ -526,7 +529,7 @@ class VideoIntroController extends GetxController {
|
||||
final int cid = episodes[nextIndex].cid!;
|
||||
final String rBvid = isPages ? bvid : episodes[nextIndex].bvid;
|
||||
final int rAid = isPages ? IdUtils.bv2av(bvid) : episodes[nextIndex].aid!;
|
||||
changeSeasonOrbangu(rBvid, cid, rAid);
|
||||
changeSeasonOrbangu(rBvid, cid, rAid, cover);
|
||||
}
|
||||
|
||||
// 设置关注分组
|
||||
@ -591,10 +594,11 @@ class VideoIntroController extends GetxController {
|
||||
isFullScreen: true,
|
||||
changeFucCall: (item, index) {
|
||||
if (dataType == VideoEpidoesType.videoEpisode) {
|
||||
changeSeasonOrbangu(IdUtils.av2bv(item.aid), item.cid, item.aid);
|
||||
changeSeasonOrbangu(
|
||||
IdUtils.av2bv(item.aid), item.cid, item.aid, item.cover);
|
||||
}
|
||||
if (dataType == VideoEpidoesType.videoPart) {
|
||||
changeSeasonOrbangu(bvid, item.cid, null);
|
||||
changeSeasonOrbangu(bvid, item.cid, null, item.cover);
|
||||
}
|
||||
SmartDialog.dismiss();
|
||||
},
|
||||
|
||||
@ -383,11 +383,12 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
? videoIntroController.lastPlayCid.value
|
||||
: widget.videoDetail!.pages!.first.cid,
|
||||
sheetHeight: videoDetailCtr.sheetHeight.value,
|
||||
changeFuc: (bvid, cid, aid) =>
|
||||
changeFuc: (bvid, cid, aid, cover) =>
|
||||
videoIntroController.changeSeasonOrbangu(
|
||||
bvid,
|
||||
cid,
|
||||
aid,
|
||||
cover,
|
||||
),
|
||||
videoIntroCtr: videoIntroController,
|
||||
),
|
||||
@ -401,10 +402,12 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
pages: widget.videoDetail!.pages!,
|
||||
cid: videoIntroController.lastPlayCid.value,
|
||||
sheetHeight: videoDetailCtr.sheetHeight.value,
|
||||
changeFuc: (cid) => videoIntroController.changeSeasonOrbangu(
|
||||
changeFuc: (cid, cover) =>
|
||||
videoIntroController.changeSeasonOrbangu(
|
||||
videoIntroController.bvid,
|
||||
cid,
|
||||
null,
|
||||
cover,
|
||||
),
|
||||
videoIntroCtr: videoIntroController,
|
||||
),
|
||||
|
||||
@ -58,7 +58,7 @@ class _PagesPanelState extends State<PagesPanel> {
|
||||
}
|
||||
|
||||
void changeFucCall(item, i) async {
|
||||
widget.changeFuc?.call(item.cid);
|
||||
widget.changeFuc?.call(item.cid, item.cover);
|
||||
currentIndex.value = i;
|
||||
_bottomSheetController?.close();
|
||||
scrollToIndex();
|
||||
@ -129,7 +129,7 @@ class _PagesPanelState extends State<PagesPanel> {
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 35,
|
||||
height: 55,
|
||||
margin: const EdgeInsets.only(bottom: 8),
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
@ -163,7 +163,7 @@ class _PagesPanelState extends State<PagesPanel> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.pages[i].pagePart!,
|
||||
maxLines: 1,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: isCurrentIndex
|
||||
|
||||
@ -67,6 +67,7 @@ class _SeasonPanelState extends State<SeasonPanel> {
|
||||
IdUtils.av2bv(item.aid),
|
||||
item.cid,
|
||||
item.aid,
|
||||
item.cover,
|
||||
);
|
||||
currentIndex.value = i;
|
||||
_bottomSheetController?.close();
|
||||
|
||||
@ -458,11 +458,17 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
onTap: () {
|
||||
handlePlay();
|
||||
},
|
||||
child: NetworkImgLayer(
|
||||
type: 'emote',
|
||||
src: vdCtr.videoItem['pic'],
|
||||
width: Get.width,
|
||||
height: videoHeight.value,
|
||||
child: Obx(
|
||||
() => AnimatedOpacity(
|
||||
duration: const Duration(milliseconds: 100), // 渐变动画的持续时间
|
||||
opacity: 1, // 设置不透明度
|
||||
child: NetworkImgLayer(
|
||||
type: 'emote',
|
||||
src: vdCtr.cover.value,
|
||||
width: Get.width,
|
||||
height: videoHeight.value,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
|
||||
Reference in New Issue
Block a user