我想同时播放2个或更多视频,但只有一个播放为什么? 可以用mediaplayer做到这一点吗? 我必须使用线程吗?
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
}