Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Video.configuration property, instance of VideoConfiguration class #3074

Merged
merged 6 commits into from
May 23, 2024

Conversation

bl1nch
Copy link
Contributor

@bl1nch bl1nch commented Apr 21, 2024

@CLAassistant
Copy link

CLAassistant commented Apr 21, 2024

CLA assistant check
All committers have signed the CLA.

@ndonkoHenri
Copy link
Contributor

ndonkoHenri commented Apr 21, 2024

Thanks!

I guess we have to merge this before you can try it, right?

@FeodorFitsner
Copy link
Contributor

You can try PR without merging:

image

@ndonkoHenri
Copy link
Contributor

I meant @bl1nch, not me. 😉

Copy link
Contributor

@ndonkoHenri ndonkoHenri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge and see if it works...

@bl1nch
Copy link
Contributor Author

bl1nch commented Apr 22, 2024

@ndonkoHenri sorry I'm new in this project, how I can build apk with these changes to test it?

Tried to install cloned flet with poetry but when I build apk with flet_video I get:

(test-client-py3.11) PS C:\Users\bl1nc\PycharmProjects\test-client> flet build apk --include-packages flet_video
Creating Flutter bootstrap project...OK
Customizing app icons and splash images...OK
Generating app icons...Because flet_video <0.20.1 depends on flet ^0.20.0 and flet_video >=0.20.1 <0.20.2 depends on flet ^0.20.1, flet_video <0.20.2 requires flet ^0.20.0.
And because flet_video ^0.20.2 depends on flet ^0.20.2, flet_video <0.21.0 requires flet ^0.20.0.
And because flet_video >=0.21.0 <0.21.1 depends on flet ^0.21.0 and flet_video >=0.21.1 <0.21.2 depends on flet ^0.21.1, flet_video <0.21.2 requires flet ^0.20.0
or >=0.21.0 <0.22.0.
And because flet_video ^0.21.2 depends on flet ^0.21.2 and flet_video >=0.22.0 depends on flet ^0.22.0, every version of flet_video requires flet ^0.20.0 or     
>=0.21.0 <0.22.0 or ^0.22.0.
So, because test-client depends on both flet ^0.19.0 and flet_video any, version solving failed.

@ndonkoHenri
Copy link
Contributor

Will let you know when you can test it.

@FeodorFitsner
Copy link
Contributor

Maybe we should implement VideoControllerConfiguration as a property in Video control? I read there could be issues when playing video in simulator. It would be great to control that depending on the platform. I'm afraid we could break something with this PR for other users.

@ndonkoHenri
Copy link
Contributor

ndonkoHenri commented Apr 30, 2024

Maybe we should implement VideoControllerConfiguration as a property in Video control

Nice idea!

@ndonkoHenri ndonkoHenri added enhancement Improvement/Optimization good first issue Good starting point for first-time contributors labels Apr 30, 2024
@bl1nch
Copy link
Contributor Author

bl1nch commented May 4, 2024

Maybe we should implement VideoControllerConfiguration as a property in Video control

Nice idea!

Sorry, have you already started implementing this? I haven't written in flutter or dart before, I'm afraid I won't be able to implement it in the near future.

@bl1nch bl1nch marked this pull request as draft May 4, 2024 07:31
@ndonkoHenri
Copy link
Contributor

I'm afraid I won't be able to implement it in the near future.

No worries, thanks for your contribution! Will wrap this up :)

@ndonkoHenri ndonkoHenri linked an issue May 4, 2024 that may be closed by this pull request
@ndonkoHenri
Copy link
Contributor

Created VideoConfiguration class, and added a new parameter to the Video control named configuration.
@FeodorFitsner, Thanks again for your suggestion! On macOS, when output_backend="gpu", a new window pops up with video (window at the top in image below) 😬
Bildschirmfoto 2024-05-08 um 13 37 49

@ndonkoHenri ndonkoHenri marked this pull request as ready for review May 8, 2024 11:57
@ndonkoHenri ndonkoHenri changed the title Make VideoController using 'gpu' vo Add Video.configuration property, instance of VideoConfiguration class May 8, 2024
@ndonkoHenri ndonkoHenri requested a review from FeodorFitsner May 8, 2024 12:01
@FeodorFitsner FeodorFitsner merged commit 54d5628 into flet-dev:main May 23, 2024
2 checks passed
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
…class (flet-dev#3074)

* Make VideoController using 'gpu' vo

* create parseControllerConfiguration util

* Video: configuration property, instance of VideoConfiguration

* Use `self.__configuration` instead of `self.configuration`

* Video.before_update: replace self.configuration by self.__configuration

---------

Co-authored-by: ndonkoHenri <[email protected]>
Co-authored-by: TheEthicalBoy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement/Optimization good first issue Good starting point for first-time contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Video lag and stream interruptions on Android TV devices
4 participants