Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save michelmelo/6087904 to your computer and use it in GitHub Desktop.

Select an option

Save michelmelo/6087904 to your computer and use it in GitHub Desktop.
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