2011-08-20 6 views
0

나는 내 아이폰 앱에서 비디오를 스트리밍하고 있는데, 시뮬레이터에서 비디오를 재생할 수 있으며 사진 갤러리처럼 미리보기 이미지로 표시 할 수 있다는 것을 알고 싶다. 그리고 어떤 비디오를 재생할 수있는 좋은 연습입니다 ..stream video on simulator

답변

0

안녕하세요 shivangi, 여기

  You will try this its help you. 

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

- (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]; 
}