-
Notifications
You must be signed in to change notification settings - Fork 95
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
Remove url requirement and checking #11
Comments
If we change the
I tested this by first passing |
Yes, it works if passing null, but will enter useless state if we supply some broken link to it:
Native view will not be created because of the |
That's true. The change you mentioned in #10 will fix this. Moving init code out of |
Also this check should be removed from
Because it will crash player when I just want to pause it:
Want you do some PlayerController so we could control the video state without needing of recreate widget? I will do PR when find all the errors. |
Sorry, was working on another project. |
Thanks for the PR. I've pushed a new version out which includes this. See v1.0.35 |
I want to be able create blank video player view first, put it in the view tree and then update it with the url when I have one. Like that:
ATM it's not possible, because if there is no URL, it's null or not valid player instance would not be created (simple UIView in native part and Container() in dart part). Even if I update player widget with the url later it still will not be playing because there is no player instance created and it won't be created because _setupPlayer() is called in initState() only.
I propose to make this parameter optional and to completely remove all checks for its validity. Just create a player instance without a link so we can add it later. Moreover, in its current form, you have a chance to add a link when creating a player, which in your opinion will be valid, but the player will consider it not valid and you will no longer have the opportunity to create a player. All subsequent new url requests will be ignored.
The text was updated successfully, but these errors were encountered: