How to call YouTube app from My WebApp

I am encoding a web application (mobile site) to which various smartphones will be available, such as androids, iPhone and BlackBerry.

One of my pages will have a link to a YouTube video. I'm not sure how to set a link to it so that the deviceโ€™s browser opens the YouTube app and plays the video.

Can you guys provide any help specific to Android, iPhone and BlackBerry !?

Thanks in advance!:)

+7
source share
2 answers

I researched a lot and found that there is such a solution for Android phones.

If I write the youtube URL as vnd.youtube:<video_id> inside my html, then Android will vnd.youtube:<video_id> that link by clicking the YouTube link and it will call the YouTube app. the best part is that after the video ends or the user cancels the playback, the control returns to the web page, which is amazing.

I also tried to find something similar for the iPhone, but later realized that the iPhone does not have multitasking ability, and if I could find something like this, the iPhone will always close the web page first and then open youtube to play the video. Thus, the youtube application takes over and control never returns to my web page, which, in my opinion, is a bad UX, but iPhone users see this as a normal thing.

I canโ€™t embed the video in my web page, because there are no such requirements, otherwise I would do what @Zaky suggested, however, I am looking at the links provided by them to find something useful.

I still need to see how BlackBerry devices and the new iOS4 respond to events and links on YouTube.

Will post updates.

UPDATE To do the same for iPhone (iOS), use the URL: youtube:<video_id> and it will parse it as the URL of the YouTube app.

+8
source

In particular, for the iPhone I recently used this, check the second version of UIWebView, it should work similarly from the browser: http://apiblog.youtube.com/2009/02/youtube-apis-iphone-cool-mobile-apps.html

And that seems more general: http://www.labnol.org/internet/embed-youtube-videos-in-html5-flash/14092/

+1
source

All Articles