Reputation: 1531
I have been searching something useful so that I can play the youtube in my iOS app, just like the You tube app.
But stuck with using the Youtube API. I have been in development field from last 6 Months. Don't know, Javascript and other.
I read Youtube Api documentation(As, I couldn't find useful to play youtube videos on Google. as there some changes in the api implementation after aouth 2.0 , and all code are prior 5.0 on internet ).
And whatever I read in the Youtube API DOCS, I believe I understood only 30-40% (may be because I never did my hands dirty with any other APIs or may be I don't know what exactly to use from API Documents) .
I read few things about iframe. But Dont know How exactly to use them.
Please, If any body has gone through the same problem, Then please guide me. Feels like Hell from Last 2 days.
Upvotes: 2
Views: 246
Reputation: 343
To play YouTube videos in your iOS app use these steps:
Use below code to play video.
MPMoviePlayerViewController *movieController=[[MPMoviePlayerViewController alloc]initWithContentURL:VideoUrl];
[self presentMoviePlayerViewControllerAnimated:movieController];
[movieController.moviePlayer play];
Upvotes: 1