feat: enable video player in linux
This commit is contained in:
parent
41cc0560d0
commit
f043e191d2
11 changed files with 92 additions and 33 deletions
|
|
@ -17,6 +17,7 @@ import 'package:fluffychat/config/app_config.dart';
|
|||
import 'package:fluffychat/utils/client_manager.dart';
|
||||
import 'package:fluffychat/utils/notification_background_handler.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:video_player_media_kit/video_player_media_kit.dart';
|
||||
import 'config/setting_keys.dart';
|
||||
import 'utils/background_push.dart';
|
||||
import 'widgets/fluffy_chat_app.dart';
|
||||
|
|
@ -47,7 +48,17 @@ void main() async {
|
|||
// widget bindings are initialized already.
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
JustAudioMediaKit.ensureInitialized(linux: true);
|
||||
|
||||
if (PlatformInfos.isLinux || PlatformInfos.isWindows) {
|
||||
JustAudioMediaKit.ensureInitialized(
|
||||
linux: true,
|
||||
windows: true
|
||||
);
|
||||
VideoPlayerMediaKit.ensureInitialized(
|
||||
linux: true,
|
||||
windows: true
|
||||
);
|
||||
}
|
||||
|
||||
final store = await AppSettings.init();
|
||||
Logs().i('Welcome to ${AppSettings.applicationName.value} <3');
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class EventVideoPlayer extends StatelessWidget {
|
|||
timeline: timeline,
|
||||
outerContext: context,
|
||||
),
|
||||
)
|
||||
),
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
child: SizedBox(
|
||||
width: width,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue