From eabd357caea850b5e6cae52c897f5400c9a529d1 Mon Sep 17 00:00:00 2001 From: MiaoMint <1981324730@qq.com> Date: Wed, 12 Jul 2023 15:33:30 +0800 Subject: [PATCH] deps: package:media_kit to `1.0.2` --- lib/pages/watch/widgets/video_player.dart | 16 +- macos/Flutter/GeneratedPluginRegistrant.swift | 8 +- pubspec.lock | 186 ++++++++++++------ pubspec.yaml | 12 +- .../flutter/generated_plugin_registrant.cc | 3 + windows/flutter/generated_plugins.cmake | 1 + 6 files changed, 141 insertions(+), 85 deletions(-) diff --git a/lib/pages/watch/widgets/video_player.dart b/lib/pages/watch/widgets/video_player.dart index a3860ed1..7f0a964d 100644 --- a/lib/pages/watch/widgets/video_player.dart +++ b/lib/pages/watch/widgets/video_player.dart @@ -20,7 +20,6 @@ import 'package:window_manager/window_manager.dart'; import 'package:screenshot/screenshot.dart'; import 'playlist.dart' as p; import 'package:path/path.dart' as path; -import 'package:wakelock_plus/wakelock_plus.dart'; class VideoPlayer extends StatefulWidget { const VideoPlayer({ @@ -70,31 +69,31 @@ class _VideoPlayerState extends State { SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky); } _play(); - player.streams.playing.listen((event) { + player.stream.playing.listen((event) { setState(() { isPlaying = event; }); }); - player.streams.duration.listen((event) { + player.stream.duration.listen((event) { setState(() { duration = event; }); }); - player.streams.position.listen((event) { + player.stream.position.listen((event) { if (!isSeeking) { setState(() { position = event; }); } }); - player.streams.error.listen((event) { + player.stream.error.listen((event) { if (event.toString().isNotEmpty) { setState(() { error = event.toString(); }); } }); - player.streams.completed.listen((event) { + player.stream.completed.listen((event) { if (playerIndex == widget.playList.length - 1) { if (Platform.isAndroid) { ScaffoldMessenger.of(context).showSnackBar(SnackBar( @@ -117,7 +116,6 @@ class _VideoPlayerState extends State { @override void dispose() { - WakelockPlus.disable(); if (Platform.isAndroid) { // 切换回竖屏 SystemChrome.setPreferredOrientations( @@ -165,12 +163,11 @@ class _VideoPlayerState extends State { _play() async { isLoading = true; try { - await WakelockPlus.enable(); final m3u8Url = (await widget.runtime.watch(widget.playList[playerIndex].url)).url; debugPrint(m3u8Url); player.open(Media(m3u8Url)); - player.streams.buffering.listen((event) { + player.stream.buffering.listen((event) { debugPrint(event.toString()); isLoading = event; }); @@ -542,6 +539,7 @@ class _VideoPlayerState extends State { child: Video( key: ValueKey(playerIndex), controller: controller, + controls: (state) => const SizedBox.shrink(), ), ), Positioned.fill( diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 48dcf8f7..57eb74a3 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,31 +6,31 @@ import FlutterMacOS import Foundation import desktop_multi_window -import device_info_plus import flutter_js import isar_flutter_libs import media_kit_libs_macos_video import media_kit_video import package_info_plus import path_provider_foundation +import screen_brightness_macos import screen_retriever import system_theme import url_launcher_macos -import wakelock_plus +import wakelock_macos import window_manager func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FlutterMultiWindowPlugin.register(with: registry.registrar(forPlugin: "FlutterMultiWindowPlugin")) - DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) FlutterJsPlugin.register(with: registry.registrar(forPlugin: "FlutterJsPlugin")) IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin")) MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin")) MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin")) 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")) SystemThemePlugin.register(with: registry.registrar(forPlugin: "SystemThemePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) - WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin")) + WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin")) WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index c87eb095..75e1babe 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -217,14 +217,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - dbus: - dependency: transitive - description: - name: dbus - sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" - url: "https://pub.dev" - source: hosted - version: "0.7.8" desktop_multi_window: dependency: "direct main" description: @@ -233,22 +225,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.2.0" - device_info_plus: - dependency: "direct main" - description: - name: device_info_plus - sha256: "2c35b6d1682b028e42d07b3aee4b98fa62996c10bc12cb651ec856a80d6a761b" - url: "https://pub.dev" - source: hosted - version: "9.0.2" - device_info_plus_platform_interface: - dependency: transitive - description: - name: device_info_plus_platform_interface - sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 - url: "https://pub.dev" - source: hosted - version: "7.0.0" dio: dependency: "direct main" description: @@ -309,10 +285,10 @@ packages: dependency: "direct main" description: name: fluent_ui - sha256: "456c66be2d1e5eab4c0f81dac1c55e023e65d31e81488ed4463741ce10928417" + sha256: be237134ab215d4a1591307f6286f4aa53ed5a492c2ee56be5d86be344fd16db url: "https://pub.dev" source: hosted - version: "4.6.2" + version: "4.7.0" flutter: dependency: "direct main" description: flutter @@ -354,10 +330,10 @@ packages: dependency: "direct main" description: name: flutter_js - sha256: a87d50a06447c675b769d2d1e049d10afc01d330dc7083317c9be75978ee1808 + sha256: c4e0ff2cac3378e34eb0cafb58089377a7722d3531cdf9fcd5a53b5afc66c2dc url: "https://pub.dev" source: hosted - version: "0.7.1" + version: "0.7.2" flutter_lints: dependency: "direct dev" description: @@ -375,10 +351,10 @@ packages: dependency: "direct main" description: name: flutter_markdown - sha256: "86b76dbf30496024d6c816bdc13b97de9449dce1f035a73ee7b4ab7f67eab70b" + sha256: "4b1bfbb802d76320a1a46d9ce984106135093efd9d969765d07c2125af107bdf" url: "https://pub.dev" source: hosted - version: "0.6.16" + version: "0.6.17" flutter_test: dependency: "direct dev" description: flutter @@ -417,10 +393,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: "2cb236ba3f923043fdbe14a6a3a796b8c250e85658e28caee3e86c0c275847e5" + sha256: b33a88c67816312597e5e0f5906c5139a0b9bd9bb137346e872c788da7af8ea0 url: "https://pub.dev" source: hosted - version: "8.2.0" + version: "9.0.3" graphs: dependency: transitive description: @@ -601,10 +577,10 @@ packages: dependency: "direct main" description: name: media_kit - sha256: "080cfb5af8d04f8cc454cb4c5ea34b19de5b8e1a1b3af62a34e766364b5244ad" + sha256: "8c7d9417bed724a3fcaadd91c722fea042737cafb153aa1f1e6461a0fee683a3" url: "https://pub.dev" source: hosted - version: "0.0.11" + version: "1.0.2" media_kit_libs_android_video: dependency: "direct main" description: @@ -649,10 +625,10 @@ packages: dependency: "direct main" description: name: media_kit_video - sha256: "89d3c2cdb0f74d1bb597a9c9a7678f656fe538d20620ad1317b7354fd5d1af15" + sha256: d31a0eab80cafadccdedb663d8a127750e38b8c75c1aa83d8943f8119b88cf99 url: "https://pub.dev" source: hosted - version: "0.0.12" + version: "1.0.2" meta: dependency: transitive description: @@ -697,10 +673,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: ceb027f6bc6a60674a233b4a90a7658af1aebdea833da0b5b53c1e9821a78c7b + sha256: "10259b111176fba5c505b102e3a5b022b51dd97e30522e906d6922c745584745" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "3.1.2" package_info_plus_platform_interface: dependency: transitive description: @@ -853,6 +829,54 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" + screen_brightness: + dependency: transitive + description: + name: screen_brightness + sha256: "62fd61a64e68b32b98b840bad7d8b6822bbc40e63c2b569a5f85528484c86b41" + url: "https://pub.dev" + source: hosted + version: "0.2.2" + screen_brightness_android: + dependency: transitive + description: + name: screen_brightness_android + sha256: "3df10961e3a9e968a5e076fe27e7f4741fa8a1d3950bdeb48cf121ed529d0caf" + url: "https://pub.dev" + source: hosted + version: "0.1.0+2" + screen_brightness_ios: + dependency: transitive + description: + name: screen_brightness_ios + sha256: "99adc3ca5490b8294284aad5fcc87f061ad685050e03cf45d3d018fe398fd9a2" + url: "https://pub.dev" + source: hosted + version: "0.1.0" + screen_brightness_macos: + dependency: transitive + description: + name: screen_brightness_macos + sha256: "64b34e7e3f4900d7687c8e8fb514246845a73ecec05ab53483ed025bd4a899fd" + url: "https://pub.dev" + source: hosted + version: "0.1.0+1" + screen_brightness_platform_interface: + dependency: transitive + description: + name: screen_brightness_platform_interface + sha256: b211d07f0c96637a15fb06f6168617e18030d5d74ad03795dd8547a52717c171 + url: "https://pub.dev" + source: hosted + version: "0.1.0" + screen_brightness_windows: + dependency: transitive + description: + name: screen_brightness_windows + sha256: "80d90ecdc63fc0823f2ecb1be323471619287937e14210650d7b25ca181abd05" + url: "https://pub.dev" + source: hosted + version: "0.1.1" screen_retriever: dependency: transitive description: @@ -1014,10 +1038,10 @@ packages: dependency: "direct main" description: name: system_theme - sha256: "1592228ae9872fd14201aa20a5268c0373dd412910071660bc13ada392d14b62" + sha256: "359e1965d70b9e492c2b1db4dc89544c2b4d0fd24172584d46c45f8df94a364d" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" system_theme_web: dependency: transitive description: @@ -1106,6 +1130,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_platform: + dependency: transitive + description: + name: universal_platform + sha256: d315be0f6641898b280ffa34e2ddb14f3d12b1a37882557869646e0cc363d0cc + url: "https://pub.dev" + source: hosted + version: "1.0.0+1" uri_parser: dependency: transitive description: @@ -1118,10 +1150,10 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + sha256: "781bd58a1eb16069412365c98597726cd8810ae27435f04b3b4d3a470bacd61e" url: "https://pub.dev" source: hosted - version: "6.1.11" + version: "6.1.12" url_launcher_android: dependency: transitive description: @@ -1166,18 +1198,18 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "6bb1e5d7fe53daf02a8fee85352432a40b1f868a81880e99ec7440113d5cfcab" + sha256: cc26720eefe98c1b71d85f9dc7ef0cada5132617046369d9dc296b3ecaa5cbb4 url: "https://pub.dev" source: hosted - version: "2.0.17" + version: "2.0.18" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771" + sha256: "7967065dd2b5fccc18c653b97958fdf839c5478c28e767c61ee879f4e7882422" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.0.7" vector_math: dependency: transitive description: @@ -1194,22 +1226,54 @@ packages: url: "https://pub.dev" source: hosted version: "11.7.2" - wakelock_plus: - dependency: "direct main" + volume_controller: + dependency: transitive description: - name: wakelock_plus - sha256: "50abe3fe07527dca0da637571bb85307ece3e4edc2e8a0735841d1fac3d06783" + name: volume_controller + sha256: "189bdc7a554f476b412e4c8b2f474562b09d74bc458c23667356bce3ca1d48c9" url: "https://pub.dev" source: hosted - version: "1.0.0+3" - wakelock_plus_platform_interface: + version: "2.0.7" + wakelock: dependency: transitive description: - name: wakelock_plus_platform_interface - sha256: d88828393731055df62a4a725881d2e2a79013ac8e8c9ae86f4094340c60055e + name: wakelock + sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "0.6.2" + wakelock_macos: + dependency: transitive + description: + name: wakelock_macos + sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" + url: "https://pub.dev" + source: hosted + version: "0.4.0" + wakelock_platform_interface: + dependency: transitive + description: + name: wakelock_platform_interface + sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" + url: "https://pub.dev" + source: hosted + version: "0.3.0" + wakelock_web: + dependency: transitive + description: + name: wakelock_web + sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" + url: "https://pub.dev" + source: hosted + version: "0.4.0" + wakelock_windows: + dependency: transitive + description: + name: wakelock_windows + sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567" + url: "https://pub.dev" + source: hosted + version: "0.2.1" watcher: dependency: transitive description: @@ -1238,18 +1302,10 @@ packages: dependency: transitive description: name: win32 - sha256: dfdf0136e0aa7a1b474ea133e67cb0154a0acd2599c4f3ada3b49d38d38793ee - url: "https://pub.dev" - source: hosted - version: "5.0.5" - win32_registry: - dependency: transitive - description: - name: win32_registry - sha256: e4506d60b7244251bc59df15656a3093501c37fb5af02105a944d73eb95be4c9 + sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4 url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "3.1.4" window_manager: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 65da6650..6484174e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: miru_app description: A new Flutter project. publish_to: "none" -version: 1.3.1+8 +version: 1.3.2+9 environment: sdk: ">=3.0.3 <4.0.0" @@ -9,7 +9,6 @@ environment: dependencies: cupertino_icons: ^1.0.5 desktop_multi_window: ^0.2.0 - device_info_plus: ^9.0.2 dio: ^5.2.1+1 easy_refresh: ^3.3.2+1 fluent_ui: ^4.6.2 @@ -22,28 +21,27 @@ dependencies: flutter_js: ^0.7.1 flutter_markdown: ^0.6.16 get: ^4.6.5 - go_router: ^8.0.5 + go_router: ^9.0.3 highlight: ^0.7.0 hive: ^2.2.3 hive_flutter: ^1.1.0 isar: ^3.1.0+1 isar_flutter_libs: ^3.1.0+1 json_annotation: ^4.8.1 - media_kit: ^0.0.11 + media_kit: ^1.0.2 media_kit_libs_android_video: ^1.1.1 media_kit_libs_linux: ^1.0.2 media_kit_libs_macos_video: ^1.0.5 media_kit_libs_windows_video: ^1.0.2 media_kit_native_event_loop: ^1.0.4 - media_kit_video: ^0.0.12 - package_info_plus: ^4.0.2 + media_kit_video: ^1.0.2 + package_info_plus: ^3.1.2 path: ^1.8.3 path_provider: ^2.0.15 screenshot: ^2.1.0 system_theme: ^2.2.0 tmdb_api: ^2.1.5 url_launcher: ^6.1.11 - wakelock_plus: ^1.0.0+3 window_manager: ^0.3.4 dev_dependencies: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 054221a9..b732664e 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -27,6 +28,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("MediaKitLibsWindowsVideoPluginCApi")); MediaKitVideoPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("MediaKitVideoPluginCApi")); + ScreenBrightnessWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ScreenBrightnessWindowsPlugin")); ScreenRetrieverPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("ScreenRetrieverPlugin")); SystemThemePluginRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index a68e1f0d..a18e503f 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -8,6 +8,7 @@ list(APPEND FLUTTER_PLUGIN_LIST isar_flutter_libs media_kit_libs_windows_video media_kit_video + screen_brightness_windows screen_retriever system_theme url_launcher_windows