Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Show YouTube videos with Titanium mobile
var win = Ti.UI.currentWindow;
// Set the window orientation modes for the video to rotate with the device
win.orientationModes = [ Ti.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT,
Ti.UI.LANDSCAPE_RIGHT ];
// Build the movie URL. 'fs' and 'autoplay' parameters are optional.
var movieId = "d0llSyfgwEE";
var movieUrl = "http://www.youtube.com/embed/" + movieId+ "?fs=1&autoplay=1";
webview = Ti.UI.createWebView({
url : movieUrl
});
win.add(webview);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.