mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
feat: Android TV support (#503)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
7ab8c015b9
commit
c299492d6d
168 changed files with 12019 additions and 3073 deletions
|
|
@ -127,11 +127,17 @@ abstract class VideoPlayerSettingsModel with _$VideoPlayerSettingsModel {
|
|||
|
||||
enum PlayerOptions {
|
||||
libMDK,
|
||||
libMPV;
|
||||
libMPV,
|
||||
nativePlayer;
|
||||
|
||||
const PlayerOptions();
|
||||
|
||||
static Iterable<PlayerOptions> get available => kIsWeb ? {PlayerOptions.libMPV} : PlayerOptions.values;
|
||||
static Iterable<PlayerOptions> get available => kIsWeb
|
||||
? {PlayerOptions.libMPV}
|
||||
: switch (defaultTargetPlatform) {
|
||||
TargetPlatform.android => PlayerOptions.values,
|
||||
_ => {PlayerOptions.libMDK, PlayerOptions.libMPV},
|
||||
};
|
||||
|
||||
static PlayerOptions get platformDefaults {
|
||||
if (kIsWeb) return PlayerOptions.libMPV;
|
||||
|
|
@ -143,6 +149,7 @@ enum PlayerOptions {
|
|||
String label(BuildContext context) => switch (this) {
|
||||
PlayerOptions.libMDK => "MDK",
|
||||
PlayerOptions.libMPV => "MPV",
|
||||
PlayerOptions.nativePlayer => "Native",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue