abdelaziz-mahdy / flutter_meedu_videoplayer

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

Pleas test before releasing to pub.dev (r >=4.0.0) #38

Closed imdatceleste closed 1 year ago

imdatceleste commented 1 year ago

macOS: doesn't compile because Pod-ref is missing or Pod is not in CocoaPods.

abdelaziz-mahdy commented 1 year ago

macOS: doesn't compile because Pod-ref is missing or Pod is not in CocoaPods.

I can't test macos, since I don't have a MacBook

But will do GitHub actions for that case.

And will try to fix the macos error.

Sorry for any inconveniences.

imdatceleste commented 1 year ago

Ok, no worries. I went back to 3.x.y for now.

I may be able to test whether it compiles, but currently I don't use your repo for playing videos on macOS, only on Windows. I could, theoretically, switch to using this repo, but as long as I can't compile 🀷🏻

MichalNemec commented 1 year ago

Whoops, sorry about duplicate. I just tried to install it, because it looks awesome.

abdelaziz-mahdy commented 1 year ago

Whoops, sorry about duplicate. I just tried to install it, because it looks awesome.

sry for that problem i did add github actions to be sure that everything is working correclty (to make that doesnt happen again) and checking with media_kit package why the code fails to compile

hope we get it fixed soon.

abdelaziz-mahdy commented 1 year ago

@MichalNemec @imdatsolak can you guys check 4.0.8?

also check readme for steps for macos and ios.

if there is a problem let me know

MichalNemec commented 1 year ago

macos works. sound and fullscreen is broken tho. ios just cannot get it to run. first i had issues with

Error (Xcode): File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

Could not build the application for the simulator.

and now i have issues with wakelock

Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/x/.pub-cache/hosted/pub.dev/wakelock-0.6.2/ios/Classes/WakelockPlugin.h:0:8

Could not build the application for the simulator.
Error launching application on iPhone 14 Pro.

after fixing that i have, which i cant fix

Analyzing dependencies
make: Nothing to be done for `all'.
make: Nothing to be done for `all'.
[!] CocoaPods could not find compatible versions for pod "media_kit_libs_ios_video":
  In Podfile:
    media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)

Specs satisfying the `media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)` dependency were found, but they required a higher minimum deployment target.

these are overrides i did

dependency_overrides:
  media_kit:
    git:
      url: https://github.com/zezo357/media_kit
      ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
      path: ./media_kit
  media_kit_video:
    git:
      url: https://github.com/zezo357/media_kit
      ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
      path: ./media_kit_video
  media_kit_libs_ios_video:
    git:
      url: https://github.com/zezo357/media_kit
      ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
      path: ./media_kit_libs_ios_video
  media_kit_native_event_loop:
    git:
      url: https://github.com/zezo357/media_kit
      ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
      path: ./media_kit_native_event_loop
  media_kit_libs_macos_video:
    git:
      url: https://github.com/zezo357/media_kit
      ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
      path: ./media_kit_libs_macos_video
  intl: 0.18.0
  visibility_detector: 0.4.0+2
  wakelock: 0.6.2
abdelaziz-mahdy commented 1 year ago

macos works. sound and fullscreen is broken tho. ios just cannot get it to run. first i had issues with

Error (Xcode): File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

Could not build the application for the simulator.

and now i have issues with wakelock

Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/x/.pub-cache/hosted/pub.dev/wakelock-0.6.2/ios/Classes/WakelockPlugin.h:0:8

Could not build the application for the simulator.
Error launching application on iPhone 14 Pro.

after fixing that i have, which i cant fix

Analyzing dependencies
make: Nothing to be done for `all'.
make: Nothing to be done for `all'.
[!] CocoaPods could not find compatible versions for pod "media_kit_libs_ios_video":
  In Podfile:
    media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)

Specs satisfying the `media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)` dependency were found, but they required a higher minimum deployment target.

these are overrides i did

dependency_overrides:
  media_kit:
    git:
      url: https://github.com/zezo357/media_kit
      ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
      path: ./media_kit
  media_kit_video:
    git:
      url: https://github.com/zezo357/media_kit
      ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
      path: ./media_kit_video
  media_kit_libs_ios_video:
    git:
      url: https://github.com/zezo357/media_kit
      ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
      path: ./media_kit_libs_ios_video
  media_kit_native_event_loop:
    git:
      url: https://github.com/zezo357/media_kit
      ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
      path: ./media_kit_native_event_loop
  media_kit_libs_macos_video:
    git:
      url: https://github.com/zezo357/media_kit
      ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
      path: ./media_kit_libs_macos_video
  intl: 0.18.0
  visibility_detector: 0.4.0+2
  wakelock: 0.6.2

For macos, can you send logs for errors for sound and full screen?

For iOS, did you update the IPHONEOS_DEPLOYMENT_TARGET to 13?

If yes, can you add media_kit_libs_ios_video: ^1.0.0 # iOS package for video (& audio) native libraries. To dependencies too?

imdatceleste commented 1 year ago

Once I have fixed my dev-environment, I'll start testing as well.

Just an FYI: I have forked this to test some stuff. You don't need to publish to pub.dev for testing, we can directly point to github.

abdelaziz-mahdy commented 1 year ago

Once I have fixed my dev-environment, I'll start testing as well.

Just an FYI: I have forked this to test some stuff. You don't need to publish to pub.dev for testing, we can directly point to github.

Yeah, I wanted to test something for pub.dev (if you checked now it shows no platforms πŸ˜‚)

So I will do another fix for that but wanted to be sure that you guys don't have any problems, before I start working on that.

MichalNemec commented 1 year ago

For macos, can you send logs for errors for sound and full screen?

For iOS, did you update the IPHONEOS_DEPLOYMENT_TARGET to 13?

If yes, can you add media_kit_libs_ios_video: ^1.0.0 # iOS package for video (& audio) native libraries. To dependencies too?

Using BasicExamplePage

Build log ``` # 1 "" 1 ^ :20:9: warning: 'POD_CONFIGURATION_DEBUG' macro redefined #define POD_CONFIGURATION_DEBUG 1 DEBUG=1 ^ #define POD_CONFIGURATION_DEBUG 1 ^ # 1 "" 1 ^ :20:9: warning: 'POD_CONFIGURATION_DEBUG' macro redefined #define POD_CONFIGURATION_DEBUG 1 DEBUG=1 ^ #define POD_CONFIGURATION_DEBUG 1 ^ # 1 "" 1 ^ :20:9: warning: 'POD_CONFIGURATION_DEBUG' macro redefined #define POD_CONFIGURATION_DEBUG 1 DEBUG=1 ^ #define POD_CONFIGURATION_DEBUG 1 ^ # 1 "" 1 ^ :20:9: warning: 'POD_CONFIGURATION_DEBUG' macro redefined #define POD_CONFIGURATION_DEBUG 1 DEBUG=1 ^ #define POD_CONFIGURATION_DEBUG 1 ^ error: the following command failed with exit code 0 but produced no further output SwiftCompile normal arm64 /Users/michalnemec/development/minimal/macos/Flutter/GeneratedPluginRegistrant.swift (in target 'Runner' from project 'Runner') Connecting to VM Service at ws://127.0.0.1:64014/cWiKLlke2UU=/ws ```
turning on/off sound visual weirdness. When i click mute sound, sometimes the controls hide straight away. ``` flutter: Fit is BoxFit.fill 2023-04-02 14:12:52.487 minimal[94698:30051069] VideoOutput: enableHardwareAcceleration: true flutter: Last fit used was fill flutter: VideoOutput.Resize flutter: {handle: 5780405168, id: 5781067776, rect: {width: 0.0, left: 0.0, height: 0.0, top: 0.0}} flutter: VideoController: Texture ID: 5781067776 flutter: Fit is BoxFit.fill flutter: Duration is 0:00:30.030000 flutter: Fit is BoxFit.fill 2023-04-02 14:12:53.670 minimal[94698:30051069] TextureGL: resize: 1280.0x688.0 flutter: VideoOutput.Resize flutter: {handle: 5780405168, id: 5781067776, rect: {left: 0.0, width: 1280.0, height: 688.0, top: 0.0}} flutter: volume is 0.0 flutter: volume is 1.0 ```
image
Fullscreen on ``` lutter: _____________________hidden here 0____________________________ 2 flutter: Fit is BoxFit.fill 1 HIToolbox 0x00000001a2b3c5c8 _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 120 2 HIToolbox 0x00000001a2b3c188 _ZN15MenuBarInstance14EnableAutoShowEv + 60 3 HIToolbox 0x00000001a2aa98bc _ZN15MenuBarInstance21UpdateAggregateUIModeE21MenuBarAnimationStylehhh + 1184 4 HIToolbox 0x00000001a2b3c004 _ZN15MenuBarInstance19SetFullScreenUIModeEjj + 180 5 AppKit 0x000000019c92bd30 -[NSApplication _setPresentationOptions:instance:flags:] + 956 6 AppKit 0x000000019c7c193c -[NSApplication _updateFullScreenPresentationOptionsForInstance:] + 404 7 CoreFoundation 0x00000001993de560 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 8 CoreFoundation 0x000000019947c044 ___CFXRegistrationPost_block_invoke + 88 9 CoreFoundation 0x000000019947bf8c _CFXRegistrationPost + 440 10 CoreFoundation 0x00000001993afb64 _CFXNotificationPost + 708 11 Foundation 0x000000019a29f38c -[NSNotificationCenter postNotificationName:object:userInfo:] + 88 12 AppKit 0x000000019c92c2b4 spacesNotificationHandler + 96 13 SkyLight 0x000000019e019214 _ZN12_GLOBAL__N_123notify_datagram_handlerEj15CGSDatagramTypePvmS1_ + 896 14 SkyLight 0x000000019e3454d4 _ZN21CGSDatagramReadStream26dispatchMainQueueDatagramsEv + 228 15 SkyLight 0x000000019e3453d0 ___ZN21CGSDatagramReadStream15mainQueueWakeupEv_block_invoke + 28 16 libdispatch.dylib 0x00000001991809dc _dispatch_call_block_and_release + 32 17 libdispatch.dylib 0x0000000199182504 _dispatch_client_callout + 20 18 libdispatch.dylib 0x0000000199190d1c _dispatch_main_queue_drain + 928 19 libdispatch.dylib 0x000000019919096c _dispatch_main_queue_callback_4CF + 44 20 CoreFoundation 0x000000019942ad40 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 21 CoreFoundation 0x00000001993e87c0 __CFRunLoopRun + 2036 22 CoreFoundation 0x00000001993e7878 CFRunLoopRunSpecific + 612 23 HIToolbox 0x00000001a2ac7fa0 RunCurrentEventLoopInMode + 292 24 HIToolbox 0x00000001a2ac7de4 ReceiveNextEventCommon + 672 25 HIToolbox 0x00000001a2ac7b2c _BlockUntilNextEventMatchingListInModeWithFilter + 72 26 AppKit 0x000000019c66d84c _DPSNextEvent + 632 27 AppKit 0x000000019c66c9dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728 ```
Fullscreen off ``` 3 HIToolbox 0x00000001a2b3d0b0 _ZN15MenuBarInstanceD2Ev + 128 4 HIToolbox 0x00000001a2b3cee0 _ZN15MenuBarInstance7ReleaseEv + 56 5 AppKit 0x000000019ccc94dc -[NSHIPresentationInstance discard] + 228 6 AppKit 0x000000019d0888b4 -[_NSFullScreenSpace(PresentationInstance) discardPresentationInstance] + 32 7 AppKit 0x000000019d08890c -[_NSFullScreenSpace(PresentationInstance) activateFullScreenPresentationOptions] + 64 8 AppKit 0x000000019cee2968 -[_NSExitFullScreenTransitionController _doSucceededToExitFullScreen] + 40 9 AppKit 0x000000019cee3440 __63-[_NSExitFullScreenTransitionController _performExitFullScreen]_block_invoke + 236 10 libxpc.dylib 0x000000019907a42c _xpc_connection_reply_callout + 124 11 libxpc.dylib 0x000000019907a31c _xpc_connection_call_reply_async + 88 12 libdispatch.dylib 0x0000000199182584 _dispatch_client_callout3 + 20 13 libdispatch.dylib 0x00000001991a0710 _dispatch_mach_msg_async_reply_invoke + 344 14 libdispatch.dylib 0x0000000199190c70 _dispatch_main_queue_drain + 756 15 libdispatch.dylib 0x000000019919096c _dispatch_main_queue_callback_4CF + 44 16 CoreFoundation 0x000000019942ad40 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 17 CoreFoundation 0x00000001993e87c0 __CFRunLoopRun + 2036 18 CoreFoundation 0x00000001993e7878 CFRunLoopRunSpecific + 612 19 HIToolbox 0x00000001a2ac7fa0 RunCurrentEventLoopInMode + 292 20 HIToolbox 0x00000001a2ac7de4 ReceiveNextEventCommon + 672 21 HIToolbox 0x00000001a2ac7b2c _BlockUntilNextEventMatchingListInModeWithFilter + 72 22 AppKit 0x000000019c66d84c _DPSNextEvent + 632 23 AppKit 0x000000019c66c9dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728 24 AppKit 0x000000019c660e0c -[NSApplication run] + 464 25 AppKit 0x000000019c638250 NSApplicationMain + 880 26 minimal 0x0000000100dd176c main + 12 27 dyld 0x0000000198fdfe50 start + 2544 flutter: _____________________hidden here 0____________________________ flutter: VideoOutput.Resize flutter: {handle: 5780405168, rect: {left: 0.0, top: 0.0, width: 0.0, height: 0.0}, id: 5781067776} 2023-04-02 14:16:43.159 minimal[94698:30051069] TextureGL: resize: 1280.0x688.0 flutter: VideoOutput.Resize flutter: {id: 5781067776, handle: 5780405168, rect: {width: 1280.0, left: 0.0, height: 688.0, top: 0.0}} ```

if i click replay again, it doesnt start, i have to click pause and play to start over.

MichalNemec commented 1 year ago

if i do this code, then fullscreen doesnt expand the video itself.

Scaffold(
      body: SafeArea(
        child: Column(
          children: [
            SizedBox(
              width: 500,
              child: AspectRatio(
                aspectRatio: 16 / 9,
                child: MeeduVideoPlayer(
                  controller: _meeduPlayerController,
                ),
              ),
            ),
          ],
        ),
      ),
    );
abdelaziz-mahdy commented 1 year ago

if i do this code, then fullscreen doesnt expand the video itself.

Scaffold(
      body: SafeArea(
        child: Column(
          children: [
            SizedBox(
              width: 500,
              child: AspectRatio(
                aspectRatio: 16 / 9,
                child: MeeduVideoPlayer(
                  controller: _meeduPlayerController,
                ),
              ),
            ),
          ],
        ),
      ),
    );

for this you are limiting the width to 500 so i think yeah it shouldnt expand :)

abdelaziz-mahdy commented 1 year ago

For macos, can you send logs for errors for sound and full screen? For iOS, did you update the IPHONEOS_DEPLOYMENT_TARGET to 13? If yes, can you add media_kit_libs_ios_video: ^1.0.0 # iOS package for video (& audio) native libraries. To dependencies too?

Using BasicExamplePage

Build log # 1 "" 1 ^ :20:9: warning: 'POD_CONFIGURATION_DEBUG' macro redefined #define POD_CONFIGURATION_DEBUG 1 DEBUG=1 ^ #define POD_CONFIGURATION_DEBUG 1 ^ # 1 "" 1 ^ :20:9: warning: 'POD_CONFIGURATION_DEBUG' macro redefined #define POD_CONFIGURATION_DEBUG 1 DEBUG=1 ^ #define POD_CONFIGURATION_DEBUG 1 ^ # 1 "" 1 ^ :20:9: warning: 'POD_CONFIGURATION_DEBUG' macro redefined #define POD_CONFIGURATION_DEBUG 1 DEBUG=1 ^ #define POD_CONFIGURATION_DEBUG 1 ^ # 1 "" 1 ^ :20:9: warning: 'POD_CONFIGURATION_DEBUG' macro redefined #define POD_CONFIGURATION_DEBUG 1 DEBUG=1 ^ #define POD_CONFIGURATION_DEBUG 1 ^ error: the following command failed with exit code 0 but produced no further output SwiftCompile normal arm64 /Users/michalnemec/development/minimal/macos/Flutter/GeneratedPluginRegistrant.swift (in target 'Runner' from project 'Runner') Connecting to VM Service at ws://127.0.0.1:64014/cWiKLlke2UU=/ws turning on/off sound visual weirdness. When i click mute sound, sometimes the controls hide straight away. flutter: Fit is BoxFit.fill 2023-04-02 14:12:52.487 minimal[94698:30051069] VideoOutput: enableHardwareAcceleration: true flutter: Last fit used was fill flutter: VideoOutput.Resize flutter: {handle: 5780405168, id: 5781067776, rect: {width: 0.0, left: 0.0, height: 0.0, top: 0.0}} flutter: VideoController: Texture ID: 5781067776 flutter: Fit is BoxFit.fill flutter: Duration is 0:00:30.030000 flutter: Fit is BoxFit.fill 2023-04-02 14:12:53.670 minimal[94698:30051069] TextureGL: resize: 1280.0x688.0 flutter: VideoOutput.Resize flutter: {handle: 5780405168, id: 5781067776, rect: {left: 0.0, width: 1280.0, height: 688.0, top: 0.0}} flutter: volume is 0.0 flutter: volume is 1.0

image

Fullscreen on lutter: _____________________hidden here 0____________________________ 2 flutter: Fit is BoxFit.fill 1 HIToolbox 0x00000001a2b3c5c8 _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 120 2 HIToolbox 0x00000001a2b3c188 _ZN15MenuBarInstance14EnableAutoShowEv + 60 3 HIToolbox 0x00000001a2aa98bc _ZN15MenuBarInstance21UpdateAggregateUIModeE21MenuBarAnimationStylehhh + 1184 4 HIToolbox 0x00000001a2b3c004 _ZN15MenuBarInstance19SetFullScreenUIModeEjj + 180 5 AppKit 0x000000019c92bd30 -[NSApplication _setPresentationOptions:instance🎏] + 956 6 AppKit 0x000000019c7c193c -[NSApplication _updateFullScreenPresentationOptionsForInstance:] + 404 7 CoreFoundation 0x00000001993de560 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 8 CoreFoundation 0x000000019947c044 ___CFXRegistrationPost_block_invoke + 88 9 CoreFoundation 0x000000019947bf8c _CFXRegistrationPost + 440 10 CoreFoundation 0x00000001993afb64 _CFXNotificationPost + 708 11 Foundation 0x000000019a29f38c -[NSNotificationCenter postNotificationName:object:userInfo:] + 88 12 AppKit 0x000000019c92c2b4 spacesNotificationHandler + 96 13 SkyLight 0x000000019e019214 _ZN12_GLOBAL__N_123notify_datagram_handlerEj15CGSDatagramTypePvmS1_ + 896 14 SkyLight 0x000000019e3454d4 _ZN21CGSDatagramReadStream26dispatchMainQueueDatagramsEv + 228 15 SkyLight 0x000000019e3453d0 ___ZN21CGSDatagramReadStream15mainQueueWakeupEv_block_invoke + 28 16 libdispatch.dylib 0x00000001991809dc _dispatch_call_block_and_release + 32 17 libdispatch.dylib 0x0000000199182504 _dispatch_client_callout + 20 18 libdispatch.dylib 0x0000000199190d1c _dispatch_main_queue_drain + 928 19 libdispatch.dylib 0x000000019919096c _dispatch_main_queue_callback_4CF + 44 20 CoreFoundation 0x000000019942ad40 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 21 CoreFoundation 0x00000001993e87c0 __CFRunLoopRun + 2036 22 CoreFoundation 0x00000001993e7878 CFRunLoopRunSpecific + 612 23 HIToolbox 0x00000001a2ac7fa0 RunCurrentEventLoopInMode + 292 24 HIToolbox 0x00000001a2ac7de4 ReceiveNextEventCommon + 672 25 HIToolbox 0x00000001a2ac7b2c _BlockUntilNextEventMatchingListInModeWithFilter + 72 26 AppKit 0x000000019c66d84c _DPSNextEvent + 632 27 AppKit 0x000000019c66c9dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728 Fullscreen off 3 HIToolbox 0x00000001a2b3d0b0 _ZN15MenuBarInstanceD2Ev + 128 4 HIToolbox 0x00000001a2b3cee0 _ZN15MenuBarInstance7ReleaseEv + 56 5 AppKit 0x000000019ccc94dc -[NSHIPresentationInstance discard] + 228 6 AppKit 0x000000019d0888b4 -[_NSFullScreenSpace(PresentationInstance) discardPresentationInstance] + 32 7 AppKit 0x000000019d08890c -[_NSFullScreenSpace(PresentationInstance) activateFullScreenPresentationOptions] + 64 8 AppKit 0x000000019cee2968 -[_NSExitFullScreenTransitionController _doSucceededToExitFullScreen] + 40 9 AppKit 0x000000019cee3440 __63-[_NSExitFullScreenTransitionController _performExitFullScreen]_block_invoke + 236 10 libxpc.dylib 0x000000019907a42c _xpc_connection_reply_callout + 124 11 libxpc.dylib 0x000000019907a31c _xpc_connection_call_reply_async + 88 12 libdispatch.dylib 0x0000000199182584 _dispatch_client_callout3 + 20 13 libdispatch.dylib 0x00000001991a0710 _dispatch_mach_msg_async_reply_invoke + 344 14 libdispatch.dylib 0x0000000199190c70 _dispatch_main_queue_drain + 756 15 libdispatch.dylib 0x000000019919096c _dispatch_main_queue_callback_4CF + 44 16 CoreFoundation 0x000000019942ad40 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 17 CoreFoundation 0x00000001993e87c0 __CFRunLoopRun + 2036 18 CoreFoundation 0x00000001993e7878 CFRunLoopRunSpecific + 612 19 HIToolbox 0x00000001a2ac7fa0 RunCurrentEventLoopInMode + 292 20 HIToolbox 0x00000001a2ac7de4 ReceiveNextEventCommon + 672 21 HIToolbox 0x00000001a2ac7b2c _BlockUntilNextEventMatchingListInModeWithFilter + 72 22 AppKit 0x000000019c66d84c _DPSNextEvent + 632 23 AppKit 0x000000019c66c9dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728 24 AppKit 0x000000019c660e0c -[NSApplication run] + 464 25 AppKit 0x000000019c638250 NSApplicationMain + 880 26 minimal 0x0000000100dd176c main + 12 27 dyld 0x0000000198fdfe50 start + 2544 flutter: _____________________hidden here 0____________________________ flutter: VideoOutput.Resize flutter: {handle: 5780405168, rect: {left: 0.0, top: 0.0, width: 0.0, height: 0.0}, id: 5781067776} 2023-04-02 14:16:43.159 minimal[94698:30051069] TextureGL: resize: 1280.0x688.0 flutter: VideoOutput.Resize flutter: {id: 5781067776, handle: 5780405168, rect: {width: 1280.0, left: 0.0, height: 688.0, top: 0.0}} if i click replay again, it doesnt start, i have to click pause and play to start over.

for the replay i am still working on improving it

and for the controlls being hidden i will check that out

MichalNemec commented 1 year ago

if i do this code, then fullscreen doesnt expand the video itself.

Scaffold(
      body: SafeArea(
        child: Column(
          children: [
            SizedBox(
              width: 500,
              child: AspectRatio(
                aspectRatio: 16 / 9,
                child: MeeduVideoPlayer(
                  controller: _meeduPlayerController,
                ),
              ),
            ),
          ],
        ),
      ),
    );

for this you are limiting the width to 500 so i think yeah it shouldnt expand :)

With this behavior of fullscreen, it seems like the fullscreen button just expands the page, instead of expanding the video, which doesnt make sense. it should make just the video fullscreen. Imagine grid of videos, which you can play, then press fullscreen and it just expands the grid.

MichalNemec commented 1 year ago

IOS target is 13.0

Launching lib/main.dart on iPhone 14 Pro in debug mode...
main.dart:1
Xcode build done.                                            6.7s
Connecting to VM Service at ws://127.0.0.1:53611/_jTZQZpbZHY=/ws
flutter: Fit is BoxFit.fill
flutter: Last fit used was fill
flutter: VideoOutput.Resize
flutter: {id: 0, rect: {top: 0.0, left: 0.0, height: 0.0, width: 0.0}, handle: 5512491008}
flutter: VideoController: Texture ID: 0
flutter: Fit is BoxFit.fill
flutter: Duration is 0:00:30.030000
flutter: Fit is BoxFit.fill
media_kit_video/OpenGLESHelpers.swift:69: Assertion failed: CVOpenGLESTextureCacheCreateTextureFromImage
Lost connection to device.
Exited

it just tries to open the app and then "crashes" and getting Runner quit unexpectedly.

abdelaziz-mahdy commented 1 year ago

if i do this code, then fullscreen doesnt expand the video itself.

Scaffold(
      body: SafeArea(
        child: Column(
          children: [
            SizedBox(
              width: 500,
              child: AspectRatio(
                aspectRatio: 16 / 9,
                child: MeeduVideoPlayer(
                  controller: _meeduPlayerController,
                ),
              ),
            ),
          ],
        ),
      ),
    );

for this you are limiting the width to 500 so i think yeah it shouldnt expand :)

With this behavior of fullscreen, it seems like the fullscreen button just expands the page, instead of expanding the video, which doesnt make sense. it should make just the video fullscreen. Imagine grid of videos, which you can play, then press fullscreen and it just expands the grid.

For this I will assume the Fullscreen, should open a new page with only video player in it, this is what you mean right?

If that's the case then it's logical, will check what can be done

MichalNemec commented 1 year ago

Yes, i assume it opens only video in fullscreen.

this is when running xcode, to show more issues regarding ios

image
abdelaziz-mahdy commented 1 year ago

IOS target is 13.0

Launching lib/main.dart on iPhone 14 Pro in debug mode...
main.dart:1
Xcode build done.                                            6.7s
Connecting to VM Service at ws://127.0.0.1:53611/_jTZQZpbZHY=/ws
flutter: Fit is BoxFit.fill
flutter: Last fit used was fill
flutter: VideoOutput.Resize
flutter: {id: 0, rect: {top: 0.0, left: 0.0, height: 0.0, width: 0.0}, handle: 5512491008}
flutter: VideoController: Texture ID: 0
flutter: Fit is BoxFit.fill
flutter: Duration is 0:00:30.030000
flutter: Fit is BoxFit.fill
media_kit_video/OpenGLESHelpers.swift:69: Assertion failed: CVOpenGLESTextureCacheCreateTextureFromImage
Lost connection to device.
Exited

it just tries to open the app and then "crashes" and getting Runner quit unexpectedly.

I guess dependencies overrides are not working correctly πŸ₯², I am very sorry for that since I can't test iOS and macos

MichalNemec commented 1 year ago

no problem, thats why im here hehe, if you have discord or something, it will be much easier to nail it down.

abdelaziz-mahdy commented 1 year ago

Yes, i assume it opens only video in fullscreen.

this is when running xcode, to show more issues regarding ios

image

I am sorry, but can you try media_kit on iOS and see if it's a problem on their side too

abdelaziz-mahdy commented 1 year ago

no problem, thats why im here hehe, if you have discord or something, it will be much easier to nail it down.

Yes,

zezo#3464

imdatceleste commented 1 year ago

So, In my case, it works on macOS (Ventura) as well as on an iPhone X.

I'm directly getting what you have here on GitHub, not going through pub.dev atm.

NOTE: I have NOT added the dependency override on iOS, but only on macOS!

abdelaziz-mahdy commented 1 year ago

So, In my case, it works on macOS (Ventura) as well as on an iPhone X.

  • Fullscreen on macOS: fine!
  • Fullscreen on iOS: works only in landscape mode, otherwise nothing happens when i hit on the fullscreen button...

I'm directly getting what you have here on GitHub, not going through pub.dev atm.

NOTE: I have NOT added the dependency override on iOS, but only on macOS!

yes the macOS is whats needed, but media_kit ios will not get approved on app store this is why i used the dependency override

can you explain otherwise nothing happens when i hit on the fullscreen button... in which example did that happen with

imdatceleste commented 1 year ago

So, In my case, it works on macOS (Ventura) as well as on an iPhone X.

  • Fullscreen on macOS: fine!
  • Fullscreen on iOS: works only in landscape mode, otherwise nothing happens when i hit on the fullscreen button...

I'm directly getting what you have here on GitHub, not going through pub.dev atm. NOTE: I have NOT added the dependency override on iOS, but only on macOS!

yes the macOS is whats needed, but media_kit ios will not get approved on app store this is why i used the dependency override

can you explain otherwise nothing happens when i hit on the fullscreen button... in which example did that happen with

I am not using your examples, I am actually testing this in complete app.

So, here is the code that displays the meedu-player on most of all platforms for this testing purpose (except Android):

import 'dart:io';

import 'package:cicero/functions/file_functions.dart';
import 'package:flutter/material.dart';
import 'package:flutter_meedu_videoplayer/meedu_player.dart';
import 'package:logging/logging.dart';

var _log = Logger("WindowsVideoPlayer");
const List<String> _kSupportedFileTypes = [
  ".mp4",
  ".mov",
  ".avi",
  ".mpg",
  ".mpeg",
  ".wmv",
  ".mkv",
  ".heic",
];

class WindowsVideoPlayer extends StatefulWidget {
  final String filename;

  static bool isSupportedFileFormat(String filename) {
    return !Platform.isAndroid &&
        _kSupportedFileTypes.contains(ccFileExtension(filename));
  }

  const WindowsVideoPlayer({
    super.key,
    required this.filename,
  });

  @override
  State<WindowsVideoPlayer> createState() => _WindowsVideoPlayerState();
}

class _WindowsVideoPlayerState extends State<WindowsVideoPlayer> {
  final _controller = MeeduPlayerController(
    controlsStyle: ControlsStyle.primary,
    enabledButtons: EnabledButtons(
      playPauseAndRepeat: true,
      rewindAndfastForward: true,
      videoFit: true,
      muteAndSound: true,
      pip: false,
      fullscreen: !Platform.isWindows,
      playBackSpeed: true,
    ),
  );

  @override
  initState() {
    super.initState();
  }

  _loadVideo() async {
    String filename = widget.filename;
    if (Platform.isWindows) {
      filename = filename.replaceAll("/", "\\");
    }
    if (await File(filename).exists()) {
      _log.info("LoadVideo : $filename");
      _controller.setDataSource(
        DataSource(
          type: DataSourceType.file,
          file: File(filename),
        ),
        autoplay: false,
      );
    } else {
      _log.shout("File $filename does NOT EXIST!!!");
    }
  }

  @override
  dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    WidgetsBinding.instance.addPostFrameCallback((_) {
      _loadVideo();
    });
    return Center(
      child: Padding(
        padding: const EdgeInsets.symmetric(vertical: 24, horizontal: 32),
        child: AspectRatio(
          aspectRatio: 16 / 9,
          child: MeeduVideoPlayer(controller: _controller),
        ),
      ),
    );
  }
}

When I am in portait-mode, touching on "full-screen" just hides the controls. When I switch to landscape mode, it works without problems.

I can switch to landscape mode, touch on "fullscreen" and then switch to portrait mode and the fullscreen stays. I can then touch on "fullscreen off" in portrait mode and it works fine.

imdatceleste commented 1 year ago

Ok, let's go back on this: it sometimes works, and sometimes doesn't - but I don't think it is a bug. It seems an issue with touch sensitivity on the devices, so you can ignore it - sorry for bothering.

abdelaziz-mahdy commented 1 year ago

Ok, let's go back on this: it sometimes works, and sometimes doesn't - but I don't think it is a bug. It seems an issue with touch sensitivity on the devices, so you can ignore it - sorry for bothering.

will check it too, just to be sure

imdatceleste commented 1 year ago

So, for iOS and macOS we're fine now. I can't test on Windows today, but that should be tested as well.

The question is whether mediakit-License is GPL or LGPL. If it is GPL, like VLC was, I can't actually use it at all :-(

abdelaziz-mahdy commented 1 year ago

So, for iOS and macOS we're fine now. I can't test on Windows today, but that should be tested as well.

The question is whether mediakit-License is GPL or LGPL. If it is GPL, like VLC was, I can't actually use it at all :-(

MIT, from their pub. Will that work?

imdatceleste commented 1 year ago

Definitely, MIT is fine. Thanks

abdelaziz-mahdy commented 1 year ago

flutter_meedu_videoplayer: ^4.0.9-dev.1

this will be the new release when media_kit publishes the fixes

@MichalNemec can you test the replay, it fixed on it too

incase of another feature you want let me know to add it in this release

the only thing missing right now i making the fullscreen button open a new page with only video player (will make it an option)

imdatceleste commented 1 year ago

BTW: Thanks for your great effort. Very much appreciated.

If I can buy you a ko-fi, let me know please.

abdelaziz-mahdy commented 1 year ago

BTW: Thanks for your great effort. Very much appreciated.

If I can buy you a ko-fi, let me know please.

I found two websites

Buy me a coffee And ko-fi

Do you know which is better?

From online blogs they are the same only small differences , but most people use buy me a coffee, and you said ko-fi. So I am confused πŸ˜…

imdatceleste commented 1 year ago

BTW: Thanks for your great effort. Very much appreciated. If I can buy you a ko-fi, let me know please.

I found two websites

Buy me a coffee And ko-fi

Do you know which is better?

From online blogs they are the same only small differences , but most people use buy me a coffee, and you said ko-fi. So I am confused πŸ˜…

I don't mind either, I normally use ko-fi, because most of the people I know use that, but choose whichever you like, I am fine! 🀣

abdelaziz-mahdy commented 1 year ago

BTW: Thanks for your great effort. Very much appreciated. If I can buy you a ko-fi, let me know please.

I found two websites Buy me a coffee And ko-fi Do you know which is better? From online blogs they are the same only small differences , but most people use buy me a coffee, and you said ko-fi. So I am confused πŸ˜…

I don't mind either, I normally use ko-fi, because most of the people I know use that, but choose whichever you like, I am fine! 🀣

I added it to read me on github https://www.buymeacoffee.com/zezo357

will added kofi too https://ko-fi.com/zezo357

choose what you like 🀣

imdatceleste commented 1 year ago

Done, Thanks again! πŸ™‡πŸ»

abdelaziz-mahdy commented 1 year ago

Done, Thanks again! πŸ™‡πŸ»

Thank you very much.

MichalNemec commented 1 year ago

flutter_meedu_videoplayer: ^4.0.9-dev.1

this will be the new release when media_kit publishes the fixes

@MichalNemec can you test the replay, it fixed on it too

incase of another feature you want let me know to add it in this release

the only thing missing right now i making the fullscreen button open a new page with only video player (will make it an option)

replay works as intended! sometimes my mouse dissapears tho, is it intended?

abdelaziz-mahdy commented 1 year ago

flutter_meedu_videoplayer: ^4.0.9-dev.1

this will be the new release when media_kit publishes the fixes

@MichalNemec can you test the replay, it fixed on it too

incase of another feature you want let me know to add it in this release

the only thing missing right now i making the fullscreen button open a new page with only video player (will make it an option)

replay works as intended! sometimes my mouse dissapears tho, is it intended?

Yes it should disappear when watching, like how most desktop players function.

abdelaziz-mahdy commented 1 year ago

fixed on 4.0.9

also no need for overrides anymore , check readme for new setup