Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "none",
"tabWidth": 4,
"semi": false,
"singleQuote": false
}
20 changes: 18 additions & 2 deletions lib/i18n/strings.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 4
/// Strings: 384 (96 per locale)
/// Strings: 392 (98 per locale)
///
/// Built on 2025-12-01 at 13:41 UTC
/// Built on 2026-05-02 at 01:31 UTC

// coverage:ignore-file
// ignore_for_file: type=lint
Expand Down Expand Up @@ -331,6 +331,8 @@ class _StringsMyPlayerSettingsEn {
String get autoPlay => 'Auto Play';
String get autoJump => 'Auto Jump';
String get autoJumpSubtitle => 'Jump to the position where you stopped last time';
String get brightnessVolumeGesture => 'Brightness & Volume Gesture';
String get brightnessVolumeGestureSubtitle => 'Swipe up and down on the playing screen to adjust brightness and volume';
}

// Path: my.danmakuSettings
Expand Down Expand Up @@ -613,6 +615,8 @@ class _StringsMyPlayerSettingsZhCn implements _StringsMyPlayerSettingsEn {
@override String get autoPlay => '自动播放';
@override String get autoJump => '自动跳转';
@override String get autoJumpSubtitle => '跳转到上次播放位置';
@override String get brightnessVolumeGesture => '亮度音量手势';
@override String get brightnessVolumeGestureSubtitle => '在播放界面上下滑动调节亮度和音量';
}

// Path: my.danmakuSettings
Expand Down Expand Up @@ -895,6 +899,8 @@ class _StringsMyPlayerSettingsZhHk implements _StringsMyPlayerSettingsEn {
@override String get autoPlay => '自動播放';
@override String get autoJump => '自動跳轉';
@override String get autoJumpSubtitle => '跳轉到上次播放位置';
@override String get brightnessVolumeGesture => '亮度音量手勢';
@override String get brightnessVolumeGestureSubtitle => '在播放界面上下滑動調節亮度和音量';
}

// Path: my.danmakuSettings
Expand Down Expand Up @@ -1177,6 +1183,8 @@ class _StringsMyPlayerSettingsZhTw implements _StringsMyPlayerSettingsEn {
@override String get autoPlay => '自動播放';
@override String get autoJump => '自動跳轉';
@override String get autoJumpSubtitle => '跳轉到上次播放位置';
@override String get brightnessVolumeGesture => '亮度音量手勢';
@override String get brightnessVolumeGestureSubtitle => '在播放界面上下滑動調節亮度和音量';
}

// Path: my.danmakuSettings
Expand Down Expand Up @@ -1317,6 +1325,8 @@ extension on Translations {
case 'my.playerSettings.autoPlay': return 'Auto Play';
case 'my.playerSettings.autoJump': return 'Auto Jump';
case 'my.playerSettings.autoJumpSubtitle': return 'Jump to the position where you stopped last time';
case 'my.playerSettings.brightnessVolumeGesture': return 'Brightness & Volume Gesture';
case 'my.playerSettings.brightnessVolumeGestureSubtitle': return 'Swipe up and down on the playing screen to adjust brightness and volume';
case 'my.danmakuSettings.title': return 'Danmaku Settings';
case 'my.danmakuSettings.defaultEnable': return 'Default Enable';
case 'my.danmakuSettings.defaultEnableSubtitle': return 'Whether to enable danmaku by default';
Expand Down Expand Up @@ -1421,6 +1431,8 @@ extension on _StringsZhCn {
case 'my.playerSettings.autoPlay': return '自动播放';
case 'my.playerSettings.autoJump': return '自动跳转';
case 'my.playerSettings.autoJumpSubtitle': return '跳转到上次播放位置';
case 'my.playerSettings.brightnessVolumeGesture': return '亮度音量手势';
case 'my.playerSettings.brightnessVolumeGestureSubtitle': return '在播放界面上下滑动调节亮度和音量';
case 'my.danmakuSettings.title': return '弹幕设置';
case 'my.danmakuSettings.defaultEnable': return '默认开启';
case 'my.danmakuSettings.defaultEnableSubtitle': return '默认是否随视频播放弹幕';
Expand Down Expand Up @@ -1525,6 +1537,8 @@ extension on _StringsZhHk {
case 'my.playerSettings.autoPlay': return '自動播放';
case 'my.playerSettings.autoJump': return '自動跳轉';
case 'my.playerSettings.autoJumpSubtitle': return '跳轉到上次播放位置';
case 'my.playerSettings.brightnessVolumeGesture': return '亮度音量手勢';
case 'my.playerSettings.brightnessVolumeGestureSubtitle': return '在播放界面上下滑動調節亮度和音量';
case 'my.danmakuSettings.title': return '彈幕設置';
case 'my.danmakuSettings.defaultEnable': return '默認開啟';
case 'my.danmakuSettings.defaultEnableSubtitle': return '默認是否隨視頻播放彈幕';
Expand Down Expand Up @@ -1629,6 +1643,8 @@ extension on _StringsZhTw {
case 'my.playerSettings.autoPlay': return '自動播放';
case 'my.playerSettings.autoJump': return '自動跳轉';
case 'my.playerSettings.autoJumpSubtitle': return '跳轉到上次播放位置';
case 'my.playerSettings.brightnessVolumeGesture': return '亮度音量手勢';
case 'my.playerSettings.brightnessVolumeGestureSubtitle': return '在播放界面上下滑動調節亮度和音量';
case 'my.danmakuSettings.title': return '彈幕設置';
case 'my.danmakuSettings.defaultEnable': return '默認開啟';
case 'my.danmakuSettings.defaultEnableSubtitle': return '默認是否隨視頻播放彈幕';
Expand Down
6 changes: 4 additions & 2 deletions lib/i18n/strings.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@
"hardwareAcceleration": "Hardware Acceleration",
"autoPlay": "Auto Play",
"autoJump": "Auto Jump",
"autoJumpSubtitle": "Jump to the position where you stopped last time"
"autoJumpSubtitle": "Jump to the position where you stopped last time",
"brightnessVolumeGesture": "Brightness & Volume Gesture",
"brightnessVolumeGestureSubtitle": "Swipe up and down on the playing screen to adjust brightness and volume"
},
"danmakuSettings": {
"title": "Danmaku Settings",
Expand Down Expand Up @@ -127,4 +129,4 @@
"currentVersion": "Current Version"
}
}
}
}
6 changes: 4 additions & 2 deletions lib/i18n/strings_zh-CN.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@
"hardwareAcceleration": "硬件解码",
"autoPlay": "自动播放",
"autoJump": "自动跳转",
"autoJumpSubtitle": "跳转到上次播放位置"
"autoJumpSubtitle": "跳转到上次播放位置",
"brightnessVolumeGesture": "亮度音量手势",
"brightnessVolumeGestureSubtitle": "在播放界面上下滑动调节亮度和音量"
},
"danmakuSettings": {
"title": "弹幕设置",
Expand Down Expand Up @@ -127,4 +129,4 @@
"currentVersion": "当前版本"
}
}
}
}
6 changes: 4 additions & 2 deletions lib/i18n/strings_zh-HK.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@
"hardwareAcceleration": "硬件解碼",
"autoPlay": "自動播放",
"autoJump": "自動跳轉",
"autoJumpSubtitle": "跳轉到上次播放位置"
"autoJumpSubtitle": "跳轉到上次播放位置",
"brightnessVolumeGesture": "亮度音量手勢",
"brightnessVolumeGestureSubtitle": "在播放界面上下滑動調節亮度和音量"
},
"danmakuSettings": {
"title": "彈幕設置",
Expand Down Expand Up @@ -127,4 +129,4 @@
"currentVersion": "當前版本"
}
}
}
}
6 changes: 4 additions & 2 deletions lib/i18n/strings_zh-TW.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@
"hardwareAcceleration": "硬件解碼",
"autoPlay": "自動播放",
"autoJump": "自動跳轉",
"autoJumpSubtitle": "跳轉到上次播放位置"
"autoJumpSubtitle": "跳轉到上次播放位置",
"brightnessVolumeGesture": "亮度音量手勢",
"brightnessVolumeGestureSubtitle": "在播放界面上下滑動調節亮度和音量"
},
"danmakuSettings": {
"title": "彈幕設置",
Expand Down Expand Up @@ -127,4 +129,4 @@
"currentVersion": "當前版本"
}
}
}
}
8 changes: 8 additions & 0 deletions lib/pages/settings/player_settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ class _PlayerSettingsPageState extends State<PlayerSettingsPage> {
defaultVal: false,
),
),
InkWell(
child: SetSwitchItem(
title: i18n.my.playerSettings.brightnessVolumeGesture,
subTitle: i18n.my.playerSettings.brightnessVolumeGestureSubtitle,
setKey: SettingBoxKey.brightnessVolumeGesture,
defaultVal: true,
),
),
],
),
);
Expand Down
6 changes: 6 additions & 0 deletions lib/pages/video/video_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,12 @@ class _VideoPageState extends State<VideoPage>
if (!videoController.androidFullscreen) {
return;
}
// 亮度/音量手势开关
if (!setting.get(
SettingBoxKey.brightnessVolumeGesture,
defaultValue: true)) {
return;
}
if (tapPosition < sectionWidth) {
// 左边区域
setState(() {
Expand Down
3 changes: 2 additions & 1 deletion lib/utils/storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ class SettingBoxKey {
/// deprecated
isWideScreen = 'isWideScreen',
enableSystemProxy = 'enableSystemProxy',
useSystemFont = 'useSystemFont';
useSystemFont = 'useSystemFont',
brightnessVolumeGesture = 'brightnessVolumeGesture';
}