Skip to content

Instantly share code, notes, and snippets.

@csemrm
Created December 28, 2013 18:44
Show Gist options
  • Save csemrm/8162677 to your computer and use it in GitHub Desktop.
Save csemrm/8162677 to your computer and use it in GitHub Desktop.
app.js Android: Second time a webview is loaded with a HTML5 video the video does not play
var win2 = Titanium.UI.createWindow({
backgroundColor : 'red',
title : 'Red Window'
});
var win3 = Titanium.UI.createWindow({
backgroundColor : 'blue',
title : 'Blue Window'
});
var button = Titanium.UI.createButton({
title : 'Open Blue Window'
});
button.addEventListener('click', function() {
win3.open();
});
win2.add(button);
// Create a WebView
var aWebView = Ti.UI.createWebView({
url : 'http://www.youtube.com/embed/eLyoA11MNP8'
});
aWebView.addEventListener('load', function(e) {
Ti.API.info('webview loaded: ' + e.url);
});
win3.add(aWebView);
win2.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment