Embed YouTube Video in Application

Discussion in 'Mac Programming' started by Blakeasd, Feb 16, 2013.

  1. macrumors 6502a

    Joined:
    Dec 29, 2009
    #1
    Hello,

    Does anyone know of a relatively simple way to embed a YouTube video into a Mac Application? For example, this 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 , but I don't understand how this relates to Objective-C and Cocoa. Could someone please point me in the right direction?

    Thanks!
     
  2. macrumors regular

    Joined:
    Aug 12, 2008
    Location:
    Cambridge, UK
    #2
    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.
     
  3. thread starter macrumors 6502a

    Joined:
    Dec 29, 2009

Share This Page