mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
refa: danmaku & feat: scroll fixed velocity (#1791)
This commit is contained in:
committed by
GitHub
parent
0a40d11133
commit
49b7ea14c3
@@ -321,7 +321,7 @@ class PlPlayerController {
|
||||
}
|
||||
}
|
||||
|
||||
/// 弹幕权重
|
||||
// 弹幕相关配置
|
||||
late final enableTapDm = PlatformUtils.isMobile && Pref.enableTapDm;
|
||||
late int danmakuWeight = Pref.danmakuWeight;
|
||||
late RuleFilter filters = Pref.danmakuFilterRule;
|
||||
@@ -334,26 +334,16 @@ class PlPlayerController {
|
||||
ascii.encode(Accounts.main.mid.toString()),
|
||||
0,
|
||||
).toRadixString(16);
|
||||
// 弹幕相关配置
|
||||
late Set<int> blockTypes = Pref.danmakuBlockType;
|
||||
late bool blockColorful = blockTypes.contains(6);
|
||||
late double showArea = Pref.danmakuShowArea;
|
||||
late RxDouble danmakuOpacity = Pref.danmakuOpacity.obs;
|
||||
late double danmakuFontScale = Pref.danmakuFontScale;
|
||||
late double danmakuFontScaleFS = Pref.danmakuFontScaleFS;
|
||||
late double danmakuStrokeWidth = Pref.strokeWidth;
|
||||
late int danmakuFontWeight = Pref.fontWeight;
|
||||
late bool massiveMode = Pref.danmakuMassiveMode;
|
||||
late double danmakuDuration = Pref.danmakuDuration;
|
||||
late double danmakuStaticDuration = Pref.danmakuStaticDuration;
|
||||
late final RxDouble danmakuOpacity = Pref.danmakuOpacity.obs;
|
||||
|
||||
late List<double> speedList = Pref.speedList;
|
||||
late bool enableAutoLongPressSpeed = Pref.enableAutoLongPressSpeed;
|
||||
late final showControlDuration = Pref.enableLongShowControl
|
||||
? const Duration(seconds: 30)
|
||||
: const Duration(seconds: 3);
|
||||
// 字幕
|
||||
late double subtitleFontScale = Pref.subtitleFontScale;
|
||||
late double subtitleFontScaleFS = Pref.subtitleFontScaleFS;
|
||||
late double danmakuLineHeight = Pref.danmakuLineHeight;
|
||||
late int subtitlePaddingH = Pref.subtitlePaddingH;
|
||||
late int subtitlePaddingB = Pref.subtitlePaddingB;
|
||||
late double subtitleBgOpacity = Pref.subtitleBgOpacity;
|
||||
@@ -1676,22 +1666,6 @@ class PlPlayerController {
|
||||
video.put(VideoBoxKey.playRepeat, type.index);
|
||||
}
|
||||
|
||||
void putDanmakuSettings() {
|
||||
setting.putAll({
|
||||
SettingBoxKey.danmakuWeight: danmakuWeight,
|
||||
SettingBoxKey.danmakuBlockType: blockTypes.toList(),
|
||||
SettingBoxKey.danmakuShowArea: showArea,
|
||||
SettingBoxKey.danmakuOpacity: danmakuOpacity.value,
|
||||
SettingBoxKey.danmakuFontScale: danmakuFontScale,
|
||||
SettingBoxKey.danmakuFontScaleFS: danmakuFontScaleFS,
|
||||
SettingBoxKey.danmakuDuration: danmakuDuration,
|
||||
SettingBoxKey.danmakuStaticDuration: danmakuStaticDuration,
|
||||
SettingBoxKey.strokeWidth: danmakuStrokeWidth,
|
||||
SettingBoxKey.fontWeight: danmakuFontWeight,
|
||||
SettingBoxKey.danmakuLineHeight: danmakuLineHeight,
|
||||
});
|
||||
}
|
||||
|
||||
void putSubtitleSettings() {
|
||||
setting.putAll({
|
||||
SettingBoxKey.subtitleFontScale: subtitleFontScale,
|
||||
|
||||
Reference in New Issue
Block a user