fix(tvos): update mpvkit audio passthrough

This commit is contained in:
edde746
2026-06-13 10:24:15 +02:00
parent 4f422f1485
commit 3c43874342
11 changed files with 30 additions and 30 deletions
+1 -1
View File
@@ -789,7 +789,7 @@
repositoryURL = "https://github.com/edde746/MPVKit";
requirement = {
kind = revision;
revision = 1fc33029bc0317583866c62811dc0ab2aa2415b6;
revision = 1fe345d46bac91f4e85239ad268430e037040b2b;
};
};
/* End XCRemoteSwiftPackageReference section */
@@ -40,7 +40,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/edde746/MPVKit",
"state" : {
"revision" : "1fc33029bc0317583866c62811dc0ab2aa2415b6"
"revision" : "1fe345d46bac91f4e85239ad268430e037040b2b"
}
},
{
+3 -2
View File
@@ -808,8 +808,9 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
);
}
// Audio passthrough (desktop only - sends bitstream to receiver)
if (PlatformDetector.isDesktopOS()) {
// Audio passthrough (desktop bitstreams to the receiver; Apple TV
// hands compressed AC3/EAC3 to the system for Dolby/Atmos output)
if (PlatformDetector.isDesktopOS() || PlatformDetector.isAppleTV()) {
if (settingsService.read(SettingsService.audioPassthrough)) {
await currentPlayer.setAudioPassthrough(true);
}
+15 -1
View File
@@ -169,6 +169,20 @@ class _UseExternalPlayerPref extends Pref<bool> {
Future<void> writeTo(BaseSharedPreferencesService svc, bool value) => svc.writeBool(key, value);
}
/// Defaults to on for Apple TV, where passthrough is what gets Dolby Digital
/// (Plus) / Atmos to the receiver; opt-in everywhere else.
class _AudioPassthroughPref extends Pref<bool> {
const _AudioPassthroughPref() : super('audio_passthrough');
@override
bool readFrom(BaseSharedPreferencesService svc) {
return svc.prefs.getBool(key) ?? PlatformDetector.isAppleTV();
}
@override
Future<void> writeTo(BaseSharedPreferencesService svc, bool value) => svc.writeBool(key, value);
}
String? _trimEmptyAsNull(String? v) {
final t = v?.trim();
return (t == null || t.isEmpty) ? null : t;
@@ -393,7 +407,7 @@ class SettingsService extends BaseSharedPreferencesService {
defaultValue: VisualEffectsSetting.auto,
);
static const ambientLighting = BoolPref('ambient_lighting');
static const audioPassthrough = BoolPref('audio_passthrough');
static const audioPassthrough = _AudioPassthroughPref();
static const audioNormalization = BoolPref('audio_normalization');
static const liveTvDefaultFavorites = BoolPref('live_tv_default_favorites');
static const matchRefreshRate = BoolPref('match_refresh_rate');
@@ -547,8 +547,8 @@ class _VideoSettingsSheetState extends State<VideoSettingsSheet> {
},
),
// Audio Passthrough (Desktop only)
if (isDesktop)
// Audio Passthrough (desktop and Apple TV)
if (PlatformDetector.isDesktopOS() || PlatformDetector.isAppleTV())
_SettingsToggleItem(
pref: SettingsService.audioPassthrough,
icon: Symbols.surround_sound_rounded,
+1 -1
View File
@@ -883,7 +883,7 @@
repositoryURL = "https://github.com/edde746/MPVKit";
requirement = {
kind = revision;
revision = 1fc33029bc0317583866c62811dc0ab2aa2415b6;
revision = 1fe345d46bac91f4e85239ad268430e037040b2b;
};
};
/* End XCRemoteSwiftPackageReference section */
+1 -1
View File
@@ -1,7 +1,7 @@
name: plezy
description: "A beautiful Plex and Jellyfin client for Flutter"
publish_to: "none"
version: 2.6.0+112
version: 2.6.1+114
environment:
sdk: ">=3.12.0 <4.0.0"
@@ -352,11 +352,10 @@ class MpvPlayerCoreBase: NSObject {
return false
}
#if DEBUG
checkError(mpv_request_log_messages(mpv, "info"))
#else
checkError(mpv_request_log_messages(mpv, "warn"))
#endif
// TEMP: always "v" (tvOS builds in release) so the avfoundation VO's
// osd-perf timing lines show up restore the DEBUG/warn split after the
// subtitle-timing investigation.
checkError(mpv_request_log_messages(mpv, "v"))
var layer = Int64(Int(bitPattern: Unmanaged.passUnretained(renderLayer).toOpaque()))
checkError(mpv_set_option(mpv, "wid", MPV_FORMAT_INT64, &layer))
+1 -1
View File
@@ -933,7 +933,7 @@
repositoryURL = "https://github.com/edde746/MPVKit";
requirement = {
kind = revision;
revision = 1fc33029bc0317583866c62811dc0ab2aa2415b6;
revision = 1fe345d46bac91f4e85239ad268430e037040b2b;
};
};
/* End XCRemoteSwiftPackageReference section */
@@ -1,14 +0,0 @@
{
"originHash" : "c535d3cdb62bd4e11e67f3c9e68290fa7ee9306634c5f56d2b0396eb75ed41ee",
"pins" : [
{
"identity" : "mpvkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/edde746/MPVKit",
"state" : {
"revision" : "1fc33029bc0317583866c62811dc0ab2aa2415b6"
}
}
],
"version" : 3
}
@@ -6,7 +6,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/edde746/MPVKit",
"state" : {
"revision" : "1fc33029bc0317583866c62811dc0ab2aa2415b6"
"revision" : "1fe345d46bac91f4e85239ad268430e037040b2b"
}
}
],