PDA

View Full Version : Embed YouTube Video in Application




Blakeasd
Feb 16, 2013, 09:11 PM
Hello,

Does anyone know of a relatively simple way to embed a YouTube video into a Mac Application? For example, this (http://www.macupdate.com/app/mac/28608/mactubes) application actually embeds the entire YouTube web player in to the program. I know how to use a WebKit view, but what about isolating just the web player. I looked into YouTube's JSON API, but I'm completely lost. I saw this documentation (https://developers.google.com/youtube/player_parameters#Embedding_a_Player) , but I don't understand how this relates to Objective-C and Cocoa. Could someone please point me in the right direction?

Thanks!



Ap0ks
Feb 17, 2013, 11:11 AM
The easiest way is to create a WebView and use the link from the YouTube API (http://www.youtube.com/embed/VIDEO_ID) as the source URL and it'll load the YouTube video player and the video. You'll need to do more digging/research to make a fully functional YouTube app but just using the link should get you started.

Blakeasd
Feb 17, 2013, 12:39 PM
Thank You!