remove flutter_meedu_videoplayer package , add media_kit video player
This commit is contained in:
parent
f3716324b7
commit
14d6d92078
7 changed files with 469 additions and 392 deletions
|
|
@ -3,7 +3,6 @@ import 'package:bot_toast/bot_toast.dart';
|
|||
import 'package:desktop_webview_window/desktop_webview_window.dart';
|
||||
import 'package:flex_color_scheme/flex_color_scheme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_meedu_videoplayer/init_meedu_player.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:intl/date_symbol_data_local.dart';
|
||||
|
|
@ -17,6 +16,7 @@ import 'package:mangayomi/modules/more/settings/appearance/providers/flex_scheme
|
|||
import 'package:mangayomi/modules/more/settings/appearance/providers/pure_black_dark_mode_state_provider.dart';
|
||||
import 'package:mangayomi/modules/more/settings/appearance/providers/theme_mode_state_provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:media_kit/media_kit.dart';
|
||||
|
||||
late Isar isar;
|
||||
|
||||
|
|
@ -30,18 +30,15 @@ class MyHttpoverrides extends HttpOverrides {
|
|||
}
|
||||
|
||||
void main(List<String> args) async {
|
||||
initMeeduPlayer(
|
||||
androidUseMediaKit: true,
|
||||
iosUseMediaKit: true,
|
||||
);
|
||||
HttpOverrides.global = MyHttpoverrides();
|
||||
if (Platform.isLinux || Platform.isWindows|| Platform.isMacOS) {
|
||||
if (Platform.isLinux || Platform.isWindows || Platform.isMacOS) {
|
||||
if (runWebViewTitleBarWidget(args)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
MediaKit.ensureInitialized();
|
||||
isar = await StorageProvider().initDB(null);
|
||||
await StorageProvider().requestPermission();
|
||||
runApp(const ProviderScope(child: MyApp()));
|
||||
|
|
|
|||
|
|
@ -1,16 +1,20 @@
|
|||
import 'dart:async';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_meedu_videoplayer/meedu_player.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart' as riv;
|
||||
import 'package:mangayomi/models/chapter.dart';
|
||||
import 'package:mangayomi/models/video.dart';
|
||||
import 'package:mangayomi/models/video.dart' as vid;
|
||||
import 'package:mangayomi/modules/anime/providers/stream_controller_provider.dart';
|
||||
import 'package:mangayomi/modules/widgets/progress_center.dart';
|
||||
import 'package:mangayomi/services/get_anime_servers.dart';
|
||||
import 'package:mangayomi/utils/colors.dart';
|
||||
import 'package:mangayomi/utils/media_query.dart';
|
||||
import 'package:media_kit/media_kit.dart';
|
||||
import 'package:media_kit_video/media_kit_video.dart';
|
||||
import 'package:media_kit_video/media_kit_video_controls/src/controls/extensions/duration.dart';
|
||||
import 'package:media_kit_video/media_kit_video_controls/src/controls/methods/video_state.dart';
|
||||
|
||||
class AnimeStreamView extends riv.ConsumerStatefulWidget {
|
||||
final Chapter episode;
|
||||
|
|
@ -24,27 +28,6 @@ class AnimeStreamView extends riv.ConsumerStatefulWidget {
|
|||
}
|
||||
|
||||
class _AnimeStreamViewState extends riv.ConsumerState<AnimeStreamView> {
|
||||
final _controller = MeeduPlayerController(
|
||||
autoHideControls: false,
|
||||
responsive: Responsive(
|
||||
fontSizeRelativeToScreen: 2.0,
|
||||
maxFontSize: 12,
|
||||
iconsSizeRelativeToScreen: 10,
|
||||
maxIconsSize: 50,
|
||||
buttonsSizeRelativeToScreen: 10,
|
||||
maxButtonsSize: 50,
|
||||
),
|
||||
enabledButtons: const EnabledButtons(playPauseAndRepeat: false),
|
||||
screenManager: const ScreenManager(
|
||||
forceLandScapeInFullscreen: false,
|
||||
),
|
||||
);
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky,
|
||||
|
|
@ -115,7 +98,7 @@ class _AnimeStreamViewState extends riv.ConsumerState<AnimeStreamView> {
|
|||
),
|
||||
loading: () {
|
||||
return Scaffold(
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
backgroundColor: Colors.black,
|
||||
body: WillPopScope(
|
||||
onWillPop: () async {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
|
||||
|
|
@ -123,24 +106,7 @@ class _AnimeStreamViewState extends riv.ConsumerState<AnimeStreamView> {
|
|||
Navigator.pop(context);
|
||||
return false;
|
||||
},
|
||||
child: Stack(
|
||||
children: [
|
||||
MeeduVideoPlayer(
|
||||
header: (context, controller, responsive) => AppBar(
|
||||
leading: BackButton(
|
||||
color: Colors.white,
|
||||
onPressed: () {
|
||||
SystemChrome.setEnabledSystemUIMode(
|
||||
SystemUiMode.manual,
|
||||
overlays: SystemUiOverlay.values);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
controller: _controller),
|
||||
const ProgressCenter(),
|
||||
],
|
||||
),
|
||||
child: ProgressCenter(),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
@ -149,7 +115,7 @@ class _AnimeStreamViewState extends riv.ConsumerState<AnimeStreamView> {
|
|||
}
|
||||
|
||||
class AnimeStreamPage extends StatefulWidget {
|
||||
final List<Video> videos;
|
||||
final List<vid.Video> videos;
|
||||
final Chapter episode;
|
||||
const AnimeStreamPage({Key? key, required this.videos, required this.episode})
|
||||
: super(key: key);
|
||||
|
|
@ -159,111 +125,266 @@ class AnimeStreamPage extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
||||
final _controller = MeeduPlayerController(
|
||||
responsive: Responsive(
|
||||
fontSizeRelativeToScreen: 2.0,
|
||||
maxFontSize: 12,
|
||||
iconsSizeRelativeToScreen: 10,
|
||||
maxIconsSize: 50,
|
||||
buttonsSizeRelativeToScreen: 10,
|
||||
maxButtonsSize: 50,
|
||||
),
|
||||
pipEnabled: true,
|
||||
late final Player _player = Player();
|
||||
late final VideoController _controller = VideoController(
|
||||
_player,
|
||||
configuration:
|
||||
const VideoControllerConfiguration(enableHardwareAcceleration: true),
|
||||
);
|
||||
|
||||
late final streamController = AnimeStreamController(episode: widget.episode);
|
||||
|
||||
/// listener for the video quality
|
||||
final ValueNotifier<Video?> _video = ValueNotifier(null);
|
||||
|
||||
late Duration _currentPosition =
|
||||
streamController.geTCurrentPosition(); // to save the video position
|
||||
|
||||
/// subscription to listen the video position changes
|
||||
StreamSubscription? _currentPositionSubs;
|
||||
|
||||
final ValueNotifier<vid.Video?> _video = ValueNotifier(null);
|
||||
final ValueNotifier<double> _playbackSpeed = ValueNotifier(1.0);
|
||||
bool _seekToCurrentPosition = true;
|
||||
late Duration _currentPosition = streamController.geTCurrentPosition();
|
||||
bool _showFitLabel = false;
|
||||
late StreamSubscription<Duration> _currentPositionSub =
|
||||
_player.stream.position.listen(
|
||||
(Duration position) {
|
||||
if (_seekToCurrentPosition) {
|
||||
_player.seek(_currentPosition);
|
||||
_seekToCurrentPosition = false;
|
||||
} else {
|
||||
_currentPosition = position;
|
||||
streamController.setCurrentPosition(position.inMilliseconds);
|
||||
streamController.setAnimeHistoryUpdate();
|
||||
}
|
||||
},
|
||||
);
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_video.value = widget.videos[0]; // set the default video quality (480p)
|
||||
_video.value = widget.videos[7];
|
||||
|
||||
// listen the video position
|
||||
_currentPositionSubs = _controller.onPositionChanged.listen(
|
||||
(Duration position) {
|
||||
_currentPosition = position; // save the video position
|
||||
|
||||
streamController.setCurrentPosition(position.inMilliseconds);
|
||||
streamController.setAnimeHistoryUpdate();
|
||||
},
|
||||
);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_setDataSource();
|
||||
});
|
||||
_player.open(Media(widget.videos[0].originalUrl,
|
||||
httpHeaders: widget.videos[0].headers));
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_currentPositionSubs?.cancel(); // cancel the subscription
|
||||
_controller.dispose();
|
||||
_player.dispose();
|
||||
_currentPositionSub.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _onChangeVideoQuality() {
|
||||
showCupertinoModalPopup(
|
||||
context: context,
|
||||
builder: (_) => CupertinoActionSheet(
|
||||
actions: List.generate(
|
||||
widget.videos.length,
|
||||
(index) {
|
||||
final quality = widget.videos[index];
|
||||
return CupertinoActionSheetAction(
|
||||
child: Text(quality.quality),
|
||||
Future<void> _setPlaybackSpeed(double speed) async {
|
||||
await _player.setRate(speed);
|
||||
_playbackSpeed.value = speed;
|
||||
}
|
||||
|
||||
Future<void> _togglePlaybackSpeed() async {
|
||||
List<double> allowedSpeeds = [0.25, 0.5, 0.75, 1.0, 1.25, 1.50, 1.75, 2.0];
|
||||
if (allowedSpeeds.indexOf(_playbackSpeed.value) <
|
||||
allowedSpeeds.length - 1) {
|
||||
_setPlaybackSpeed(
|
||||
allowedSpeeds[allowedSpeeds.indexOf(_playbackSpeed.value) + 1]);
|
||||
} else {
|
||||
_setPlaybackSpeed(allowedSpeeds[0]);
|
||||
}
|
||||
}
|
||||
|
||||
List<Widget> _bottomButtonBar(BuildContext context) {
|
||||
return [
|
||||
Flexible(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
const MaterialPositionIndicator(),
|
||||
const Spacer(),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: PopupMenuButton(
|
||||
child: const Icon(
|
||||
Icons.video_settings_outlined,
|
||||
size: 30,
|
||||
color: Colors.white,
|
||||
),
|
||||
onSelected: (value) async {
|
||||
_video.value = value;
|
||||
await _player.open(Media(value.originalUrl,
|
||||
httpHeaders: value.headers));
|
||||
_seekToCurrentPosition = true;
|
||||
_currentPositionSub =
|
||||
_player.stream.position.listen(
|
||||
(Duration position) {
|
||||
if (_seekToCurrentPosition) {
|
||||
_player.seek(_currentPosition);
|
||||
_seekToCurrentPosition = false;
|
||||
} else {
|
||||
_currentPosition = position;
|
||||
streamController.setCurrentPosition(
|
||||
position.inMilliseconds);
|
||||
streamController.setAnimeHistoryUpdate();
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
itemBuilder: (context) => [
|
||||
for (var quality in widget.videos)
|
||||
PopupMenuItem(
|
||||
height: 35,
|
||||
value: quality,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
quality.quality,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 7,
|
||||
),
|
||||
Icon(
|
||||
Icons.check,
|
||||
color: _video.value == quality
|
||||
? Colors.black
|
||||
: Colors.transparent,
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
MaterialButton(
|
||||
child: ValueListenableBuilder<double>(
|
||||
valueListenable: _playbackSpeed,
|
||||
builder: (context, value, child) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
"${value}x",
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
onPressed: () {
|
||||
_togglePlaybackSpeed();
|
||||
}),
|
||||
MaterialButton(
|
||||
child: const Icon(Icons.fit_screen,
|
||||
size: 30, color: Colors.white),
|
||||
onPressed: () async {
|
||||
_showFitLabel = true;
|
||||
setState(() {
|
||||
if (_fit == BoxFit.contain) {
|
||||
_fit = BoxFit.cover;
|
||||
} else if (_fit == BoxFit.cover) {
|
||||
_fit = BoxFit.fill;
|
||||
} else if (_fit == BoxFit.fill) {
|
||||
_fit = BoxFit.fitHeight;
|
||||
} else if (_fit == BoxFit.fitHeight) {
|
||||
_fit = BoxFit.fitWidth;
|
||||
} else if (_fit == BoxFit.fitWidth) {
|
||||
_fit = BoxFit.none;
|
||||
} else if (_fit == BoxFit.none) {
|
||||
_fit = BoxFit.scaleDown;
|
||||
} else if (_fit == BoxFit.scaleDown) {
|
||||
_fit = BoxFit.contain;
|
||||
}
|
||||
});
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
setState(() {
|
||||
_showFitLabel = false;
|
||||
});
|
||||
},
|
||||
),
|
||||
if (Platform.isWindows ||
|
||||
Platform.isMacOS ||
|
||||
Platform.isLinux)
|
||||
const MaterialDesktopFullscreenButton()
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
MaterialButton(
|
||||
child: const Icon(
|
||||
Icons.skip_previous_outlined,
|
||||
size: 30,
|
||||
color: Colors.white,
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
top: 0,
|
||||
child: UnconstrainedBox(
|
||||
child: Container(
|
||||
width: 47,
|
||||
height: 47,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(
|
||||
color: Colors.white, width: 3)),
|
||||
),
|
||||
),
|
||||
),
|
||||
const MaterialPlayOrPauseButton(
|
||||
iconSize: 36,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
MaterialButton(
|
||||
child: const Icon(
|
||||
Icons.skip_next_outlined,
|
||||
size: 30,
|
||||
color: Colors.white,
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
List<Widget> _topButtonBar(BuildContext context) {
|
||||
return [
|
||||
Flexible(
|
||||
child: Row(
|
||||
children: [
|
||||
BackButton(
|
||||
color: Colors.white,
|
||||
onPressed: () {
|
||||
_video.value = quality; // change the video quality
|
||||
_setDataSource(); // update the datasource
|
||||
Navigator.maybePop(_);
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
|
||||
overlays: SystemUiOverlay.values);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
cancelButton: CupertinoActionSheetAction(
|
||||
onPressed: () => Navigator.maybePop(_),
|
||||
isDestructiveAction: true,
|
||||
child: const Text("Cancel"),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _setDataSource() async {
|
||||
// set the data source and play the video in the last video position
|
||||
await _controller.setDataSource(
|
||||
DataSource(
|
||||
type: DataSourceType.network,
|
||||
source: _video.value!.originalUrl,
|
||||
httpHeaders: _video.value!.headers),
|
||||
autoplay: true,
|
||||
seekTo: _currentPosition,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: WillPopScope(
|
||||
onWillPop: () async {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
|
||||
overlays: SystemUiOverlay.values);
|
||||
Navigator.pop(context);
|
||||
return false;
|
||||
},
|
||||
child: MeeduVideoPlayer(
|
||||
controller: _controller,
|
||||
header: (ctx, controller, responsive) {
|
||||
// creates a responsive fontSize using the size of video container
|
||||
final double fontSize = responsive.ip(3);
|
||||
|
||||
return AppBar(
|
||||
title: ListTile(
|
||||
),
|
||||
Flexible(
|
||||
child: ListTile(
|
||||
dense: true,
|
||||
title: SizedBox(
|
||||
width: mediaWidth(context, 0.8),
|
||||
|
|
@ -278,47 +399,197 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
width: mediaWidth(context, 0.8),
|
||||
child: Text(
|
||||
widget.episode.name!,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.white),
|
||||
color: Colors.white.withOpacity(0.7)),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
leading: BackButton(
|
||||
color: Colors.white,
|
||||
onPressed: () {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
|
||||
overlays: SystemUiOverlay.values);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
actions: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: CupertinoButton(
|
||||
padding: const EdgeInsets.all(5),
|
||||
onPressed: _onChangeVideoQuality,
|
||||
child: ValueListenableBuilder<Video?>(
|
||||
valueListenable: _video,
|
||||
builder: (context, Video? video, child) {
|
||||
return Text(
|
||||
video!.quality,
|
||||
style: TextStyle(
|
||||
fontSize: fontSize > 18 ? 18 : fontSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
Widget _videoPlayer(BuildContext context) {
|
||||
return Stack(
|
||||
children: [
|
||||
Video(
|
||||
fit: _fit,
|
||||
controller: _controller,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
resumeUponEnteringForegroundMode: true,
|
||||
),
|
||||
if (_showFitLabel)
|
||||
Positioned(
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Center(
|
||||
child: Text(
|
||||
_fit.name.toUpperCase(),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20),
|
||||
)))
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
BoxFit _fit = BoxFit.contain;
|
||||
Widget mobilePlayer() {
|
||||
return MaterialVideoControlsTheme(
|
||||
normal: MaterialVideoControlsThemeData(
|
||||
visibleOnMount: true,
|
||||
buttonBarHeight: 83,
|
||||
seekOnDoubleTap: true,
|
||||
controlsHoverDuration: const Duration(seconds: 5),
|
||||
volumeGesture: true,
|
||||
brightnessGesture: true,
|
||||
seekBarPositionColor: primaryColor(context),
|
||||
seekBarThumbColor: primaryColor(context),
|
||||
primaryButtonBar: [],
|
||||
seekBarMargin: const EdgeInsets.only(bottom: 60, left: 8, right: 8),
|
||||
topButtonBarMargin: const EdgeInsets.all(0),
|
||||
topButtonBar: _topButtonBar(context),
|
||||
bottomButtonBarMargin: const EdgeInsets.only(left: 8, right: 8),
|
||||
bottomButtonBar: _bottomButtonBar(context)),
|
||||
fullscreen: MaterialVideoControlsThemeData(
|
||||
buttonBarHeight: 83,
|
||||
seekOnDoubleTap: true,
|
||||
controlsHoverDuration: const Duration(seconds: 5),
|
||||
volumeGesture: true,
|
||||
brightnessGesture: true,
|
||||
seekBarPositionColor: primaryColor(context),
|
||||
seekBarThumbColor: primaryColor(context),
|
||||
primaryButtonBar: [],
|
||||
seekBarMargin: const EdgeInsets.only(bottom: 60, left: 8, right: 8),
|
||||
topButtonBarMargin: const EdgeInsets.all(0),
|
||||
topButtonBar: _topButtonBar(context),
|
||||
bottomButtonBarMargin: const EdgeInsets.only(left: 8, right: 8),
|
||||
bottomButtonBar: _bottomButtonBar(context)),
|
||||
child: _videoPlayer(context));
|
||||
}
|
||||
|
||||
Widget desktopPlayer() {
|
||||
return MaterialDesktopVideoControlsTheme(
|
||||
normal: MaterialDesktopVideoControlsThemeData(
|
||||
visibleOnMount: true,
|
||||
buttonBarHeight: 83,
|
||||
controlsHoverDuration: const Duration(seconds: 5),
|
||||
seekBarPositionColor: primaryColor(context),
|
||||
seekBarThumbColor: primaryColor(context),
|
||||
primaryButtonBar: [],
|
||||
seekBarMargin: const EdgeInsets.only(bottom: 60, left: 8, right: 8),
|
||||
topButtonBarMargin: const EdgeInsets.all(0),
|
||||
topButtonBar: _topButtonBar(context),
|
||||
bottomButtonBarMargin: const EdgeInsets.only(left: 8, right: 8),
|
||||
bottomButtonBar: _bottomButtonBar(context)),
|
||||
fullscreen: MaterialDesktopVideoControlsThemeData(
|
||||
buttonBarHeight: 83,
|
||||
controlsHoverDuration: const Duration(seconds: 5),
|
||||
seekBarPositionColor: primaryColor(context),
|
||||
seekBarThumbColor: primaryColor(context),
|
||||
primaryButtonBar: [],
|
||||
seekBarMargin: const EdgeInsets.only(bottom: 60, left: 8, right: 8),
|
||||
topButtonBarMargin: const EdgeInsets.all(0),
|
||||
topButtonBar: _topButtonBar(context),
|
||||
bottomButtonBarMargin: const EdgeInsets.only(left: 8, right: 8),
|
||||
bottomButtonBar: _bottomButtonBar(context)),
|
||||
child: _videoPlayer(context));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: WillPopScope(
|
||||
onWillPop: () async {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
|
||||
overlays: SystemUiOverlay.values);
|
||||
Navigator.pop(context);
|
||||
return false;
|
||||
},
|
||||
child: mobilePlayer(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MaterialPositionIndicator extends StatefulWidget {
|
||||
/// Overriden [TextStyle] for the [MaterialPositionIndicator].
|
||||
final TextStyle? style;
|
||||
const MaterialPositionIndicator({super.key, this.style});
|
||||
|
||||
@override
|
||||
MaterialPositionIndicatorState createState() =>
|
||||
MaterialPositionIndicatorState();
|
||||
}
|
||||
|
||||
class MaterialPositionIndicatorState extends State<MaterialPositionIndicator> {
|
||||
late Duration position = controller(context).player.state.position;
|
||||
late Duration duration = controller(context).player.state.duration;
|
||||
|
||||
final List<StreamSubscription> subscriptions = [];
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
if (subscriptions.isEmpty) {
|
||||
subscriptions.addAll(
|
||||
[
|
||||
controller(context).player.stream.position.listen((event) {
|
||||
setState(() {
|
||||
position = event;
|
||||
});
|
||||
}),
|
||||
controller(context).player.stream.duration.listen((event) {
|
||||
setState(() {
|
||||
duration = event;
|
||||
});
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
for (final subscription in subscriptions) {
|
||||
subscription.cancel();
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
position.label(reference: duration),
|
||||
style: widget.style ??
|
||||
const TextStyle(
|
||||
height: 1.0,
|
||||
fontSize: 12.0,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
duration.label(reference: duration),
|
||||
style: widget.style ??
|
||||
const TextStyle(
|
||||
height: 1.0,
|
||||
fontSize: 12.0,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import FlutterMacOS
|
|||
import Foundation
|
||||
|
||||
import desktop_webview_window
|
||||
import flutter_meedu_videoplayer
|
||||
import flutter_web_auth_2
|
||||
import isar_flutter_libs
|
||||
import media_kit_libs_macos_video
|
||||
|
|
@ -14,18 +13,14 @@ import media_kit_video
|
|||
import package_info_plus
|
||||
import path_provider_foundation
|
||||
import screen_brightness_macos
|
||||
import screen_retriever
|
||||
import share_plus
|
||||
import shared_preferences_foundation
|
||||
import sqflite
|
||||
import url_launcher_macos
|
||||
import wakelock_plus
|
||||
import window_manager
|
||||
import window_to_front
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
DesktopWebviewWindowPlugin.register(with: registry.registrar(forPlugin: "DesktopWebviewWindowPlugin"))
|
||||
FlutterMeeduVideoplayerPlugin.register(with: registry.registrar(forPlugin: "FlutterMeeduVideoplayerPlugin"))
|
||||
FlutterWebAuth2Plugin.register(with: registry.registrar(forPlugin: "FlutterWebAuth2Plugin"))
|
||||
IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin"))
|
||||
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
|
||||
|
|
@ -33,12 +28,9 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
ScreenBrightnessMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenBrightnessMacosPlugin"))
|
||||
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
|
||||
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
|
||||
WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin"))
|
||||
WindowToFrontPlugin.register(with: registry.registrar(forPlugin: "WindowToFrontPlugin"))
|
||||
}
|
||||
|
|
|
|||
209
pubspec.lock
209
pubspec.lock
|
|
@ -57,22 +57,15 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.11.0"
|
||||
auto_orientation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: auto_orientation
|
||||
sha256: cd56bb59b36fa54cc28ee254bc600524f022a4862f31d5ab20abd7bb1c54e678
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
background_downloader:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: background_downloader
|
||||
sha256: "8edf16baa5fceb31cf103f6113ee01c0cbef17cdd8aabf6152fa0b1b89f6543b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.9.1"
|
||||
path: "."
|
||||
ref: dev
|
||||
resolved-ref: "691b38d2ecc9ae76ca1ab3a05f16cb59062f3e5a"
|
||||
url: "https://github.com/781flyingdutchman/background_downloader.git"
|
||||
source: git
|
||||
version: "7.9.2"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -507,22 +500,6 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_meedu:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_meedu
|
||||
sha256: "7be568c2df5036cd050358b589f2b3de3318562710f9a64ea364da5fd7eeafe7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.3.1"
|
||||
flutter_meedu_videoplayer:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_meedu_videoplayer
|
||||
sha256: "9fe1e0951c0742f84637be0aa4eac4073a2a6f394e9d0f08c4e93e4ae3d93caf"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.2.26"
|
||||
flutter_plugin_android_lifecycle:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -539,14 +516,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.7"
|
||||
flutter_spinkit:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_spinkit
|
||||
sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.2.0"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
|
|
@ -597,14 +566,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
fullscreen_window:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fullscreen_window
|
||||
sha256: fe3014f91bff16a82d142ba9d834980b8a84b4bb03347a92588d389ad92bd1d3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
glob:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -830,13 +791,13 @@ packages:
|
|||
source: hosted
|
||||
version: "0.5.3"
|
||||
media_kit:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: media_kit
|
||||
sha256: eb47c2d51b7c06b319d8c776b47be912c5a4f53af7ab4814927a52a76442609e
|
||||
sha256: d7a827080fb28f0ba4e8a7ab3f3e3f868fa817f0a94499640466ade84a1c31c9
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.2+1"
|
||||
version: "1.1.5"
|
||||
media_kit_libs_android_video:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -853,16 +814,8 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.3"
|
||||
media_kit_libs_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: media_kit_libs_linux
|
||||
sha256: "838b9e8041d376873cc938872c75812989d0feb247ad93afd8dbc92bf052680a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
media_kit_libs_macos_video:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: media_kit_libs_macos_video
|
||||
sha256: c06e831f3c22a45296d375788d9bc07871b448f8e9ec98d77b11e5e118a83fb2
|
||||
|
|
@ -870,15 +823,15 @@ packages:
|
|||
source: hosted
|
||||
version: "1.1.3"
|
||||
media_kit_libs_windows_video:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: media_kit_libs_windows_video
|
||||
sha256: "31c6c75ab08627df9fce7ce2431e5ac5e5990ac40faef75b07c48d1d7907a37f"
|
||||
sha256: f33aabd8414470d99e2c91dd98d605e6a5f1c4b8082dd933c10951bc961b9124
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.6"
|
||||
version: "1.0.7"
|
||||
media_kit_native_event_loop:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: media_kit_native_event_loop
|
||||
sha256: e37ce6fb5fa71b8cf513c6a6cd591367743a342a385e7da621a047dd8ef6f4a4
|
||||
|
|
@ -886,21 +839,13 @@ packages:
|
|||
source: hosted
|
||||
version: "1.0.7"
|
||||
media_kit_video:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: media_kit_video
|
||||
sha256: "4b627683ef9e7f5cd049fd01be4b5deb5f31effc878503f108c81b19fd745040"
|
||||
sha256: d4143a96d97965d025bbb8b88db0ebf301e3c4cfa10c7e2ad7fd47c86a7febae
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
meedu:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meedu
|
||||
sha256: "2cac0971ea211b1a18e3c4f038369f8ac57401760342da16d9e4e9d043f7de38"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.0.2"
|
||||
version: "1.1.6"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1245,14 +1190,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.1"
|
||||
screen_retriever:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: screen_retriever
|
||||
sha256: "4931f226ca158123ccd765325e9fbf360bfed0af9b460a10f960f9bb13d58323"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.6"
|
||||
scrollable_positioned_list:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1277,62 +1214,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.3.0"
|
||||
shared_preferences:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences
|
||||
sha256: "0344316c947ffeb3a529eac929e1978fcd37c26be4e8468628bac399365a3ca1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
sha256: fe8401ec5b6dcd739a0fe9588802069e608c3fdbfd3c3c93e546cf2f90438076
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
shared_preferences_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_foundation
|
||||
sha256: d29753996d8eb8f7619a1f13df6ce65e34bc107bef6330739ed76f18b22310ef
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.3"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_linux
|
||||
sha256: "71d6806d1449b0a9d4e85e0c7a917771e672a3d5dc61149cc9fac871115018e1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
shared_preferences_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_platform_interface
|
||||
sha256: "23b052f17a25b90ff2b61aad4cc962154da76fb62848a9ce088efe30d7c50ab1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
shared_preferences_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_web
|
||||
sha256: "7347b194fb0bbeb4058e6a4e87ee70350b6b2b90f8ac5f8bd5b3a01548f6d33a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
shared_preferences_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_windows
|
||||
sha256: f95e6a43162bce43c9c3405f3eb6f39e5b5d11f65fab19196cf8225e2777624d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
shelf:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1570,54 +1451,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
video_player:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player
|
||||
sha256: "3fd106c74da32f336dc7feb65021da9b0207cb3124392935f1552834f7cce822"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.7.0"
|
||||
video_player_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_android
|
||||
sha256: f338a5a396c845f4632959511cad3542cdf3167e1b2a1a948ef07f7123c03608
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.9"
|
||||
video_player_avfoundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_avfoundation
|
||||
sha256: f5f5b7fe8c865be8a57fe80c2dca130772e1db775b7af4e5c5aa1905069cfc6c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.9"
|
||||
video_player_media_kit:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_media_kit
|
||||
sha256: "486c7704ddcc4324c841a362bc028198ce830c919a5d057dec360272f3d5b6dc"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.0.26"
|
||||
video_player_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_platform_interface
|
||||
sha256: "1ca9acd7a0fb15fb1a990cb554e6f004465c6f37c99d2285766f08a4b2802988"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.2.0"
|
||||
video_player_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_web
|
||||
sha256: "44ce41424d104dfb7cf6982cc6b84af2b007a24d126406025bf40de5d481c74c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.16"
|
||||
volume_controller:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1674,14 +1507,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.6"
|
||||
window_manager:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: window_manager
|
||||
sha256: "9eef00e393e7f9308309ce9a8b2398c9ee3ca78b50c96e8b4f9873945693ac88"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.5"
|
||||
window_to_front:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
16
pubspec.yaml
16
pubspec.yaml
|
|
@ -15,7 +15,7 @@ dependencies:
|
|||
go_router: ^10.0.0
|
||||
flutter_riverpod: ^2.3.7
|
||||
cached_network_image: ^3.2.3
|
||||
http: ^1.1.0
|
||||
http: 1.1.0
|
||||
riverpod_annotation: ^2.1.2
|
||||
html: ^0.15.4
|
||||
# flutter_js: ^0.8.0
|
||||
|
|
@ -30,7 +30,10 @@ dependencies:
|
|||
google_fonts: ^5.1.0
|
||||
url_launcher: ^6.1.12
|
||||
package_info_plus: ^4.1.0
|
||||
background_downloader: ^7.9.1
|
||||
background_downloader:
|
||||
git:
|
||||
url: https://github.com/781flyingdutchman/background_downloader.git
|
||||
ref: dev
|
||||
permission_handler: ^10.4.3
|
||||
flutter_inappwebview: ^5.7.2+3
|
||||
draggable_menu: ^4.1.3
|
||||
|
|
@ -50,10 +53,15 @@ dependencies:
|
|||
flutter_web_auth_2: ^2.1.5
|
||||
numberpicker: ^2.1.2
|
||||
encrypt: ^5.0.1
|
||||
flutter_meedu_videoplayer: ^4.2.26
|
||||
js_packer: ^0.0.5
|
||||
media_kit: ^1.1.5
|
||||
media_kit_video: ^1.1.6
|
||||
media_kit_native_event_loop: ^1.0.7
|
||||
media_kit_libs_android_video: ^1.3.2
|
||||
media_kit_libs_ios_video: ^1.1.3
|
||||
js_packer: ^0.0.5
|
||||
media_kit_libs_macos_video: ^1.1.3
|
||||
media_kit_libs_windows_video: ^1.0.7
|
||||
|
||||
|
||||
|
||||
cupertino_icons: ^1.0.2
|
||||
|
|
|
|||
|
|
@ -7,26 +7,18 @@
|
|||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <desktop_webview_window/desktop_webview_window_plugin.h>
|
||||
#include <flutter_meedu_videoplayer/flutter_meedu_videoplayer_plugin_c_api.h>
|
||||
#include <fullscreen_window/fullscreen_window_plugin_c_api.h>
|
||||
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
|
||||
#include <media_kit_libs_windows_video/media_kit_libs_windows_video_plugin_c_api.h>
|
||||
#include <media_kit_video/media_kit_video_plugin_c_api.h>
|
||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||
#include <screen_brightness_windows/screen_brightness_windows_plugin.h>
|
||||
#include <screen_retriever/screen_retriever_plugin.h>
|
||||
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
#include <window_manager/window_manager_plugin.h>
|
||||
#include <window_to_front/window_to_front_plugin.h>
|
||||
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
DesktopWebviewWindowPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("DesktopWebviewWindowPlugin"));
|
||||
FlutterMeeduVideoplayerPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterMeeduVideoplayerPluginCApi"));
|
||||
FullscreenWindowPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FullscreenWindowPluginCApi"));
|
||||
IsarFlutterLibsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin"));
|
||||
MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar(
|
||||
|
|
@ -37,14 +29,10 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
||||
ScreenBrightnessWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("ScreenBrightnessWindowsPlugin"));
|
||||
ScreenRetrieverPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("ScreenRetrieverPlugin"));
|
||||
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
|
||||
UrlLauncherWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||
WindowManagerPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("WindowManagerPlugin"));
|
||||
WindowToFrontPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("WindowToFrontPlugin"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,17 +4,13 @@
|
|||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
desktop_webview_window
|
||||
flutter_meedu_videoplayer
|
||||
fullscreen_window
|
||||
isar_flutter_libs
|
||||
media_kit_libs_windows_video
|
||||
media_kit_video
|
||||
permission_handler_windows
|
||||
screen_brightness_windows
|
||||
screen_retriever
|
||||
share_plus
|
||||
url_launcher_windows
|
||||
window_manager
|
||||
window_to_front
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue