mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: update bufferSize
related #93 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -934,7 +934,7 @@ List<SettingsModel> get videoSettings => [
|
|||||||
settingsType: SettingsType.sw1tch,
|
settingsType: SettingsType.sw1tch,
|
||||||
title: '扩大缓冲区',
|
title: '扩大缓冲区',
|
||||||
leading: Icon(Icons.storage_outlined),
|
leading: Icon(Icons.storage_outlined),
|
||||||
subtitle: '默认缓冲区为视频3MB/直播16MB,开启后为32MB/64MB,加载时间变长',
|
subtitle: '默认缓冲区为视频4MB/直播16MB,开启后为32MB/64MB,加载时间变长',
|
||||||
setKey: SettingBoxKey.expandBuffer,
|
setKey: SettingBoxKey.expandBuffer,
|
||||||
defaultVal: false,
|
defaultVal: false,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -553,11 +553,11 @@ class PlPlayerController {
|
|||||||
int bufferSize =
|
int bufferSize =
|
||||||
setting.get(SettingBoxKey.expandBuffer, defaultValue: false)
|
setting.get(SettingBoxKey.expandBuffer, defaultValue: false)
|
||||||
? (videoType.value == 'live' ? 64 * 1024 * 1024 : 32 * 1024 * 1024)
|
? (videoType.value == 'live' ? 64 * 1024 * 1024 : 32 * 1024 * 1024)
|
||||||
: (videoType.value == 'live' ? 16 * 1024 * 1024 : 3 * 1024 * 1024);
|
: (videoType.value == 'live' ? 16 * 1024 * 1024 : 4 * 1024 * 1024);
|
||||||
Player player = _videoPlayerController ??
|
Player player = _videoPlayerController ??
|
||||||
Player(
|
Player(
|
||||||
configuration: PlayerConfiguration(
|
configuration: PlayerConfiguration(
|
||||||
// 默认缓冲 3M 大小
|
// 默认缓冲 4M 大小
|
||||||
bufferSize: bufferSize,
|
bufferSize: bufferSize,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user