开发者

how to properly encode contentUrl in MPMoviePlayerController to allow for spaces?

开发者 https://www.devze.com 2023-04-09 17:06 出处:网络
I\'m using the MPMoviePlayerController to play video in an iPad app.When I set contentUrl to a local file wit开发者_如何学运维h a space in the name, the player won\'t acknowledge or play the file, not

I'm using the MPMoviePlayerController to play video in an iPad app. When I set contentUrl to a local file wit开发者_如何学运维h a space in the name, the player won't acknowledge or play the file, not even an error. IF I urlEncode the path, it fails with an error ("can't play file").

Does anyone know how to properly encode contentUrl in MPMoviePlayerController to allow for spaces?


How are you constructing the URL? If you use [NSURL fileURLWithPath:myPath] that should give you an NSURL* that's correct.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号