Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Launching Youtube Links

I am trying to launch a youtube link with in my application, but after the video plays I am now in the you tube app and have to go back to the springboard to get back to my app. How do I get the application to launch the video then when the user is done it returns to my app?

     var w = Ti.UI.createWindow();
— asked April 6th 2010 by Christian Sullivan
  • api
  • iphone
  • mobile
  • video
  • youtube

2 Answers

  • Accepted Answer


    After the YouTube video has completed, or the user clicks the 'done' button, you should find that you're back in the your app.

    Is this not the case for you?

    BTW: For YouTube, I suggest using a webView and putting the full Flash (yes, Flash) embed code for the video in the html for that webView. This will then create a thumbnail of the video for your users. Then Clicking this will open the YouTube player and do what I described above.

    Even though it's Flash code on the iPhone, it will know what to do.

    — answered April 6th 2010 by Kosso
    1 Comment
    • Hi Kosso,

      So, to run youtube video within the app I have to use Flash??? And use webView? Do you know Apple is rejecting apps with webView?
      Is there no solution to run youtube video with app view?

      — commented February 18th 2014 by Gustavo Severo
  • This may help somebody else:
    you can download the following plugin for firefox and the get the mp4 url from there and use that for url in Titanium.Media.createVideoPlayer

    firefox plugin:


    var youtubeURL= "http://o-o.preferred.dub06s01.v2.lscache5.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Csource%2Cratebypass%2Ccp&fexp=910601%2C900810&itag=18&ip=";
    var activeMovie = Titanium.Media.createVideoPlayer({
        url: youtubeURL, 
    — answered October 7th 2011 by Andres Arguello Pitt
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.