objective c - How to embed youtube player in iphone app -


I went through the previous question and wrote the simple code.

  - (Zero) Embed YouTube: (NSString *) urlString frame: (CGRAT) frame {NSString * embedHTML = @ "\"  gt; \ & gt; \ & lt; style = type = \ "text / css \" & Gt; \ body {background color: transparent; \ color: white; \} \ & lt; / style & gt; \ & lt; / head & gt; body style = \ "margin: 0 \" & gt; & Lt; video src = \ "point / to / move \" & gt; atd id = \ "yt \ f \" height = \ "% 0.0f \" & gt; & lt; / embed & gt; \ & Lt; / body & gt; & lt; / html & gt; "; NSString * html = [NSString stringWithFormat: embed HTML, urlString, frame.size.width, frame.size.height]; UIWebView * videoView = [[UIWebView alloc] initWithFrame: frame]; [See video load html string: html base URL: zero]; // [see video loadRequest: [URL with NSURLRequest request: [NSURL URLWithString: @ "http://www.youtube.com/watch?v=WL2l_Q1AR_Q"]]] ;; [Self.view addSubview: videoView]; [See video release]; }   

If "html" is not being used ... but we load the URL directly as I commented that it is working properly ...

Anyone

thanks in advance

Rakesh Yadalam, iOS developer.

exclude it

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -