在模拟器上流式传输视频

发布于 2024-11-30 13:22:32 字数 84 浏览 1 评论 0原文

我正在我的 iPhone 应用程序中流式传输视频,我想知道该视频可以在模拟器上播放,也可以像照片库中那样显示为缩略图。 还有什么是练习播放视频的好方法呢?

i am streaming videos in my iphone app and i want to know that the video can be played on the simulator and can also be shown as the thumbnail images as in photo gallery.
And what is the good practicing to play videos..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

何其悲哀 2024-12-07 13:22:32

是的,这是可能的。

为此,您必须使用 mpmovieplayercontroller。

这个链接应该对你有帮助。

http ://iphoneincubator.com/blog/audio-video/play-video-with-mpmovieplayercontroller-in-ios-3-0-and-3-24-0

Yes it is possible.

for that you have to use mpmovieplayercontroller.

this link should help you.

http://iphoneincubator.com/blog/audio-video/play-video-with-mpmovieplayercontroller-in-ios-3-0-and-3-24-0

維他命╮ 2024-12-07 13:22:32

这是 YouTube 视频流的代码

- (void)embedYouTube:(NSString*)url frame:(CGRect)frame {  
 NSString* embedHTML = @"\ 
    <html><head>\ 
 <style type=\"text/css\">\ 
 body {\ 
 background-color: transparent;\ 
 color: white;\ 
 }\ 
 </style>\ 
 </head><body style=\"margin:0\">\ 
    <embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \ 
 width=\"%0.0f\" height=\"%0.0f\"></embed>\ 
    </body></html>";  
 NSString* html = [NSString stringWithFormat:embedHTML, url, frame.size.width, frame.size.height];  
 if(videoView == nil) {  
   videoView = [[UIWebView alloc] initWithFrame:frame];  
   [self.view addSubview:videoView];  
 }  
 [videoView loadHTMLString:html baseURL:nil];  
}  

Here is the code for youtube video stream

- (void)embedYouTube:(NSString*)url frame:(CGRect)frame {  
 NSString* embedHTML = @"\ 
    <html><head>\ 
 <style type=\"text/css\">\ 
 body {\ 
 background-color: transparent;\ 
 color: white;\ 
 }\ 
 </style>\ 
 </head><body style=\"margin:0\">\ 
    <embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \ 
 width=\"%0.0f\" height=\"%0.0f\"></embed>\ 
    </body></html>";  
 NSString* html = [NSString stringWithFormat:embedHTML, url, frame.size.width, frame.size.height];  
 if(videoView == nil) {  
   videoView = [[UIWebView alloc] initWithFrame:frame];  
   [self.view addSubview:videoView];  
 }  
 [videoView loadHTMLString:html baseURL:nil];  
}  
情泪▽动烟 2024-12-07 13:22:32

你好希万吉,

          You will try this its help you.

           http://developer.apple.com/library/ios/#documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/Reference/Reference.html

Hello shivangi,

          You will try this its help you.

           http://developer.apple.com/library/ios/#documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/Reference/Reference.html
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文