1

我想同时播放 2 个或多个 videoview 但只播放一个,为什么?我可以用媒体播放器做到这一点吗?我必须使用线程吗?

视频视图 vv1、vv2、vv3、vv4;

        vv1=(VideoView)findViewById(R.id.vv1);
        vv2=(VideoView)findViewById(R.id.vv2);
        vv3=(VideoView)findViewById(R.id.vv3);
        vv4=(VideoView)findViewById(R.id.vv4);


        try {
        vv1.setVideoURI(Uri.parse(dizi[0].toString())); 
        vv1.requestFocus();
        vv1.start();
        } catch (Exception e) {
            // TODO: handle exception
        }
        try {
        vv2.setVideoURI(Uri.parse(dizi[1].toString())); 
        vv2.requestFocus();
        vv2.start();
        } catch (Exception e) {
            // TODO: handle exception
        }
        try {
        vv3.setVideoURI(Uri.parse(dizi[2].toString())); 
        vv3.requestFocus();
        vv3.start();
        } catch (Exception e) {
            // TODO: handle exception
        }
        try {
        vv4.setVideoURI(Uri.parse(dizi[3].toString())); 
        vv4.requestFocus();
        vv4.start();
        } catch (Exception e) {
            // TODO: handle exception
        }
4

0 回答 0