mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-16 03:37:54 +02:00
feat: Add generated Hive TypeAdapters for AppUser and PlaylistConfig models, and new build/doctor log files.
This commit is contained in:
1 parent
780f6c1842
commit
ef97c6dc90
81 files changed
+3233
-2428
No files matched your search
@@ -40,8 +40,8 @@ class StreamResolverPattern {
|
||||
_performDnsResolution(streamUrl).timeout(timeout, onTimeout: () => false),
|
||||
], eagerError: false).catchError((_) => [false, false]);
|
||||
|
||||
final isValid = results[0] as bool;
|
||||
final dnsResolved = results[1] as bool;
|
||||
final isValid = results[0];
|
||||
final dnsResolved = results[1];
|
||||
|
||||
if (!isValid) {
|
||||
return StreamResolverPattern(
|
||||
|
||||
@@ -2,15 +2,18 @@ import 'package:flutter/material.dart';
|
||||
import 'package:media_kit/media_kit.dart';
|
||||
import 'package:media_kit_video/media_kit_video.dart';
|
||||
|
||||
/// Video player selection and wrapper pattern
|
||||
/// Abstracts between MediaKit and other video players
|
||||
/// Handles fallback logic and player initialization
|
||||
/// Enum for supported players
|
||||
enum PlayerType { mediakit, native }
|
||||
|
||||
/// Video player selection and wrapper pattern
|
||||
/// Abstracts between MediaKit and other video players
|
||||
/// Handles fallback logic and player initialization
|
||||
class VideoPlayerWrapper {
|
||||
static const _availablePlayers = ['mediakit'];
|
||||
|
||||
/// Enum for supported players
|
||||
enum PlayerType { mediakit, native }
|
||||
|
||||
/// Get the preferred player type based on stream and platform
|
||||
static PlayerType getPreferredPlayer({
|
||||
required String streamUrl,
|
||||
@@ -50,7 +53,7 @@ class VideoPlayerWrapper {
|
||||
}) {
|
||||
final player = Player(
|
||||
configuration: PlayerConfiguration(
|
||||
logLevel: enableLogs ? MPVLogLevel.debug : MPVLogLevel.no,
|
||||
logLevel: enableLogs ? MPVLogLevel.debug : MPVLogLevel.error,
|
||||
),
|
||||
);
|
||||
return player;
|
||||
|
||||
Reference in new issue
Block a user