Android onShowCustomView
视图会在视频完成加载后再次显示应用程序消失。
我正在开发一个mobie应用程序,它使用Youtube& amp;谷歌加我回报json回到我的webview,然后我用html5视频,jwplayer,Youtube取决于我的资源,
在播放视频后,我遇到了一个问题:
@Override
public void onShowCustomView(View view, CustomViewCallback callback) {
Log.d(log_tag, "Full screen use!");
mCustomViewCallback = callback;
onum = getResources().getConfiguration().orientation;
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
//mTargetView.addView(view); // it's not ready yet
mCustomView = view;
mTargetView.setVisibility(View.VISIBLE); // visible it first
mTargetView.addView(view); // IF I TOOK THIS LINE OUT IT WONT DISAPPEAR BUT VIDEO CANT PLAY
//mContentView.setVisibility(View.GONE);
mTargetView.bringToFront();
is_fullscreen = true;
}
我注意到mTargetView.addView(view);使应用程序屏幕看起来退出到主桌面,视频播放后1-2分钟然后再次显示我的全屏视频
提前感谢您提供任何帮助