mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-18 08:20:12 +08:00
feat: custom buffer size (#2370)
* feat: custom buffer size * cache buffer params --------- Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
7
lib/utils/filtering_text.dart
Normal file
7
lib/utils/filtering_text.dart
Normal file
@@ -0,0 +1,7 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
abstract final class FilteringText {
|
||||
static final decimal = [
|
||||
FilteringTextInputFormatter.allow(RegExp(r'[\d\.]+')),
|
||||
];
|
||||
}
|
||||
@@ -9,6 +9,8 @@ abstract final class SettingBoxKey {
|
||||
secondDecode = 'secondDecode',
|
||||
defaultPicQa = 'defaultPicQa',
|
||||
audioOutput = 'audioOutput',
|
||||
bufferSize = 'bufferSize',
|
||||
bufferSec = 'bufferSec',
|
||||
hardwareDecoding = 'hardwareDecoding',
|
||||
videoSync = 'videoSync',
|
||||
enableOnlineTotal = 'enableOnlineTotal',
|
||||
|
||||
@@ -429,6 +429,12 @@ abstract final class Pref {
|
||||
defaultValue: PlatformUtils.isMobile ? 5 : 6,
|
||||
);
|
||||
|
||||
static double get bufferSize =>
|
||||
_setting.get(SettingBoxKey.bufferSize, defaultValue: 4.0);
|
||||
|
||||
static double get bufferSec =>
|
||||
_setting.get(SettingBoxKey.bufferSec, defaultValue: 16.0);
|
||||
|
||||
static String get audioOutput => _setting.get(
|
||||
SettingBoxKey.audioOutput,
|
||||
defaultValue: AudioOutput.defaultValue,
|
||||
|
||||
Reference in New Issue
Block a user