feat: Android TV support (#503)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-09-28 21:07:49 +02:00 committed by GitHub
parent 7ab8c015b9
commit c299492d6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
168 changed files with 12019 additions and 3073 deletions

View file

@ -0,0 +1,43 @@
import 'package:pigeon/pigeon.dart';
@ConfigurePigeon(
PigeonOptions(
dartOut: 'lib/src/player_settings_helper.g.dart',
dartOptions: DartOptions(),
kotlinOut: 'android/app/src/main/kotlin/nl/jknaapen/fladder/api/PlayerSettingsHelper.g.kt',
kotlinOptions: KotlinOptions(
includeErrorClass: false,
),
dartPackageName: 'nl_jknaapen_fladder.settings',
),
)
class PlayerSettings {
final Map<SegmentType, SegmentSkip> skipTypes;
final int skipForward;
final int skipBackward;
const PlayerSettings({
required this.skipTypes,
required this.skipForward,
required this.skipBackward,
});
}
enum SegmentType {
commercial,
preview,
recap,
intro,
outro,
}
enum SegmentSkip {
ask,
skip,
none,
}
@HostApi()
abstract class PlayerSettingsPigeon {
void sendPlayerSettings(PlayerSettings playerSettings);
}