Android - 全屏按钮使youtube视频(youtube嵌入)在webView崩溃

时间:2012-10-23 10:53:10

标签: android html5 webview youtube

这是我的xml结构(动态更改。生成的代码)

<LinearLayout>
    <WebView></WebView>
</LinearLayout>

在那个webView上,我设置了这个HTML代码

<html><body><iframe class="youtube-player" type="text/html" height="100%" width="100%" src="http://www.youtube.com/embed/vS6mwyHNacA?rel=0&html5=1" frameborder="0"></iframe></body></html>

按下播放按钮时播放效果正常。但是当我按下全屏按钮(右下角)时,视频停止播放。之后,即使我再次按下播放按钮或拖动进度条,视频也无法播放。

任何人都可以告诉我如何使全屏按钮有效吗?

这是logcat

10-24 09:28:42.065: V/MediaPlayer(25419): isPlaying: 1
10-24 09:28:42.065: V/MediaPlayer-JNI(25419): isPlaying: 1
10-24 09:28:42.125: V/MediaPlayer(25419): isPlaying: 1
10-24 09:28:42.125: V/MediaPlayer-JNI(25419): isPlaying: 1
10-24 09:28:42.225: D/HTML5VideoViewProxy(25419): enterFullScreenVideo() called.
10-24 09:28:42.225: V/MediaPlayer-JNI(25419): getCurrentPosition: 9583 (msec)
10-24 09:28:42.225: V/MediaPlayer(25419): isPlaying: 1
10-24 09:28:42.225: V/MediaPlayer-JNI(25419): isPlaying: 1
10-24 09:28:42.230: V/MediaPlayer(25419): isPlaying: 1
10-24 09:28:42.230: V/MediaPlayer-JNI(25419): isPlaying: 1
10-24 09:28:42.230: V/MediaPlayer-JNI(25419): pause
10-24 09:28:42.230: V/MediaPlayer(25419): pause
10-24 09:28:42.230: V/MediaPlayer-JNI(25419): release
10-24 09:28:42.230: V/MediaPlayer(25419): setListener
10-24 09:28:42.230: V/MediaPlayer(25419): disconnect
10-24 09:28:42.275: V/MediaPlayer(25419): destructor
10-24 09:28:42.275: V/MediaPlayer(25419): disconnect
10-24 09:28:42.275: D/HTML5VideoViewProxy(25419): enterFullScreenVideo : mHTML5VideoView.release()
10-24 09:28:42.275: V/MediaPlayer-JNI(25419): native_setup
10-24 09:28:42.275: V/MediaPlayer(25419): constructor
10-24 09:28:42.275: V/MediaPlayer(25419): setListener
10-24 09:28:50.450: V/webview(25419): NO_FAST_DRAW = false
10-24 09:28:50.560: V/webview(25419):  singleCursorHandlerTouchEvent -getEditableSupport  FASLE 
10-24 09:28:50.975: D/HTML5VideoViewProxy(25419): handleMessage : SEEK
10-24 09:28:50.975: D/HTML5VideoViewProxy(25419): play() : videoView not ready
10-24 09:28:58.355: V/webview(25419): NO_FAST_DRAW = false
10-24 09:28:58.465: V/webview(25419):  singleCursorHandlerTouchEvent -getEditableSupport  FASLE 
10-24 09:29:04.105: V/webview(25419): NO_FAST_DRAW = false
10-24 09:29:04.195: V/webview(25419):  singleCursorHandlerTouchEvent -getEditableSupport  FASLE 
10-24 09:29:04.590: D/HTML5VideoViewProxy(25419): handleMessage : PAUSE
10-24 09:29:04.590: D/HTML5VideoViewProxy(25419): handleMessage : SEEK
10-24 09:29:04.590: D/HTML5VideoViewProxy(25419): handleMessage : SEEK
10-24 09:29:04.590: D/HTML5VideoViewProxy(25419): play() : videoView not ready

“enterFullScreenVideo()调用”是我按下全屏按钮

视频暂停后

“play():videoView not ready”是我按下播放按钮

视频仍无法播放

0 个答案:

没有答案