opt: edl file (#2455)

This commit is contained in:
My-Responsitories
2026-07-21 09:02:09 +00:00
committed by GitHub
parent 3a5636ecee
commit dae8df840a
3 changed files with 63 additions and 34 deletions

View File

@@ -572,7 +572,17 @@ class HeaderControlState extends State<HeaderControl>
onTap: () {
plPlayerController.onlyPlayAudio.value =
!onlyPlayAudio;
widget.videoDetailCtr.playerInit();
final player =
plPlayerController.videoPlayerController!;
if (onlyPlayAudio &&
player.state.tracks.video.length <= 2) {
videoDetailCtr.playerInit();
} else {
player.setProperty(
'file-local-options/vid',
onlyPlayAudio ? 'auto' : 'no',
);
}
},
text: " 听视频 ",
selectStatus: onlyPlayAudio,