-
Notifications
You must be signed in to change notification settings - Fork 28.5k
[video_player] iOS: Player doesn't open a video with whitespaces in the path #51031
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
Comments
Hi @AAverin1994 |
Flutter doctor
Flutter runAfter starting the video shows nothing special
Sample code
Test 1.mp4 - file which lies in the document directory in the phone |
Observing the same issue on iOS Simulator with flutter doctor -v
Video plays nicely when To make sure that the reason is whitespaces in the path I tried to save files under |
This issue seems related to ##40429 |
Hi @AAverin1994,
I tried to play the video by using the above path but the video_player never got initialized with this path, because of a space between the video name. But when I replaced the space with utf-8 character %20 and changed the url to this
The video is getting initialized. flutter doctor -v
|
I ran into this issue as well when using the
Looks like the issue is occurring in video_player_avfoundation. URLWithString requires strings to be properly escaped. One possible fix would be to ensure CreateMessage properly encodes the uri. Not 100% sure of best practice but might want to decode and re-encode the Uri here to prevent double encoding incase the uri provided is already encoded. |
Using
|
Steps to Reproduce
Expected results: Video played
Actual results: Video isn't played, because of player not created
I think the problem is at the moment of creating the link in player = [[FLTVideoPlayer alloc] initWithURL:[NSURL URLWithString:uriArg], NSURL URLWithString:uriArg will be returned nil and the player isn't created.
The text was updated successfully, but these errors were encountered: