fix: 字幕req导致headerControl初始化异常
This commit is contained in:
@ -152,17 +152,13 @@ class VideoDetailController extends GetxController
|
||||
defaultAudioQa = setting.get(SettingBoxKey.defaultAudioQa,
|
||||
defaultValue: AudioQuality.hiRes.code);
|
||||
oid.value = IdUtils.bv2av(Get.parameters['bvid']!);
|
||||
getSubtitle().then(
|
||||
(subtitles) {
|
||||
headerControl = HeaderControl(
|
||||
controller: plPlayerController,
|
||||
videoDetailCtr: this,
|
||||
floating: floating,
|
||||
bvid: bvid,
|
||||
videoType: videoType,
|
||||
showSubtitleBtn: subtitles.isNotEmpty,
|
||||
);
|
||||
},
|
||||
getSubtitle();
|
||||
headerControl = HeaderControl(
|
||||
controller: plPlayerController,
|
||||
videoDetailCtr: this,
|
||||
floating: floating,
|
||||
bvid: bvid,
|
||||
videoType: videoType,
|
||||
);
|
||||
}
|
||||
|
||||
@ -439,9 +435,6 @@ class VideoDetailController extends GetxController
|
||||
subtitles = result['data'].subtitles;
|
||||
getDanmaku(subtitles);
|
||||
}
|
||||
return subtitles;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1329,7 +1329,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
],
|
||||
|
||||
/// 字幕
|
||||
if (widget.showSubtitleBtn!)
|
||||
if (widget.showSubtitleBtn ?? true)
|
||||
ComBtn(
|
||||
icon: const Icon(
|
||||
Icons.closed_caption_off,
|
||||
|
Reference in New Issue
Block a user