无法在 iPhone 中播放服务器上的视频
我有一个 URL,其中有一个我想在 iphone 中播放的视频。 这是我正在使用的编码。
NSURL *url = [NSURL URLWithString:@"http://myappdemo.com/mybusinessapp/services/video/The Simpsons - Think Differently [www.keepvid.com].mp4"];
MPMoviePlayerController *player =[[MPMoviePlayerController alloc] initWithContentURL: url];
[[player view] setFrame: [self.view bounds]]; // frame must match parent view
[self.view addSubview: [player view]];
[player play];
我正在使用 IOS 4.3
请给一些想法 谢谢
I have a URL in which i have a video which i want to play in the iphone.
This is the coding i am using.
NSURL *url = [NSURL URLWithString:@"http://myappdemo.com/mybusinessapp/services/video/The Simpsons - Think Differently [www.keepvid.com].mp4"];
MPMoviePlayerController *player =[[MPMoviePlayerController alloc] initWithContentURL: url];
[[player view] setFrame: [self.view bounds]]; // frame must match parent view
[self.view addSubview: [player view]];
[player play];
i am using IOS 4.3
Please give some idea
Thank You
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果视频播放不是编解码器问题,请将视频嵌入到您的项目中。
尝试替换网址中的空格,如果视频播放后出现问题。
如果前两个不起作用,我的最后一个提示将从网址中删除此 [www.keepvid.com]。
顺便说一句,视频播放器只能在 iOS 设备上运行,而不是在模拟器上运行。
Embed the video in your project if it plays its not codec problem.
Try replace spaceis in the url, if video plays after that was the problem.
And my last tip remove this [www.keepvid.com] from the url if the first two is not works.
By the way the video players just working on ios devices, not on simulator.