Hi I have this code:
var movieUrl = "http://www.youtube.com/embed/" + trailerId + "?fs=1&autoplay=1"; webview = Ti.UI.createWebView({ url : movieUrl, width: Titanium.UI.FILL, enableZoomControls: false, scalesPageToFit: true, scrollsToTop: false, }); win.add(webview); win.open();and It's working properly but when I hit back button, home button or switch application the video is still playing. How can I close the webview or activity when I am not on the webview window.