2011-08-20 75 views
0

我是在我的iPhone应用程序中流式传输视频,我想知道视频可以在模拟器上播放,也可以显示为照片库中的缩略图。 ,什么是良好的执业播放视频..模拟器上的流视频

回答

0

你好shivangi,

  You will try this its help you. 

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

这里是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]; 
}