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

Asynchronous setProperty / command #815

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

moffatman
Copy link
Contributor

This removes all noticeable blocking of dart/ui thread

Some notes/questions for @alexmercerind

  1. I replaced the "play() -> get_property -> playOrPause" pattern with just set_property('pause', false). I got bad race conditions with the old way. Not sure why you changed to it originally?
  2. I can move seek back to the main thread now :)
  3. I didn't change screenshot() since it has one-off use of command-with-result. But also it uses package:image to do some conversion in dart-space, so other Isolate is still a good idea.
  4. I didn't implement getProperty. Because the memory ownership there gets a little more complicated. But after rebasing my change here, I see there is now NativePlayer.getProperty. Can think about it some more...

@moffatman
Copy link
Contributor Author

I guess one more thing to do as well, apply similar changes to media_kit_video/lib/src/video_controller/android_video_controller/real.dart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant