diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ae1d55a..91cb4152 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -121,55 +121,56 @@ jobs: # .exe # token: ${{ secrets.GITHUB_TOKEN }} - build_macOS: - name: Bluecherry Client macOS - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - submodules: recursive - - uses: subosito/flutter-action@v2.8.0 - with: - channel: "stable" - architecture: x64 - # cache: true - - - name: Update Pods - working-directory: ./macos/ - run: | - pod repo update - pod cache clean mdk - rm -rf /Pods - rm -rf /Podfile.lock - - - run: flutter gen-l10n - - run: flutter pub get - - - run: flutter build macos --verbose - - run: 7z a bluecherry-macos.7z build/macos/Build/Products/Release/unity.app - - name: Release - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-contexts - if: ${{ github.event_name == 'push' }} - uses: softprops/action-gh-release@v1 - with: - draft: true - prerelease: false - body: "" - tag_name: "bleeding_edge" - files: | - bluecherry-macos.7z - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Release - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-contexts - if: startsWith(github.ref, 'refs/tags/') - uses: softprops/action-gh-release@v1 - with: - files: | - bluecherry-macos.7z - token: ${{ secrets.GITHUB_TOKEN }} + # macOS build is now only available on the mac app store. + # build_macOS: + # name: Bluecherry Client macOS + # runs-on: macos-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # submodules: recursive + # - uses: subosito/flutter-action@v2.8.0 + # with: + # channel: "stable" + # architecture: x64 + # # cache: true + + # - name: Update Pods + # working-directory: ./macos/ + # run: | + # pod repo update + # pod cache clean mdk + # rm -rf /Pods + # rm -rf /Podfile.lock + + # - run: flutter gen-l10n + # - run: flutter pub get + + # - run: flutter build macos --verbose + # - run: 7z a bluecherry-macos.7z build/macos/Build/Products/Release/unity.app + # - name: Release + # # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-contexts + # if: ${{ github.event_name == 'push' }} + # uses: softprops/action-gh-release@v1 + # with: + # draft: true + # prerelease: false + # body: "" + # tag_name: "bleeding_edge" + # files: | + # bluecherry-macos.7z + # token: ${{ secrets.GITHUB_TOKEN }} + + # - name: Release + # # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-contexts + # if: startsWith(github.ref, 'refs/tags/') + # uses: softprops/action-gh-release@v1 + # with: + # files: | + # bluecherry-macos.7z + # token: ${{ secrets.GITHUB_TOKEN }} build_windows: name: Bluecherry Client Windows diff --git a/README.md b/README.md index 1ee67c7d..b2b6febd 100644 --- a/README.md +++ b/README.md @@ -25,30 +25,27 @@
$~~~~~$📱 For smaller screens, see multiple cameras in 2x3, 2x2, 2x1 or 1x1 view
$~~~~~$👆 Re-orgderable drag-and-drop camera viewer
$~~~~~$🛞 Cycle through different layout views automatically -- 🔎 Pinch-to-zoom fullscreen camera viewer. +- 🔎 Pinch-to-zoom fullscreen camera viewer - 📹 Multicast streams support - 🏃 Events List Viewer - 🚡 Events Timeline Viewer -- 📸 Direct camera viewer. - 🎮 **P**an-**T**ilt-**Z**oom controls for supported cameras. -- 🌓 Light & dark app theme. -- 📰 System camera event notifications. +- 🌓 Light & dark app theme +- 📰 System camera event notifications - 📺 Adaptive and responsive design for larger screens - 📱 Cross-platform -
$~~~~$📱 Mobile: Android & iOS -
$~~~~$🖥️ Desktop: Windows, Linux & MacOS - 📦 Automatic updates ## Download -| Android | iOS | Windows | GNU/Linux | MacOS | -| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| [arm64 `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-arm64-v8a-release.apk) | [App Store](https://apps.apple.com/us/app/bluecherry-mobile/id1555805139) | [Windows Setup](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-windows-setup.exe) | [SnapStore](https://snapcraft.io/bluecherry-client) | [Executable `.app`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-macos.7z) | -| [armabi `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-armeabi-v7a-release.apk) | | 🚧 **SOON** ~~`winget install bluecherry`~~ | [Ubuntu/Debian `.deb`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.deb) | 🚧 **SOON** ~~[App Store](https://github.com/bluecherrydvr/unity/issues/112)~~ | -| [x86_64 `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-x86_64-release.apk) | | 🚧 **SOON** ~~Microsoft Store~~ | [Raw Executable `.tar.gz`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.tar.gz) | | -| 🚧 **SOON** ~~Play Store~~ | | | [Fedora/Red Hat Linux `.rpm`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.rpm) | | +| Android | iOS | Windows | GNU/Linux | MacOS | +| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| [arm64 `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-arm64-v8a-release.apk) | [App Store](https://apps.apple.com/us/app/bluecherry-mobile/id1555805139) | [Windows Setup](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-windows-setup.exe) | [SnapStore](https://snapcraft.io/bluecherry-client) | [App Store](https://apps.apple.com/us/app/bluecherry-mobile/id6474160553) | +| [armabi `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-armeabi-v7a-release.apk) | | 🚧 **SOON** ~~`winget install bluecherry`~~ | [Ubuntu/Debian `.deb`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.deb) | | +| [x86_64 `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-x86_64-release.apk) | | 🚧 **SOON** ~~Microsoft Store~~ | [Raw Executable `.tar.gz`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.tar.gz) | | +| 🚧 **SOON** ~~Play Store~~ | | | [Fedora/Red Hat Linux `.rpm`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.rpm) | | -Or download the latest release [here](https://github.com/bluecherrydvr/unity/releases). +Or download the latest release [here](https://github.com/bluecherrydvr/unity/releases/tag/bleeding_edge)*. ### Installation diff --git a/ios/ci_scripts/ci_post_clone.sh b/ios/ci_scripts/ci_post_clone.sh new file mode 100755 index 00000000..ceea905f --- /dev/null +++ b/ios/ci_scripts/ci_post_clone.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# https://docs.flutter.dev/deployment/cd#post-clone-script +# Fail this script if any subcommand fails. +set -e + +# The default execution directory of this script is the ci_scripts directory. +cd $CI_PRIMARY_REPOSITORY_PATH # change working directory to the root of your cloned repo. + +# Install Flutter using git. +git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter +export PATH="$PATH:$HOME/flutter/bin" + +# Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms. +flutter precache --ios + +# Install Flutter dependencies. +flutter pub get + +# Install CocoaPods using Homebrew. +HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates. +brew install cocoapods + +# Install CocoaPods dependencies. +cd ios && pod install # run `pod install` in the `ios` directory. + +exit 0 \ No newline at end of file diff --git a/lib/providers/layouts_provider.dart b/lib/providers/layouts_provider.dart index fb86726a..e2cc2e35 100644 --- a/lib/providers/layouts_provider.dart +++ b/lib/providers/layouts_provider.dart @@ -98,7 +98,8 @@ class LayoutsProvider extends UnityProvider { kStorageDesktopLockedLayouts: jsonEncode( lockedLayouts.map((l) => l.name).toList(), ), - kStorageDesktopLayoutManagerHeight: layoutManagerHeight, + if (layoutManagerHeight != null) + kStorageDesktopLayoutManagerHeight: layoutManagerHeight, }); super.save(notifyListeners: notifyListeners); } diff --git a/lib/widgets/desktop_buttons.dart b/lib/widgets/desktop_buttons.dart index c9b861fb..2c1e99bc 100644 --- a/lib/widgets/desktop_buttons.dart +++ b/lib/widgets/desktop_buttons.dart @@ -132,6 +132,7 @@ class _WindowButtonsState extends State @override void dispose() { _animationController.dispose(); + dismissOverlayEntry(); super.dispose(); } @@ -405,9 +406,19 @@ class _WindowButtonsState extends State width: double.infinity, ), ); + } else { + /// If not in immersive mode, return the bar directly. + /// + /// The overlay is dismissed here because, if the overlay was not dismissed + /// when the immersive mode was enabled, the overlay would be shown on top + /// of the bar. It does nothing if the overlay is already dismissed. + return MouseRegion( + onExit: (_) { + dismissOverlayEntry(); + }, + child: bar, + ); } - - return bar; } OverlayEntry? _overlayEntry; @@ -452,6 +463,7 @@ class _WindowButtonsState extends State } Future dismissOverlayEntry() async { + Tooltip.dismissAllToolTips(); await _animationController.reverse(); _overlayEntry?.remove(); _overlayEntry = null; diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 584dc4f8..a5e5f681 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -14,7 +14,6 @@ import firebase_messaging import flutter_secure_storage_macos import fvp import local_auth_darwin -import media_kit_libs_macos_video import media_kit_video import package_info_plus import path_provider_foundation @@ -35,7 +34,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FvpPlugin.register(with: registry.registrar(forPlugin: "FvpPlugin")) FLALocalAuthPlugin.register(with: registry.registrar(forPlugin: "FLALocalAuthPlugin")) - MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin")) MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) diff --git a/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/macos/Flutter/ephemeral/Flutter-Generated.xcconfig index c6331a3a..07712619 100644 --- a/macos/Flutter/ephemeral/Flutter-Generated.xcconfig +++ b/macos/Flutter/ephemeral/Flutter-Generated.xcconfig @@ -2,11 +2,11 @@ FLUTTER_ROOT=/Users/user249455/Documents/development/flutter FLUTTER_APPLICATION_PATH=/Users/user249455/Documents/GitHub/unity COCOAPODS_PARALLEL_CODE_SIGN=true -FLUTTER_TARGET=lib/main.dart +FLUTTER_TARGET=/Users/user249455/Documents/GitHub/unity/lib/main.dart FLUTTER_BUILD_DIR=build FLUTTER_BUILD_NAME=3.0.022 FLUTTER_BUILD_NUMBER=3.0.022 DART_OBFUSCATION=false TRACK_WIDGET_CREATION=true -TREE_SHAKE_ICONS=true +TREE_SHAKE_ICONS=false PACKAGE_CONFIG=/Users/user249455/Documents/GitHub/unity/.dart_tool/package_config.json diff --git a/macos/Flutter/ephemeral/flutter_export_environment.sh b/macos/Flutter/ephemeral/flutter_export_environment.sh index 5f65520f..57757e89 100755 --- a/macos/Flutter/ephemeral/flutter_export_environment.sh +++ b/macos/Flutter/ephemeral/flutter_export_environment.sh @@ -3,11 +3,11 @@ export "FLUTTER_ROOT=/Users/user249455/Documents/development/flutter" export "FLUTTER_APPLICATION_PATH=/Users/user249455/Documents/GitHub/unity" export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_TARGET=lib/main.dart" +export "FLUTTER_TARGET=/Users/user249455/Documents/GitHub/unity/lib/main.dart" export "FLUTTER_BUILD_DIR=build" export "FLUTTER_BUILD_NAME=3.0.022" export "FLUTTER_BUILD_NUMBER=3.0.022" export "DART_OBFUSCATION=false" export "TRACK_WIDGET_CREATION=true" -export "TREE_SHAKE_ICONS=true" +export "TREE_SHAKE_ICONS=false" export "PACKAGE_CONFIG=/Users/user249455/Documents/GitHub/unity/.dart_tool/package_config.json" diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 5837acf9..1721ff63 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -598,14 +598,17 @@ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 21; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = Bluecherry; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - PRODUCT_BUNDLE_IDENTIFIER = com.bluecherrydvr; + MARKETING_VERSION = 3.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.bluecherry.bluecherry; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; @@ -734,14 +737,17 @@ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 21; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = Bluecherry; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - PRODUCT_BUNDLE_IDENTIFIER = com.bluecherrydvr; + MARKETING_VERSION = 3.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.bluecherry.bluecherry; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -757,14 +763,17 @@ CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 21; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = Bluecherry; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - PRODUCT_BUNDLE_IDENTIFIER = com.bluecherrydvr; + MARKETING_VERSION = 3.0.0; + PRODUCT_BUNDLE_IDENTIFIER = com.bluecherry.bluecherry; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index 5bffe6ed..1fbcb4ea 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -3,7 +3,7 @@ com.apple.security.app-sandbox - + com.apple.security.cs.allow-jit com.apple.security.network.client diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist index 895745e9..c474c75c 100644 --- a/macos/Runner/Info.plist +++ b/macos/Runner/Info.plist @@ -40,5 +40,7 @@ MainMenu NSPrincipalClass NSApplication + LSApplicationCategoryType + public.app-category.video diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index 87afd9a3..225aa48b 100644 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -3,7 +3,7 @@ com.apple.security.app-sandbox - + com.apple.security.network.client keychain-access-groups diff --git a/macos/ci_scripts/ci_post_clone.sh b/macos/ci_scripts/ci_post_clone.sh new file mode 100755 index 00000000..5426950e --- /dev/null +++ b/macos/ci_scripts/ci_post_clone.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# https://docs.flutter.dev/deployment/cd#post-clone-script +# Fail this script if any subcommand fails. +set -e + +# The default execution directory of this script is the ci_scripts directory. +cd $CI_PRIMARY_REPOSITORY_PATH # change working directory to the root of your cloned repo. + +# Install Flutter using git. +git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter +export PATH="$PATH:$HOME/flutter/bin" + +# Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms. +flutter precache --macos + +# Install Flutter dependencies. +flutter pub get + +# Install CocoaPods using Homebrew. +HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates. +brew install cocoapods + +# Build for macos +flutter build macos + +# Install CocoaPods dependencies. +cd macos && pod install # run `pod install` in the `macos` directory. + +exit 0 \ No newline at end of file diff --git a/packages/unity_video_player/unity_video_player_flutter/lib/unity_video_player_flutter.dart b/packages/unity_video_player/unity_video_player_flutter/lib/unity_video_player_flutter.dart index a8ae22c9..68ac0b74 100644 --- a/packages/unity_video_player/unity_video_player_flutter/lib/unity_video_player_flutter.dart +++ b/packages/unity_video_player/unity_video_player_flutter/lib/unity_video_player_flutter.dart @@ -204,11 +204,10 @@ class UnityVideoPlayerFlutter extends UnityVideoPlayer { if (autoPlay) { await player!.play(); } - } catch (e, _) { + } catch (e, stackTrace) { error = e.toString(); + _videoStream.addError(e, stackTrace); notifyListeners(); - - rethrow; } } @@ -277,7 +276,7 @@ class UnityVideoPlayerFlutter extends UnityVideoPlayer { @override Future release() async { - if (!kIsWeb && Platform.isLinux) { + if (!kIsWeb) { await pause(); await Future.delayed(const Duration(milliseconds: 150)); } diff --git a/packages/unity_video_player/unity_video_player_main/pubspec.yaml b/packages/unity_video_player/unity_video_player_main/pubspec.yaml index a1c8dd7e..2a0f7b5f 100644 --- a/packages/unity_video_player/unity_video_player_main/pubspec.yaml +++ b/packages/unity_video_player/unity_video_player_main/pubspec.yaml @@ -42,10 +42,10 @@ dependencies: # git: # url: https://github.com/media-kit/media-kit/ # path: libs/linux/media_kit_libs_linux - media_kit_libs_macos_video: - git: - url: https://github.com/media-kit/media-kit/ - path: libs/macos/media_kit_libs_macos_video + # media_kit_libs_macos_video: + # git: + # url: https://github.com/media-kit/media-kit/ + # path: libs/macos/media_kit_libs_macos_video media_kit_libs_windows_video: git: url: https://github.com/media-kit/media-kit/ diff --git a/pubspec.lock b/pubspec.lock index f038b76b..9f62704e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -671,15 +671,6 @@ packages: url: "https://github.com/media-kit/media-kit/" source: git version: "1.1.4" - media_kit_libs_macos_video: - dependency: transitive - description: - path: "libs/macos/media_kit_libs_macos_video" - ref: HEAD - resolved-ref: "0b7b7e4d88a0bc574550a929835e0400c7c2d135" - url: "https://github.com/media-kit/media-kit/" - source: git - version: "1.1.4" media_kit_libs_windows_video: dependency: transitive description: