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

Incorrect size on desktop #112

Closed krida2000 closed 10 months ago

krida2000 commented 1 year ago

On desktop MeeduPlayerController.videoPlayerController.value.size is always 1920/1080. There is the way to get actual size using media_kit https://github.com/alexmercerind/media_kit/issues/212.

abdelaziz-mahdy commented 1 year ago

The video controller size , is the video resolution.

Passed from media_kit when video loads , can you try another video and check again?

abdelaziz-mahdy commented 1 year ago

It should be the same as the logs of media_kit

krida2000 commented 1 year ago

I investigated problem, it is hapend only when video has heigth: 1920 and width: 1080

Image ![image](https://github.com/zezo357/flutter_meedu_videoplayer/assets/71345244/c8ff7c91-1780-4aef-9167-cac97c50bcaf)

On left side is video on web and on right side is same video on Windows.

Video https://github.com/zezo357/flutter_meedu_videoplayer/assets/71345244/d18760cd-7cd6-435e-b241-06f09b690b49

Also attach video with what you can test it.

abdelaziz-mahdy commented 1 year ago

I investigated problem, it is hapend only when video has heigth: 1920 and width: 1080

Image ![image](https://github.com/zezo357/flutter_meedu_videoplayer/assets/71345244/c8ff7c91-1780-4aef-9167-cac97c50bcaf)

On left side is video on web and on right side is same video on Windows.

Video https://github.com/zezo357/flutter_meedu_videoplayer/assets/71345244/d18760cd-7cd6-435e-b241-06f09b690b49

Also attach video with what you can test it.

I don't see the problem, the video is 1920/1080 and the size shows that

This the right logic!?

Where is the problem?

krida2000 commented 1 year ago

On Windows video I attached has MeeduPlayerController.videoPlayerController.value.size.width = 1920 but its actual width = 1080 and MeeduPlayerController.videoPlayerController.value.size.heigth = 1080 but its actual heigth = 1920.

abdelaziz-mahdy commented 1 year ago

Okay got you, they are switched,

I will recheck it and let you know, sorry for that mistake and I hope I find a fix for it

abdelaziz-mahdy commented 1 year ago

I may check it at night due to being busy right now sorry for that too

krida2000 commented 1 year ago

It is okay, thank you for quick responses.

abdelaziz-mahdy commented 1 year ago

from media_kit logs flutter: {handle: 5882002448, id: 4613829808, rect: {top: 0.0, width: 1920.0, left: 0.0, height: 1080.0}} , i guess the orientation is messed up while reading the video in media_kit but i really dont know

since its not a problem from my side i cant fix it sadly :(