refa: report error (#1747)

* refa: report error

* remove some reports [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2025-11-17 17:20:29 +08:00
committed by GitHub
parent a797467606
commit 377e430d74
12 changed files with 159 additions and 129 deletions

View File

@@ -830,6 +830,7 @@ class PlPlayerController {
bufferSize: Pref.expandBuffer
? (isLive ? 64 * 1024 * 1024 : 32 * 1024 * 1024)
: (isLive ? 16 * 1024 * 1024 : 4 * 1024 * 1024),
logLevel: kDebugMode ? MPVLogLevel.warn : MPVLogLevel.error,
),
);
final pp = player.platform!;
@@ -888,8 +889,7 @@ class PlPlayerController {
final Map<String, String>? filters;
if (Platform.isAndroid) {
String audioNormalization = '';
audioNormalization = AudioNormalization.getParamFromConfig(
String audioNormalization = AudioNormalization.getParamFromConfig(
Pref.audioNormalization,
);
if (volume != null && volume.isNotEmpty) {
@@ -1109,12 +1109,13 @@ class PlPlayerController {
}),
if (kDebugMode)
videoPlayerController!.stream.log.listen(((PlayerLog log) {
debugPrint(log.toString());
if (log.level == 'error' || log.level == 'fatal') {
Utils.reportError(log.text, null, log.prefix);
} else {
debugPrint(log.toString());
}
})),
videoPlayerController!.stream.error.listen((String event) {
if (kDebugMode) {
debugPrint('MPV Exception: $event');
}
if (isFileSource && event.startsWith("Failed to open file")) {
return;
}