abdelaziz-mahdy / flutter_meedu_videoplayer

Cross-Platform Video Player for flutter
https://abdelaziz-mahdy.github.io/flutter_meedu_videoplayer/
MIT License
142 stars 71 forks source link

Android? systemUImode #41

Closed MichalNemec closed 1 year ago

MichalNemec commented 1 year ago

Whenever the widget is present, it automatically hides statusbar and bottom bar. Is there a way to disable that?

abdelaziz-mahdy commented 1 year ago

Changing screen manager edge to edge should enable and disable this feature

MichalNemec commented 1 year ago

Setting this still does it.

    screenManager: const ScreenManager(edgeToedge: false, forceLandScapeInFullscreen: false),

it seems its because of this code. It does not expose manual or "left untouched"

Future<void> setOverlays(bool visible) async {
    //await SystemChrome.setPreferredOrientations(this.orientations);
    if (visible) {
      await SystemChrome.setEnabledSystemUIMode(
          edgeToedge ? SystemUiMode.edgeToEdge : SystemUiMode.immersive, //<---- here
          overlays: overlays);
    } else {
      //print("Closed2");
      await SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
          overlays: []);
    }
    //}
  }
abdelaziz-mahdy commented 1 year ago

Will add option to just leave it as it is

Right now I am working on fixing macos and iOS compilation in a new version.

abdelaziz-mahdy commented 1 year ago

@MichalNemec are you using iOS or macos?

I can add the things you need until media_kit fixes the macos and iOS problems they have.

But you can use it only if you don't use iOS and macos😢

MichalNemec commented 1 year ago

yes, i have access to macbook air m1 and ios (simulator), because i didnt pay licence yet. If it helps you in development, then i can be testing subject. If you dont need it, then i can wait. Videos for us are not that important yet.

abdelaziz-mahdy commented 1 year ago

Can you test add platforms branch ?

On macos or iOS

It fails in GitHub actions

MichalNemec commented 1 year ago
flutter_meedu_videoplayer: #^4.0.7
    git:
      url: https://github.com/zezo357/flutter_meedu_videoplayer.git
      path: package
      branch: adding-platforms
=======
Launching lib/main.dart on macOS in debug mode...
main.dart:1
CocoaPods' output:
↳
      Preparing
    Analyzing dependencies
    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
    Fetching external sources
    -> Fetching podspec for `FlutterMacOS` from `Flutter/ephemeral`
    -> Fetching podspec for `bitsdojo_window_macos` from `Flutter/ephemeral/.symlinks/plugins/bitsdojo_window_macos/macos`
    -> Fetching podspec for `catcher` from `Flutter/ephemeral/.symlinks/plugins/catcher/macos`
    -> Fetching podspec for `connectivity_plus` from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos`
    -> Fetching podspec for `device_info_plus` from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`
    -> Fetching podspec for `flutter_local_authentication` from `Flutter/ephemeral/.symlinks/plugins/flutter_local_authentication/macos`
    -> Fetching podspec for `flutter_meedu_videoplayer` from `Flutter/ephemeral/.symlinks/plugins/flutter_meedu_videoplayer/macos`
    [!] No podspec found for `flutter_meedu_videoplayer` in `Flutter/ephemeral/.symlinks/plugins/flutter_meedu_videoplayer/macos`
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/external_sources/path_source.rb:14:in `block in fetch'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:997:in `fetch_external_source'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:976:in `block (2 levels) in fetch_external_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:975:in `each'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:975:in `block in fetch_external_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:974:in `fetch_external_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:118:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:422:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:162:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/command/install.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'
Exception: Error running pod install
Exited
abdelaziz-mahdy commented 1 year ago

Yep same error, I guess I will wait for a fix from their side then.

Thank you very much ❤️

MichalNemec commented 1 year ago

Yep same error, I guess I will wait for a fix from their side then.

Thank you very much ❤️

no problem, glad to help!

isnt it that this is missing on your side? https://github.com/alexmercerind/media_kit/blob/main/media_kit_libs_macos_video/macos/media_kit_libs_macos_video.podspec

abdelaziz-mahdy commented 1 year ago

Yes I added it in the example, since I was testing the possibility of it being not direct dependencies that may be causing my problem

abdelaziz-mahdy commented 1 year ago

can you test on flutter_meedu_videoplayer: ^4.0.9-dev.1

  final _meeduPlayerController = MeeduPlayerController(
      controlsStyle: ControlsStyle.primary,
      screenManager: ScreenManager(hideSystemOverlay: false));
MichalNemec commented 1 year ago

works as intended.

abdelaziz-mahdy commented 1 year ago

fixed on 4.0.9