You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/12/01 00:22:17 UTC

ios commit: [CB-1957] InAppBrowser - video/audio does not stop playing when browser is closed

Updated Branches:
  refs/heads/master 67e93c90a -> 7f6d64375


[CB-1957] InAppBrowser - video/audio does not stop playing when browser is closed


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/7f6d6437
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/7f6d6437
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/7f6d6437

Branch: refs/heads/master
Commit: 7f6d64375a1db8158cdd3a225270bfec3288be27
Parents: 67e93c9
Author: Shazron Abdullah <sh...@apache.org>
Authored: Fri Nov 30 15:21:44 2012 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Nov 30 15:21:59 2012 -0800

----------------------------------------------------------------------
 CordovaLib/Classes/CDVInAppBrowser.m |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/7f6d6437/CordovaLib/Classes/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVInAppBrowser.m b/CordovaLib/Classes/CDVInAppBrowser.m
index 06000e7..3609edb 100644
--- a/CordovaLib/Classes/CDVInAppBrowser.m
+++ b/CordovaLib/Classes/CDVInAppBrowser.m
@@ -43,10 +43,16 @@
     return self;
 }
 
+- (void)onReset
+{
+    [self close:nil];
+}
+
 - (void)close:(CDVInvokedUrlCommand*)command
 {
     if (self.inAppBrowserViewController != nil) {
         [self.inAppBrowserViewController close];
+        self.inAppBrowserViewController = nil;
     }
 
     self.callbackId = nil;
@@ -337,6 +343,11 @@
     [super viewDidLoad];
 }
 
+- (void)viewWillDisappear:(BOOL)animated
+{
+    [self.webView loadHTMLString:nil baseURL:nil];
+}
+
 - (void)close
 {
     if ([self respondsToSelector:@selector(presentingViewController)]) {