mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-01 15:49:49 +08:00
@@ -17,7 +17,7 @@ import 'package:PiliPlus/models/common/video/video_type.dart';
|
||||
import 'package:PiliPlus/models/user/danmaku_rule.dart';
|
||||
import 'package:PiliPlus/models/video/play/url.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_shot/data.dart';
|
||||
import 'package:PiliPlus/pages/danmaku/dnamaku_model.dart';
|
||||
import 'package:PiliPlus/pages/danmaku/danmaku_model.dart';
|
||||
import 'package:PiliPlus/pages/mine/controller.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/models/bottom_progress_behavior.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/models/data_source.dart';
|
||||
@@ -357,7 +357,7 @@ class PlPlayerController {
|
||||
late double danmakuLineHeight = Pref.danmakuLineHeight;
|
||||
late int subtitlePaddingH = Pref.subtitlePaddingH;
|
||||
late int subtitlePaddingB = Pref.subtitlePaddingB;
|
||||
late double subtitleBgOpaticy = Pref.subtitleBgOpaticy;
|
||||
late double subtitleBgOpacity = Pref.subtitleBgOpacity;
|
||||
final bool showVipDanmaku = Pref.showVipDanmaku; // loop unswitching
|
||||
late double subtitleStrokeWidth = Pref.subtitleStrokeWidth;
|
||||
late int subtitleFontWeight = Pref.subtitleFontWeight;
|
||||
@@ -437,9 +437,9 @@ class PlPlayerController {
|
||||
wordSpacing: 0.1,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.values[subtitleFontWeight],
|
||||
backgroundColor: subtitleBgOpaticy == 0
|
||||
backgroundColor: subtitleBgOpacity == 0
|
||||
? null
|
||||
: Colors.black.withValues(alpha: subtitleBgOpaticy),
|
||||
: Colors.black.withValues(alpha: subtitleBgOpacity),
|
||||
);
|
||||
|
||||
late final Rx<SubtitleViewConfiguration> subtitleConfig = _getSubConfig.obs;
|
||||
@@ -448,7 +448,7 @@ class PlPlayerController {
|
||||
final subTitleStyle = this.subTitleStyle;
|
||||
return SubtitleViewConfiguration(
|
||||
style: subTitleStyle,
|
||||
strokeStyle: subtitleBgOpaticy == 0
|
||||
strokeStyle: subtitleBgOpacity == 0
|
||||
? subTitleStyle.copyWith(
|
||||
color: null,
|
||||
background: null,
|
||||
@@ -1697,7 +1697,7 @@ class PlPlayerController {
|
||||
SettingBoxKey.subtitleFontScaleFS: subtitleFontScaleFS,
|
||||
SettingBoxKey.subtitlePaddingH: subtitlePaddingH,
|
||||
SettingBoxKey.subtitlePaddingB: subtitlePaddingB,
|
||||
SettingBoxKey.subtitleBgOpaticy: subtitleBgOpaticy,
|
||||
SettingBoxKey.subtitleBgOpacity: subtitleBgOpacity,
|
||||
SettingBoxKey.subtitleStrokeWidth: subtitleStrokeWidth,
|
||||
SettingBoxKey.subtitleFontWeight: subtitleFontWeight,
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ import 'package:PiliPlus/models_new/video/video_detail/section.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_detail/ugc_season.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_shot/data.dart';
|
||||
import 'package:PiliPlus/pages/common/common_intro_controller.dart';
|
||||
import 'package:PiliPlus/pages/danmaku/dnamaku_model.dart';
|
||||
import 'package:PiliPlus/pages/danmaku/danmaku_model.dart';
|
||||
import 'package:PiliPlus/pages/live_room/widgets/bottom_control.dart'
|
||||
as live_bottom;
|
||||
import 'package:PiliPlus/pages/video/controller.dart';
|
||||
@@ -419,7 +419,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
width: widgetWidth,
|
||||
height: 30,
|
||||
tooltip: '高能进度条',
|
||||
icon: videoDetailController.showDmTreandChart.value
|
||||
icon: videoDetailController.showDmTrendChart.value
|
||||
? const Icon(
|
||||
Icons.show_chart,
|
||||
size: 22,
|
||||
@@ -441,8 +441,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
),
|
||||
],
|
||||
),
|
||||
onTap: () => videoDetailController.showDmTreandChart.value =
|
||||
!videoDetailController.showDmTreandChart.value,
|
||||
onTap: () => videoDetailController.showDmTrendChart.value =
|
||||
!videoDetailController.showDmTrendChart.value,
|
||||
);
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
@@ -765,14 +765,14 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
}
|
||||
final List<FormatItem> videoFormat = videoInfo.supportFormats!;
|
||||
final int totalQaSam = videoFormat.length;
|
||||
int userfulQaSam = 0;
|
||||
int usefulQaSam = 0;
|
||||
final List<VideoItem> video = videoInfo.dash!.video!;
|
||||
final Set<int> idSet = {};
|
||||
for (final VideoItem item in video) {
|
||||
final int id = item.id!;
|
||||
if (!idSet.contains(id)) {
|
||||
idSet.add(id);
|
||||
userfulQaSam++;
|
||||
usefulQaSam++;
|
||||
}
|
||||
}
|
||||
return PopupMenuButton<int>(
|
||||
@@ -785,7 +785,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
totalQaSam,
|
||||
(index) {
|
||||
final item = videoFormat[index];
|
||||
final enabled = index >= totalQaSam - userfulQaSam;
|
||||
final enabled = index >= totalQaSam - usefulQaSam;
|
||||
return PopupMenuItem<int>(
|
||||
enabled: enabled,
|
||||
height: 35,
|
||||
@@ -1835,7 +1835,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
),
|
||||
],
|
||||
if (plPlayerController.showDmChart &&
|
||||
videoDetailController.showDmTreandChart.value)
|
||||
videoDetailController.showDmTrendChart.value)
|
||||
if (videoDetailController.dmTrend.value?.dataOrNull
|
||||
case final list?)
|
||||
buildDmChart(primary, list, videoDetailController),
|
||||
|
||||
@@ -148,7 +148,7 @@ class BottomControl extends StatelessWidget {
|
||||
maxWidth - 40,
|
||||
),
|
||||
],
|
||||
if (videoDetailController.showDmTreandChart.value)
|
||||
if (videoDetailController.showDmTrendChart.value)
|
||||
if (videoDetailController.dmTrend.value?.dataOrNull
|
||||
case final list?)
|
||||
buildDmChart(primary, list, videoDetailController, 4.5),
|
||||
|
||||
Reference in New Issue
Block a user