fix: Disable media tunneling by default with the option to enable it (#515)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-10-04 13:29:55 +02:00 committed by GitHub
parent 3ce0ed6dbc
commit 1942738fe4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 256 additions and 199 deletions

View file

@ -45,11 +45,14 @@ enum SegmentSkip {
class PlayerSettings {
PlayerSettings({
required this.enableTunneling,
required this.skipTypes,
required this.skipForward,
required this.skipBackward,
});
bool enableTunneling;
Map<SegmentType, SegmentSkip> skipTypes;
int skipForward;
@ -58,6 +61,7 @@ class PlayerSettings {
List<Object?> _toList() {
return <Object?>[
enableTunneling,
skipTypes,
skipForward,
skipBackward,
@ -70,9 +74,10 @@ class PlayerSettings {
static PlayerSettings decode(Object result) {
result as List<Object?>;
return PlayerSettings(
skipTypes: (result[0] as Map<Object?, Object?>?)!.cast<SegmentType, SegmentSkip>(),
skipForward: result[1]! as int,
skipBackward: result[2]! as int,
enableTunneling: result[0]! as bool,
skipTypes: (result[1] as Map<Object?, Object?>?)!.cast<SegmentType, SegmentSkip>(),
skipForward: result[2]! as int,
skipBackward: result[3]! as int,
);
}