2011-11-11 40 views
1

當通過uiwebview播放視頻時,我沒有收到電視輸出電纜插件的UIScreen通知& Plug-Out。問題是當視頻播放時連接了TV-Out電纜,並且用戶在MPMoviePlayer中的視頻開始之間拔掉了電纜,我不想要這個,而是我想關閉播放器。UIWebView + TVOut問題

[[NSNotificationCenter defaultCenter] addObserver:self 
               selector:@selector(blockMirroring)name:UIScreenDidConnectNotification 
                object:nil]; 
     [[NSNotificationCenter defaultCenter] addObserver:self 
               selector:@selector(blockMirroring) name:UIScreenDidDisconnectNotification 
                object:nil]; 

任何幫助?

在此先感謝

回答

0

您可以嘗試下面的解決方案來解決您的問題。

在blockMirroring方法,實現下面的代碼,可能會幫助你。

[webview loadHTMLString:@"" baseURL:nil]; 
[self.navigationController popViewControllerAnimated:YES]; 
+0

謝謝......這樣做的伎倆.... –