ユーザーがビデオコントロールバーのフルスクリーンボタンをクリックしたときに、HTML5ビデオURIを取得しようとしています。これによると、Android 4.0のHTML5ビデオビューはSurfaceViewであり、VideoViewではありません。
誰かがSurfaceVideoViewでURIを取得する方法を教えてもらえますか?これは私のコードです。どうもありがとう。
webView.setWebChromeClient(new WebChromeClient(){
@Override
public void onShowCustomView(View view, CustomViewCallback callback) {
super.onShowCustomView(view, callback);
if (view instanceof FrameLayout){
final FrameLayout frame = (FrameLayout) view;
if (frame.getFocusedChild() instanceof SurfaceView){
SurfaceView video= (SurfaceView) frame.getFocusedChild();
}
}
});