0

MPMediaPickerController works normally but after playing youtube video in webview
[self presentModalViewController:pickerController animated:YES];
does not shows MPMediaPickerController
im using this code for playing youtube video

 - (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];  
      demoWebView.hidden = NO;
      [demoWebView loadHTMLString:html baseURL:nil]; } 
3
  • I had a problem a while ago afer playing a youtube video i would recieve a level 2 memory warning and then the viewcontroller dissapeard, are you sure you are not recieving a memory warning? Jun 1, 2012 at 13:35
  • no my app does not recieves memory warning
    – sheraza
    Jun 1, 2012 at 13:55
  • but a have this warning No copy of YouTubePlugIn.webplugin/YouTubePlugIn found locally, reading from memory on remote devic
    – sheraza
    Jun 1, 2012 at 13:58

1 Answer 1

0

i was using presentModalViewController with a UIWebView that was playing YouTube video, now a'm using navigation controller and everything works properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.