I have the following code to show youtube video in titanium for iOS.
var win = Titanium.UI.createWindow();
// 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 ];
win.open();
// Build the movie URL. 'fs' and 'autoplay' parameters are optional.
var movieId = "oYgMRIIVX3w";
var movieUrl = "http://www.youtube.com/embed/" + movieId+ "?fs=1&autoplay=1";
webview = Ti.UI.createWebView({
url : movieUrl
});
win.add(webview);
However, even use the "autoplay=1", the youtube video is still not playing automatically. User still need to click on the play button in youtube.
Any idea on how to play the youtube automatically without clicking the play button?
Thanks.