添加 仅全屏时隐藏下方进度条功能

This commit is contained in:
orz12
2024-01-02 08:19:39 +08:00
parent 061d6e6091
commit 9ae0e9284b
2 changed files with 7 additions and 2 deletions

View File

@ -3,14 +3,15 @@ enum BtmProgresBehavior {
alwaysShow, alwaysShow,
alwaysHide, alwaysHide,
onlyShowFullScreen, onlyShowFullScreen,
onlyHideFullScreen,
} }
extension BtmProgresBehaviorDesc on BtmProgresBehavior { extension BtmProgresBehaviorDesc on BtmProgresBehavior {
String get description => ['始终展示', '始终隐藏', '仅全屏时展示'][index]; String get description => ['始终展示', '始终隐藏', '仅全屏时展示', '仅全屏时隐藏'][index];
} }
extension BtmProgresBehaviorCode on BtmProgresBehavior { extension BtmProgresBehaviorCode on BtmProgresBehavior {
static final List<int> _codeList = [0, 1, 2]; static final List<int> _codeList = [0, 1, 2, 3];
int get code => _codeList[index]; int get code => _codeList[index];
static BtmProgresBehavior? fromCode(int code) { static BtmProgresBehavior? fromCode(int code) {

View File

@ -610,6 +610,10 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
BtmProgresBehavior.onlyShowFullScreen.code && BtmProgresBehavior.onlyShowFullScreen.code &&
!_.isFullScreen.value) { !_.isFullScreen.value) {
return Container(); return Container();
} else if (defaultBtmProgressBehavior ==
BtmProgresBehavior.onlyHideFullScreen.code &&
_.isFullScreen.value) {
return Container();
} }
if (_.videoType.value == 'live') { if (_.videoType.value == 'live') {