2013-08-19 41 views
0

我開發了在android應用程序中播放視頻的模塊。如果看到附加的圖像,視頻播放良好。但是當進度條出現時,我將無法點擊跳過視頻按鈕。如果進度條消失的圖像視頻進度條不允許其他按鈕的點擊事件

鏈接:https://docs.google.com/file/d/0B_xgCwfb-GVmX0psNzZXM09tVEU/edit?usp=sharing

下面是代碼:

private VideoView video; 
public static MediaController mediaController; 
private Button viewReadingsButton; 


if (isViewReadingEnabled) { 
         ViewGroup.LayoutParams vparams = video 
           .getLayoutParams(); 
         vparams.height = 480; 
         vparams.width = 800; 
         video.setLayoutParams(vparams); 
        } 

        video.setVisibility(View.VISIBLE); 

        if (isViewReadingEnabled) { 
         Log.i(TAGOXY, 
           "In BaseActivity:video():viewReadingsButton visible"); 
         viewReadingsButton 
           .setBackgroundResource(R.drawable.video_skip_bg); 
         viewReadingsButton.setVisibility(View.VISIBLE); 
        } 

        video.refreshDrawableState(); 

        // MediaController mediaController = new 
        // MediaController(BaseActivity.this); 
        mediaController = new MediaController(BaseActivity.this); 
        mediaController.setAnchorView(video); 
        mediaController.setPadding(200, 0, 0, 200); 

        // set the controllers to the video view 
        video.setMediaController(mediaController); 
        Log.i(TAGOXY, 
          "In BaseActivity:video():after MediaController"); 

        video.setVideoURI(Uri.parse(loadVideoFileName)); 
        Log.i(TAGOXY, "In BaseActivity:video():after setVideoURI"); 

        // start the video 
        video.start(); 

回答

0

花費大量的時間後,我發現,這是不可能的,我當前的代碼。

由於我們使用Web視圖來加載HTML頁面,現在我們使用插件在HTML頁面中播放視頻。在那邊,我能夠實現這個所需的功能。