Hi how can I implement a youtube player for my App using a webview? I've done this before but when I press the back button the youtube player/webview should also close. Here's my current 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);