From 37a2c150f30ffc5ee0bc0bf7905221f23f632c7c Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 11 Nov 2026 23:25:28 -0500 Subject: [PATCH] rip out media_kit, use better_player and audioplayers This also let us rip out cocoapods stuff. Needs testing on Windows, MacOS, and ideally, iOS. --- .github/workflows/windows.yml | 11 + README.md | 5 +- ios/Flutter/Debug.xcconfig | 1 - ios/Flutter/Release.xcconfig | 1 - ios/Podfile | 43 ---- ios/Podfile.lock | 28 --- ios/Runner.xcodeproj/project.pbxproj | 104 -------- .../contents.xcworkspacedata | 3 - lib/main.dart | 2 - lib/widgets/players/audio.dart | 30 ++- lib/widgets/players/player_controls.dart | 36 +-- lib/widgets/players/video.dart | 213 ++++++++-------- linux/flutter/generated_plugin_registrant.cc | 16 +- linux/flutter/generated_plugins.cmake | 4 +- linux/nix/build_env.nix | 29 ++- linux/nix/pkg/default.nix | 27 +- linux/runner/my_application.cc | 4 + macos/Flutter/Flutter-Debug.xcconfig | 1 - macos/Flutter/Flutter-Release.xcconfig | 1 - macos/Flutter/GeneratedPluginRegistrant.swift | 8 +- macos/Podfile | 42 ---- macos/Podfile.lock | 28 --- macos/Runner.xcodeproj/project.pbxproj | 104 -------- .../contents.xcworkspacedata | 3 - pubspec.lock | 232 +++++++++++------- pubspec.yaml | 5 +- .../flutter/generated_plugin_registrant.cc | 12 +- windows/flutter/generated_plugins.cmake | 4 +- 28 files changed, 384 insertions(+), 613 deletions(-) delete mode 100644 ios/Podfile delete mode 100644 ios/Podfile.lock delete mode 100644 macos/Podfile delete mode 100644 macos/Podfile.lock diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index db339b9..de0c784 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -45,6 +45,17 @@ jobs: flutter pub run build_runner build flutter build windows --dart-define=GIT_COMMIT=${{ github.sha }} + # better_player plays videos with libmpv, but doesn't bundle it + - name: Download libmpv + shell: powershell + run: | + $archive = "$env:RUNNER_TEMP\mpv.7z" + Invoke-WebRequest "https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20261021/mpv-dev-x86_64-20261021-git-e471496c56.7z" -OutFile $archive + if ((Get-FileHash $archive -Algorithm SHA256).Hash -ne "efc719eff3dc5954b4a5efc800632808bcec01cc9034940dd14e5eb7fe9ea633") { + throw "libmpv checksum mismatch" + } + 7z e $archive libmpv-2.dll -obuild/windows/x64/runner/Release + - name: Copy MinGW runtime DLLs shell: msys2 {0} run: | diff --git a/README.md b/README.md index d8507e6..98a790d 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ This installs Nexus system-wide. With `enableNotifications`, it also installs KU #### Linux - On NixOS: Either use direnv and `direnv allow`, or `nix develop` -- On other distros: Install Flutter, Go, Git, Libclang, Libass, MPV, and Glibc. Do not use any Snap packages, they cause various compilation issues. +- On other distros: Install Flutter, Go, Git, Libclang, MPV, GStreamer (with its base, good and libav plugins), and Glibc. Do not use any Snap packages, they cause various compilation issues. #### Windows @@ -83,12 +83,11 @@ You will need: - Flutter - Git -- Libass -- MPV - Go - Visual Studio 2022 (Desktop development with C++) - [MSYS2/MinGW-w64 GCC](https://www.msys2.org/) (for CGO) - [LLVM/Clang + libclang](https://clang.llvm.org/get_started.html) (for `ffigen`) +- `libmpv-2.dll`, for playing videos, next to `nexus.exe` (CI uses a build from [mpv-winbuild-cmake](https://github.com/shinchiro/mpv-winbuild-cmake/releases)) On Windows, make sure these are available in your shell `PATH`: diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index ec97fc6..592ceee 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index c4855bf..592ceee 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile deleted file mode 100644 index 620e46e..0000000 --- a/ios/Podfile +++ /dev/null @@ -1,43 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '13.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) - target 'RunnerTests' do - inherit! :search_paths - end -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/ios/Podfile.lock b/ios/Podfile.lock deleted file mode 100644 index b29d5cb..0000000 --- a/ios/Podfile.lock +++ /dev/null @@ -1,28 +0,0 @@ -PODS: - - Flutter (1.0.0) - - media_kit_libs_ios_video (1.0.4): - - Flutter - - media_kit_video (0.0.1): - - Flutter - -DEPENDENCIES: - - Flutter (from `Flutter`) - - media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`) - - media_kit_video (from `.symlinks/plugins/media_kit_video/ios`) - -EXTERNAL SOURCES: - Flutter: - :path: Flutter - media_kit_libs_ios_video: - :path: ".symlinks/plugins/media_kit_libs_ios_video/ios" - media_kit_video: - :path: ".symlinks/plugins/media_kit_video/ios" - -SPEC CHECKSUMS: - Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 - media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854 - media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474 - -PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e - -COCOAPODS: 1.17.0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 065d08b..1612bb0 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -8,13 +8,11 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 2ADFEE6C745FFB2100CC9AFD /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8156A45F510382D558AED93A /* Pods_RunnerTests.framework */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */; }; 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; - 88D55A5F1C7625122EBEE29D /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 82F9A3759658343C81A0EA4C /* Pods_Runner.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -46,19 +44,14 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 22DE4310DAFBE211CDF700B1 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 363A89F6FA09BCCBDED440CE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 63516CF65A79A5DDDE64B0D1 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 8156A45F510382D558AED93A /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 82F9A3759658343C81A0EA4C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -66,9 +59,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - AEB96D8976BD46D6860C7041 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - B8B599FDB72E4713FB7B5A44 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; - FE5E4162842555A83F8A7FD7 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -76,7 +66,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2ADFEE6C745FFB2100CC9AFD /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -85,27 +74,12 @@ buildActionMask = 2147483647; files = ( 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, - 88D55A5F1C7625122EBEE29D /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1CFFAE23B502BCCEB2B191A3 /* Pods */ = { - isa = PBXGroup; - children = ( - AEB96D8976BD46D6860C7041 /* Pods-Runner.debug.xcconfig */, - 363A89F6FA09BCCBDED440CE /* Pods-Runner.release.xcconfig */, - 22DE4310DAFBE211CDF700B1 /* Pods-Runner.profile.xcconfig */, - B8B599FDB72E4713FB7B5A44 /* Pods-RunnerTests.debug.xcconfig */, - FE5E4162842555A83F8A7FD7 /* Pods-RunnerTests.release.xcconfig */, - 63516CF65A79A5DDDE64B0D1 /* Pods-RunnerTests.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; 331C8082294A63A400263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( @@ -114,15 +88,6 @@ path = RunnerTests; sourceTree = ""; }; - 594EB1F65336CF9C7958F6FA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 82F9A3759658343C81A0EA4C /* Pods_Runner.framework */, - 8156A45F510382D558AED93A /* Pods_RunnerTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -142,8 +107,6 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, - 1CFFAE23B502BCCEB2B191A3 /* Pods */, - 594EB1F65336CF9C7958F6FA /* Frameworks */, ); sourceTree = ""; }; @@ -179,7 +142,6 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - EE82EC529EB6C0F1FA480659 /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, 8C0A36760DA8B873D8F6DDCE /* Frameworks */, @@ -198,14 +160,12 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 0830C6758DA3ECA81FB12386 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 1D165FDFB9D0D939B041966D /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -283,45 +243,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0830C6758DA3ECA81FB12386 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 1D165FDFB9D0D939B041966D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -353,28 +274,6 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - EE82EC529EB6C0F1FA480659 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -502,7 +401,6 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B8B599FDB72E4713FB7B5A44 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -520,7 +418,6 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FE5E4162842555A83F8A7FD7 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -536,7 +433,6 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 63516CF65A79A5DDDE64B0D1 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata index 21a3cc1..1d526a1 100644 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,7 +4,4 @@ - - diff --git a/lib/main.dart b/lib/main.dart index 590c74d..97650d0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,7 +4,6 @@ import "package:dynamic_color/dynamic_color.dart"; import "package:flutter/foundation.dart"; import "package:flutter_riverpod/flutter_riverpod.dart"; import "package:material_emoji_picker/material_emoji_picker.dart"; -import "package:media_kit/media_kit.dart"; import "package:nexus/controllers/active_account.dart"; import "package:nexus/controllers/client.dart"; import "package:nexus/controllers/client_state.dart"; @@ -65,7 +64,6 @@ void showError(Object error, [StackTrace? stackTrace]) { void main(List args) async { WidgetsFlutterBinding.ensureInitialized(); - MediaKit.ensureInitialized(); LicenseRegistry.addLicense(() => .fromIterable(fontLicenses)); diff --git a/lib/widgets/players/audio.dart b/lib/widgets/players/audio.dart index 898e89b..419d0ed 100644 --- a/lib/widgets/players/audio.dart +++ b/lib/widgets/players/audio.dart @@ -1,9 +1,9 @@ import "dart:async"; +import "package:audioplayers/audioplayers.dart" as audioplayers; import "package:material_ui/material_ui.dart"; import "package:flutter_hooks/flutter_hooks.dart"; import "package:hooks_riverpod/hooks_riverpod.dart"; -import "package:media_kit/media_kit.dart"; import "package:nexus/controllers/client.dart"; import "package:nexus/helpers/extensions/save_attachment.dart"; import "package:nexus/models/info/audio.dart"; @@ -18,9 +18,7 @@ class const AudioPlayer( }) extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final player = useMemoized( - () => Player(configuration: .new(bufferSize: 128 * 1024 * 1024)), - ); + final player = useMemoized(audioplayers.AudioPlayer.new); final loaded = useState(false); useEffect(() { @@ -29,19 +27,39 @@ class const AudioPlayer( .read(ClientController.provider.notifier) .downloadMedia(.new(mxc: uri, encrypted: encrypted)); if (!context.mounted) return; - await player.open(Media(audio.path), play: false); + // Keeps the audio loaded after it finishes, so it can be replayed + await player.setReleaseMode(.stop); + await player.setSource(audioplayers.DeviceFileSource(audio.path)); if (context.mounted) loaded.value = true; }); return player.dispose; }, []); + final state = useStream( + player.onPlayerStateChanged, + initialData: player.state, + ).requireData; + final position = useStream( + player.onPositionChanged, + initialData: Duration.zero, + ).requireData; + final duration = useStream( + player.onDurationChanged, + initialData: Duration.zero, + ).requireData; + final playing = state == .playing; + return Card( color: Theme.of(context).colorScheme.surfaceContainerHigh, child: Padding( padding: .symmetric(horizontal: 8), child: PlayerControls( - player, + playing: playing, + position: position, + duration: duration, + onPlayPause: playing ? player.pause : player.resume, + onSeek: player.seek, loading: !loaded.value, size: info?.size, actions: .new([ diff --git a/lib/widgets/players/player_controls.dart b/lib/widgets/players/player_controls.dart index 6f54afa..53a8c5b 100644 --- a/lib/widgets/players/player_controls.dart +++ b/lib/widgets/players/player_controls.dart @@ -1,39 +1,25 @@ import "dart:math"; import "package:fast_immutable_collections/fast_immutable_collections.dart"; -import "package:flutter_hooks/flutter_hooks.dart"; import "package:material_ui/material_ui.dart"; -import "package:media_kit/media_kit.dart"; import "package:nexus/helpers/extensions/size_to_string.dart"; -/// Play/pause, position and seeking controls for a media_kit [Player]. -class const PlayerControls( - final Player player, { +/// Play/pause, position and seeking controls, for any player. +class const PlayerControls({ + required final bool playing, + required final Duration position, + required final Duration duration, + required final VoidCallback onPlayPause, + required final ValueChanged onSeek, final bool loading = false, + final bool buffering = false, final Color? color, final int? size, final IList actions = const .empty(), super.key, -}) extends HookWidget { +}) extends StatelessWidget { @override Widget build(BuildContext context) { - final playing = useStream( - player.stream.playing, - initialData: player.state.playing, - ).requireData; - final buffering = useStream( - player.stream.buffering, - initialData: player.state.buffering, - ).requireData; - final position = useStream( - player.stream.position, - initialData: player.state.position, - ).requireData; - final duration = useStream( - player.stream.duration, - initialData: player.state.duration, - ).requireData; - String format(Duration duration) { final minutes = duration.inMinutes .remainder(60) @@ -61,7 +47,7 @@ class const PlayerControls( child: CircularProgressIndicator(padding: .all(12), color: color), ) : IconButton( - onPressed: player.playOrPause, + onPressed: onPlayPause, color: color, tooltip: playing ? "Pause" : "Play", icon: Icon(playing ? Icons.pause_circle : Icons.play_circle), @@ -73,7 +59,7 @@ class const PlayerControls( value: min(position.inMilliseconds.toDouble(), max), onChanged: loading ? null - : (value) => player.seek(.new(milliseconds: value.toInt())), + : (value) => onSeek(.new(milliseconds: value.toInt())), ); return LayoutBuilder( diff --git a/lib/widgets/players/video.dart b/lib/widgets/players/video.dart index 9a4bd26..f4c19be 100644 --- a/lib/widgets/players/video.dart +++ b/lib/widgets/players/video.dart @@ -1,13 +1,12 @@ import "dart:async"; +import "package:better_player/better_player.dart"; import "package:material_ui/material_ui.dart"; import "package:hooks_riverpod/hooks_riverpod.dart"; import "package:nexus/controllers/client.dart"; import "package:nexus/helpers/extensions/save_attachment.dart"; import "package:nexus/models/info/video.dart"; import "package:flutter_hooks/flutter_hooks.dart"; -import "package:media_kit/media_kit.dart"; -import "package:media_kit_video/media_kit_video.dart"; import "package:nexus/widgets/players/player_controls.dart"; class const VideoPlayer( @@ -19,11 +18,118 @@ class const VideoPlayer( }) extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final player = useMemoized( - () => Player(configuration: .new(bufferSize: 128 * 1024 * 1024)), - ); - final controller = useMemoized(() => VideoController(player)); + final aspectRatio = switch (info) { + VideoInfo(:final width?, :final height?) when width > 0 && height > 0 => + width / height, + _ => 16 / 9, + }; + final loaded = useState(false); + final controller = useMemoized( + () => BetterPlayerController( + PlayerConfiguration( + aspectRatio: aspectRatio, + fit: .contain, + controlsConfiguration: PlayerControlsConfiguration( + playerTheme: .custom, + customControlsBuilder: (controller, _) => HookBuilder( + builder: (context) { + final isLoaded = useValueListenable(loaded); + final value = useState(controller.videoPlayerValue); + useEffect(() { + void listener() => value.value = controller.videoPlayerValue; + controller.addVideoListener(listener); + return () => controller.removeVideoListener(listener); + }, [controller]); + + final playing = value.value?.isPlaying ?? false; + + // better_player doesn't use material_ui, so this Material is needed. + return Material( + type: .transparency, + child: Stack( + children: [ + Positioned.fill( + child: GestureDetector( + behavior: .opaque, + onTap: isLoaded + ? playing + ? controller.pause + : controller.play + : null, + ), + ), + Positioned( + top: 4, + right: 4, + child: IconButton( + onPressed: () => context.saveAttachment( + ref, + uri, + encrypted: encrypted, + filename: filename, + ), + color: Colors.white, + style: IconButton.styleFrom( + backgroundColor: Colors.black38, + ), + tooltip: "Download", + icon: Icon(Icons.download), + ), + ), + Positioned( + left: 0, + right: 0, + bottom: 0, + child: DecoratedBox( + decoration: const BoxDecoration( + gradient: LinearGradient( + begin: .bottomCenter, + end: .topCenter, + colors: [Colors.black54, Colors.transparent], + ), + ), + child: Padding( + padding: const .only(left: 4, right: 4, top: 16), + child: PlayerControls( + playing: playing, + buffering: value.value?.isBuffering ?? false, + position: value.value?.position ?? .zero, + duration: value.value?.duration ?? .zero, + onPlayPause: playing + ? controller.pause + : controller.play, + onSeek: controller.seekTo, + loading: !isLoaded, + size: info?.size, + color: Colors.white, + actions: .new([ + IconButton( + onPressed: controller.toggleFullScreen, + color: Colors.white, + tooltip: controller.isFullScreen + ? "Exit fullscreen" + : "Fullscreen", + icon: Icon( + controller.isFullScreen + ? Icons.fullscreen_exit + : Icons.fullscreen, + ), + ), + ]), + ), + ), + ), + ), + ], + ), + ); + }, + ), + ), + ), + ), + ); useEffect(() { scheduleMicrotask(() async { @@ -31,109 +137,20 @@ class const VideoPlayer( .read(ClientController.provider.notifier) .downloadMedia(.new(mxc: uri, encrypted: encrypted)); if (!context.mounted) return; - await player.open(Media(video.path), play: false); + await controller.setupDataSource(.file(video.path)); if (context.mounted) loaded.value = true; }); - return player.dispose; + return null; }, []); - final controls = useCallback( - (VideoState _) => - // Until media_kit moves to material_ui, this Material is needed. - Material( - type: .transparency, - child: ValueListenableBuilder( - valueListenable: loaded, - builder: (_, loaded, _) => Stack( - children: [ - Positioned.fill( - child: GestureDetector( - behavior: .opaque, - onTap: loaded ? player.playOrPause : null, - ), - ), - Positioned( - top: 4, - right: 4, - child: IconButton( - onPressed: () => context.saveAttachment( - ref, - uri, - encrypted: encrypted, - filename: filename, - ), - color: Colors.white, - style: IconButton.styleFrom( - backgroundColor: Colors.black38, - ), - tooltip: "Download", - icon: Icon(Icons.download), - ), - ), - Positioned( - left: 0, - right: 0, - bottom: 0, - child: DecoratedBox( - decoration: const BoxDecoration( - gradient: LinearGradient( - begin: .bottomCenter, - end: .topCenter, - colors: [Colors.black54, Colors.transparent], - ), - ), - child: Padding( - padding: const .only(left: 4, right: 4, top: 16), - child: PlayerControls( - player, - loading: !loaded, - size: info?.size, - color: Colors.white, - actions: .new([ - Builder( - builder: (context) { - final fullscreen = isFullscreen(context); - - return IconButton( - onPressed: () => toggleFullscreen(context), - color: Colors.white, - tooltip: fullscreen - ? "Exit fullscreen" - : "Fullscreen", - icon: Icon( - fullscreen - ? Icons.fullscreen_exit - : Icons.fullscreen, - ), - ); - }, - ), - ]), - ), - ), - ), - ), - ], - ), - ), - ), - [uri, encrypted, filename, info], - ); - - final aspectRatio = switch (info) { - VideoInfo(:final width?, :final height?) when width > 0 && height > 0 => - width / height, - _ => 16 / 9, - }; - return ConstrainedBox( constraints: const .new(maxHeight: 300), child: AspectRatio( aspectRatio: aspectRatio, child: ClipRRect( borderRadius: .circular(12), - child: Video(controller: controller, controls: controls), + child: BetterPlayer(controller: controller), ), ), ); diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 5833473..955bc02 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -7,11 +7,11 @@ #include "generated_plugin_registrant.h" #include +#include +#include #include #include #include -#include -#include #include #include @@ -19,6 +19,12 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) app_links_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "AppLinksPluginLinux"); app_links_plugin_linux_register_with_registrar(app_links_linux_registrar); + g_autoptr(FlPluginRegistrar) audioplayers_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "AudioplayersLinuxPlugin"); + audioplayers_linux_plugin_register_with_registrar(audioplayers_linux_registrar); + g_autoptr(FlPluginRegistrar) better_player_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "BetterPlayerLinuxPlugin"); + better_player_linux_plugin_register_with_registrar(better_player_linux_registrar); g_autoptr(FlPluginRegistrar) dynamic_color_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin"); dynamic_color_plugin_register_with_registrar(dynamic_color_registrar); @@ -28,12 +34,6 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) location_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "LocationPlugin"); location_plugin_register_with_registrar(location_registrar); - g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin"); - media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar); - g_autoptr(FlPluginRegistrar) media_kit_video_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitVideoPlugin"); - media_kit_video_plugin_register_with_registrar(media_kit_video_registrar); g_autoptr(FlPluginRegistrar) pasteboard_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "PasteboardPlugin"); pasteboard_plugin_register_with_registrar(pasteboard_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index c24677a..c41bfb1 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -4,11 +4,11 @@ list(APPEND FLUTTER_PLUGIN_LIST app_links_linux + audioplayers_linux + better_player_linux dynamic_color file_selector_linux location - media_kit_libs_linux - media_kit_video pasteboard url_launcher_linux ) diff --git a/linux/nix/build_env.nix b/linux/nix/build_env.nix index cac5fbd..01b810c 100644 --- a/linux/nix/build_env.nix +++ b/linux/nix/build_env.nix @@ -7,12 +7,14 @@ stdenv.cc go git + ffmpeg-headless libGL (flutter.override { + # audioplayers plays audio through GStreamer extraPkgConfigPackages = [ - mpv-unwrapped - libass + gst_all_1.gstreamer + gst_all_1.gst-plugins-base ]; }) ] @@ -25,6 +27,27 @@ ]; env = lib.optionalAttrs pkgs.stdenv.isLinux { - LD_LIBRARY_PATH = "./build/native_assets/linux:${lib.makeLibraryPath [ pkgs.zlib ]}"; + # better_player loads libmpv at runtime to play videos + LD_LIBRARY_PATH = "./build/native_assets/linux:${ + lib.makeLibraryPath [ + pkgs.zlib + pkgs.mpv-unwrapped + ] + }"; + # audioplayers links GStreamer by name only, without its library directory + LIBRARY_PATH = lib.makeLibraryPath [ + pkgs.gst_all_1.gstreamer + pkgs.gst_all_1.gst-plugins-base + pkgs.glib + ]; + GST_PLUGIN_SYSTEM_PATH_1_0 = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" ( + with pkgs.gst_all_1; + [ + gstreamer + gst-plugins-base + gst-plugins-good + gst-libav + ] + ); }; } diff --git a/linux/nix/pkg/default.nix b/linux/nix/pkg/default.nix index 76e8983..6356e16 100644 --- a/linux/nix/pkg/default.nix +++ b/linux/nix/pkg/default.nix @@ -2,7 +2,8 @@ lib, callPackage, mpv-unwrapped, - libass, + gst_all_1, + ffmpeg-headless, libxext, libxfixes, libclang, @@ -39,8 +40,9 @@ flutter.buildFlutterApplication { nativeBuildInputs = [ (callPackage ./hook_pkg_config.nix { }) ]; buildInputs = [ - mpv-unwrapped - libass + # audioplayers plays audio through GStreamer + gst_all_1.gstreamer + gst_all_1.gst-plugins-base # nativeapi includes XInput2.h, which needs these, but xi.pc only lists them privately libxext libxfixes @@ -54,6 +56,7 @@ flutter.buildFlutterApplication { gitHashes = { linkify = "sha256-TpMD6+0zyY6i9l+6d8ErnVufmepCv362rCtnbOht/z4="; + location = "sha256-zWnffXiK1LD4Ln23coPozBjYfTlhZmBhC5Z8mCdAgwQ="; fab_m3e = "sha256-5V9m6yY0jimx2gh7lQHYg4HDKQ4Wrl0ATmBhw5DkQMI="; fluttertagger = "sha256-tHUNU2+fBPkq5UK5YRi3SWs1zF2PIPz6RgSbwignU/I="; m3e_design = "sha256-5V9m6yY0jimx2gh7lQHYg4HDKQ4Wrl0ATmBhw5DkQMI="; @@ -69,8 +72,24 @@ flutter.buildFlutterApplication { install -D assets/bundled/icon.svg $out/share/icons/hicolor/scalable/apps/nexus.svg install -Dm755 linux/*.desktop -t $out/share/applications install -Dm644 linux/*.service -t $out/share/dbus-1/services + # better_player loads libmpv at runtime to play videos, and audioplayers + # needs GStreamer's plugins to decode audio + # gomuks uses ffmpeg and ffprobe for video thumbnails and metadata wrapProgram $out/bin/nexus \ - --suffix LD_LIBRARY_PATH : $out/app/nexus/lib + --suffix LD_LIBRARY_PATH : $out/app/nexus/lib \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ mpv-unwrapped ]} \ + --prefix PATH : ${lib.makeBinPath [ ffmpeg-headless ]} \ + --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${ + lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" ( + with gst_all_1; + [ + gstreamer + gst-plugins-base + gst-plugins-good + gst-libav + ] + ) + } ''; meta = { diff --git a/linux/runner/my_application.cc b/linux/runner/my_application.cc index f5795d0..defa773 100644 --- a/linux/runner/my_application.cc +++ b/linux/runner/my_application.cc @@ -1,5 +1,6 @@ #include "my_application.h" +#include #include #include @@ -301,6 +302,9 @@ static void my_application_startup( G_APPLICATION_CLASS( my_application_parent_class) ->startup(application); + + // mpv hates normal locales + setlocale(LC_NUMERIC, "C"); } static void my_application_shutdown( diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig index 4b81f9b..c2efd0b 100644 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig index 5caa9d1..c2efd0b 100644 --- a/macos/Flutter/Flutter-Release.xcconfig +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index b6667d0..662a521 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,12 +6,12 @@ import FlutterMacOS import Foundation import app_links +import audioplayers_darwin +import better_player_macos import dynamic_color import file_selector_macos import flutter_local_notifications import location -import media_kit_libs_macos_video -import media_kit_video import package_info_plus import pasteboard import shared_preferences_foundation @@ -20,12 +20,12 @@ import wakelock_plus func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin")) + AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin")) + BetterPlayerPlugin.register(with: registry.registrar(forPlugin: "BetterPlayerPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) LocationPlugin.register(with: registry.registrar(forPlugin: "LocationPlugin")) - MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin")) - MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) diff --git a/macos/Podfile b/macos/Podfile deleted file mode 100644 index 65543e2..0000000 --- a/macos/Podfile +++ /dev/null @@ -1,42 +0,0 @@ -platform :osx, '13.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_macos_podfile_setup - -target 'Runner' do - use_frameworks! - - flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) - target 'RunnerTests' do - inherit! :search_paths - end -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_macos_build_settings(target) - end -end diff --git a/macos/Podfile.lock b/macos/Podfile.lock deleted file mode 100644 index 08cb773..0000000 --- a/macos/Podfile.lock +++ /dev/null @@ -1,28 +0,0 @@ -PODS: - - FlutterMacOS (1.0.0) - - media_kit_libs_macos_video (1.0.4): - - FlutterMacOS - - media_kit_video (0.0.1): - - FlutterMacOS - -DEPENDENCIES: - - FlutterMacOS (from `Flutter/ephemeral`) - - media_kit_libs_macos_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/macos`) - - media_kit_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos`) - -EXTERNAL SOURCES: - FlutterMacOS: - :path: Flutter/ephemeral - media_kit_libs_macos_video: - :path: Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/macos - media_kit_video: - :path: Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos - -SPEC CHECKSUMS: - FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1 - media_kit_libs_macos_video: 85a23e549b5f480e72cae3e5634b5514bc692f65 - media_kit_video: fa6564e3799a0a28bff39442334817088b7ca758 - -PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009 - -COCOAPODS: 1.17.0 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index fa18d44..cc638f9 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -27,9 +27,7 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - 34AEA7295333B7F48CD3BE4C /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D76F30AE9CCFCA04C354BD4C /* Pods_RunnerTests.framework */; }; 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; - BAF79690465DBAC1A1E19D28 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70FD05041ACDA7E801BB9823 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -63,7 +61,6 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 18EDDEF1FB58EC56ABDA1BEB /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; @@ -80,16 +77,9 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 5099E6191AE87E21D356D9C8 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; - 6D9F8F8BBED102075ECF1DF9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 70FD05041ACDA7E801BB9823 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 8F5ECEC7BF9DD35CB3E7196E /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - 9DDE815F827B87E2C55DF94C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - CBD1D9203BEE9731F981EEF8 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - D76F30AE9CCFCA04C354BD4C /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -97,7 +87,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 34AEA7295333B7F48CD3BE4C /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -106,7 +95,6 @@ buildActionMask = 2147483647; files = ( 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, - BAF79690465DBAC1A1E19D28 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -139,8 +127,6 @@ 33CEB47122A05771004F2AC0 /* Flutter */, 331C80D6294CF71000263BE5 /* RunnerTests */, 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - FC780AF47288088B9004ACE2 /* Pods */, ); sourceTree = ""; }; @@ -189,29 +175,6 @@ path = Runner; sourceTree = ""; }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 70FD05041ACDA7E801BB9823 /* Pods_Runner.framework */, - D76F30AE9CCFCA04C354BD4C /* Pods_RunnerTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - FC780AF47288088B9004ACE2 /* Pods */ = { - isa = PBXGroup; - children = ( - 6D9F8F8BBED102075ECF1DF9 /* Pods-Runner.debug.xcconfig */, - 9DDE815F827B87E2C55DF94C /* Pods-Runner.release.xcconfig */, - CBD1D9203BEE9731F981EEF8 /* Pods-Runner.profile.xcconfig */, - 18EDDEF1FB58EC56ABDA1BEB /* Pods-RunnerTests.debug.xcconfig */, - 8F5ECEC7BF9DD35CB3E7196E /* Pods-RunnerTests.release.xcconfig */, - 5099E6191AE87E21D356D9C8 /* Pods-RunnerTests.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -219,7 +182,6 @@ isa = PBXNativeTarget; buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - C413A8A75594D2165C9D56BD /* [CP] Check Pods Manifest.lock */, 331C80D1294CF70F00263BE5 /* Sources */, 331C80D2294CF70F00263BE5 /* Frameworks */, 331C80D3294CF70F00263BE5 /* Resources */, @@ -238,13 +200,11 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 446C82D5FE82BD05F78EDA6A /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, - C4D158541D7059C07D3CA9B3 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -371,67 +331,6 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; - 446C82D5FE82BD05F78EDA6A /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C413A8A75594D2165C9D56BD /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C4D158541D7059C07D3CA9B3 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -483,7 +382,6 @@ /* Begin XCBuildConfiguration section */ 331C80DB294CF71000263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 18EDDEF1FB58EC56ABDA1BEB /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -498,7 +396,6 @@ }; 331C80DC294CF71000263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8F5ECEC7BF9DD35CB3E7196E /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -513,7 +410,6 @@ }; 331C80DD294CF71000263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5099E6191AE87E21D356D9C8 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata index 21a3cc1..1d526a1 100644 --- a/macos/Runner.xcworkspace/contents.xcworkspacedata +++ b/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -4,7 +4,4 @@ - - diff --git a/pubspec.lock b/pubspec.lock index 82a0112..a0b85cf 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -97,6 +97,62 @@ packages: url: "https://pub.dev" source: hosted version: "2.13.1" + audioplayers: + dependency: "direct main" + description: + name: audioplayers + sha256: "2ba4bb2944baacbdd5372ff8254a8e7feb8c10d7739545e392f5605a8f618745" + url: "https://pub.dev" + source: hosted + version: "6.8.1" + audioplayers_android: + dependency: transitive + description: + name: audioplayers_android + sha256: f5ff5b15620fbab8cb0849e9636c48e2b96c3f0f71723bbbe2ad3c761b205f05 + url: "https://pub.dev" + source: hosted + version: "5.3.0" + audioplayers_darwin: + dependency: transitive + description: + name: audioplayers_darwin + sha256: "1ca553add991384ecf421b9569da850f3ab2472ffb83f6970b0416365abc51be" + url: "https://pub.dev" + source: hosted + version: "6.5.0" + audioplayers_linux: + dependency: transitive + description: + name: audioplayers_linux + sha256: "15178b726b7cdee5364d0463c8d445630c4e0fb7d26612b73c767e7d25de9417" + url: "https://pub.dev" + source: hosted + version: "4.3.0" + audioplayers_platform_interface: + dependency: transitive + description: + name: audioplayers_platform_interface + sha256: "765f6f0e6dca55cb471c9483fc77700564b3484d19198aca4ebb5147c6c85acb" + url: "https://pub.dev" + source: hosted + version: "7.2.0" + audioplayers_web: + dependency: transitive + description: + name: audioplayers_web + sha256: ae1e0103c865a03e273f6d13d97b93f5595eac09915729cd5e37ef96e2857319 + url: "https://pub.dev" + source: hosted + version: "5.3.0" + audioplayers_windows: + dependency: transitive + description: + name: audioplayers_windows + sha256: a70ae82bba2dfcb6eb03dd4815d737a2d46d33ea5a96a03f535cfcaac490e413 + url: "https://pub.dev" + source: hosted + version: "4.4.1" avif_native: dependency: "direct main" description: @@ -105,6 +161,70 @@ packages: url: "https://pub.dev" source: hosted version: "0.2.0" + better_player: + dependency: "direct main" + description: + name: better_player + sha256: bde9cc4c35f8ccca5e75465934b51ac11db5cbfca7b221f2122d546bb5c5b324 + url: "https://pub.dev" + source: hosted + version: "1.36.0" + better_player_android: + dependency: transitive + description: + name: better_player_android + sha256: "2a1eb33ff1f67155f8840224836a6c90e95b335263986bcce78e89bf837be04e" + url: "https://pub.dev" + source: hosted + version: "1.13.0" + better_player_ios: + dependency: transitive + description: + name: better_player_ios + sha256: d26bc4b7d6d8c8047772f498fcdfe7cd896aecf156842d0fca9072d13eb4864b + url: "https://pub.dev" + source: hosted + version: "1.13.0" + better_player_linux: + dependency: transitive + description: + name: better_player_linux + sha256: "0e73f56852f7bb16b35b059f1ee40cc1b9cb84c9883dccd1e7766fcd26b3f40f" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + better_player_macos: + dependency: transitive + description: + name: better_player_macos + sha256: "9e5154bc33c1b1af22da851829b658eab7d318a33c9037c4da98bc37091dc7b7" + url: "https://pub.dev" + source: hosted + version: "1.8.0" + better_player_platform_interface: + dependency: transitive + description: + name: better_player_platform_interface + sha256: e5218199dd12ffe6f43c01d5cdeecad0b53125926f8da8c3f4b90136d8b55ec1 + url: "https://pub.dev" + source: hosted + version: "1.8.0" + better_player_web: + dependency: transitive + description: + name: better_player_web + sha256: "2faf05dc31ec9082dbd5f90cee7777887c282c2af17bb54efab4ebceae9c25f4" + url: "https://pub.dev" + source: hosted + version: "1.6.0" + better_player_windows: + dependency: transitive + description: + name: better_player_windows + sha256: "4bfdce8c0f9c55c362b2f931edfb2cd7cebdac757217ad09d4804ea21ec95f35" + url: "https://pub.dev" + source: hosted + version: "1.5.0" boolean_selector: dependency: transitive description: @@ -273,6 +393,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" + cupertino_icons: + dependency: transitive + description: + name: cupertino_icons + sha256: b7cc2390aac296c083bea762859413eb1cf5b630c70e0c7e4d831018f762a8b2 + url: "https://pub.dev" + source: hosted + version: "2.0.0" cupertino_ui: dependency: transitive description: @@ -806,6 +934,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + jni_flutter: + dependency: transitive + description: + name: jni_flutter + sha256: "0dd33d67797560f66e961a6053882d4df54bd345bf063b8fe7ea133f7ad8b191" + url: "https://pub.dev" + source: hosted + version: "1.0.4+1" jni_util: dependency: transitive description: @@ -993,70 +1129,6 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.2" - media_kit: - dependency: "direct main" - description: - name: media_kit - sha256: ae9e79597500c7ad6083a3c7b7b7544ddabfceacce7ae5c9709b0ec16a5d6643 - url: "https://pub.dev" - source: hosted - version: "1.2.6" - media_kit_libs_android_video: - dependency: transitive - description: - name: media_kit_libs_android_video - sha256: "3f6274e5ab2de512c286a25c327288601ee445ed8ac319e0ef0b66148bd8f76c" - url: "https://pub.dev" - source: hosted - version: "1.3.8" - media_kit_libs_ios_video: - dependency: transitive - description: - name: media_kit_libs_ios_video - sha256: b5382994eb37a4564c368386c154ad70ba0cc78dacdd3fb0cd9f30db6d837991 - url: "https://pub.dev" - source: hosted - version: "1.1.4" - media_kit_libs_linux: - dependency: transitive - description: - name: media_kit_libs_linux - sha256: "2b473399a49ec94452c4d4ae51cfc0f6585074398d74216092bf3d54aac37ecf" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - media_kit_libs_macos_video: - dependency: transitive - description: - name: media_kit_libs_macos_video - sha256: f26aa1452b665df288e360393758f84b911f70ffb3878032e1aabba23aa1032d - url: "https://pub.dev" - source: hosted - version: "1.1.4" - media_kit_libs_video: - dependency: "direct main" - description: - name: media_kit_libs_video - sha256: "2b235b5dac79c6020e01eef5022c6cc85fedc0df1738aadc6ea489daa12a92a9" - url: "https://pub.dev" - source: hosted - version: "1.0.7" - media_kit_libs_windows_video: - dependency: transitive - description: - name: media_kit_libs_windows_video - sha256: dff76da2778729ab650229e6b4ec6ec111eb5151431002cbd7ea304ff1f112ab - url: "https://pub.dev" - source: hosted - version: "1.0.11" - media_kit_video: - dependency: "direct main" - description: - name: media_kit_video - sha256: afaa509e7b7e0bf247557a3a740cde903a52c34ace9810f94500e127bd7b043d - url: "https://pub.dev" - source: hosted - version: "2.0.1" meta: dependency: transitive description: @@ -1355,14 +1427,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.9" - safe_local_storage: - dependency: transitive - description: - name: safe_local_storage - sha256: "76288b689a3e1fddccb377177feed85d73fdfc64c9c3c52991e2d9aba35c4857" - url: "https://pub.dev" - source: hosted - version: "2.0.7" shared_preferences: dependency: "direct main" description: @@ -1634,22 +1698,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" - universal_platform: - dependency: transitive - description: - name: universal_platform - sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - uri_parser: - dependency: transitive - description: - name: uri_parser - sha256: "051c62e5f693de98ca9f130ee707f8916e2266945565926be3ff20659f7853ce" - url: "https://pub.dev" - source: hosted - version: "3.0.2" url_launcher: dependency: "direct main" description: @@ -1754,6 +1802,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 7578d29..0516880 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -86,9 +86,6 @@ dependencies: html: 0.15.7 flutter_blurhash: 0.9.1 super_sliver_list: 0.4.1 - media_kit: 1.2.6 - media_kit_video: 2.0.1 - media_kit_libs_video: 1.0.7 measure_size: 5.0.2 m3e_buttons: 1.0.4 m3e_design: 0.2.1 @@ -124,6 +121,8 @@ dependencies: url: https://github.com/Henry-Hiles/flutterlocation # Adds an option to leave out proprietary Google Play services, unreleased ref: feat/optional-play-services path: packages/location + better_player: 1.36.0 + audioplayers: 6.8.1 dev_dependencies: flutter_test: sdk: flutter diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index bb97f3d..b63c950 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,27 +7,27 @@ #include "generated_plugin_registrant.h" #include +#include +#include #include #include #include -#include -#include #include #include void RegisterPlugins(flutter::PluginRegistry* registry) { AppLinksPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("AppLinksPluginCApi")); + AudioplayersWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin")); + BetterPlayerWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("BetterPlayerWindowsPlugin")); DynamicColorPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); FileSelectorWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("FileSelectorWindows")); LocationPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("LocationPlugin")); - MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("MediaKitLibsWindowsVideoPluginCApi")); - MediaKitVideoPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("MediaKitVideoPluginCApi")); PasteboardPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PasteboardPlugin")); UrlLauncherWindowsRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 20314ed..b6e3eef 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -4,11 +4,11 @@ list(APPEND FLUTTER_PLUGIN_LIST app_links + audioplayers_windows + better_player_windows dynamic_color file_selector_windows location - media_kit_libs_windows_video - media_kit_video pasteboard url_launcher_windows )