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

video_player does not give access to the file resolution? #147471

Closed
stephane-archer opened this issue Apr 27, 2024 · 5 comments
Closed

video_player does not give access to the file resolution? #147471

stephane-archer opened this issue Apr 27, 2024 · 5 comments

Comments

@stephane-archer
Copy link

Use case

VideoPlayerController controller = new VideoPlayerController.file(myfile);
controller.value.duration ; // OK
controller.value.size ; // OK
controller.value.resolution; // is not working

Proposal

up

@moffatman
Copy link
Contributor

Isn't that just size? What do you mean by resolution?

@stephane-archer
Copy link
Author

@moffatman Sorry, you are probably right but I found size.height and size.width to be equal to zero so I'm not sure what I'm missing

@moffatman
Copy link
Contributor

Size should be there after you initialize() the controller.

@stephane-archer
Copy link
Author

@moffatman thank you so much you are the best

tldr:

VideoPlayerController controller = VideoPlayerController.file(myFile);
await controller.initialize();
print(controller.value.size.height);
print(controller.value.size.width);

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants