VideoView 上没有显示视频,但我可以听到它的声音
问题描述:
在我的按钮点击我写了以下代码来播放视频我的SDCARD (mp4).
video_view = (VideoView)findViewById(R.id.video_view);
video_view.setVideoPath("/sdcard/myvideo.mp4");
video_view.setMediaController(new MediaController(this));
video_view.start();
我可以在播放器中播放 SDCARD 中录制的视频.
I can play recorded video from SDCARD in player.
有人遇到过这种问题吗?如果是,那怎么解决?
Is anybody ever faced this kind of problem ? If yes then how can it solve it ?
答
上面的方法我都试过了,但没有一个能奏效.
I've tried every method above, but none of them could work.
最后,我试着调用这个函数,然后视频出现了.
Finally, I tried to call this function, then the video appeared.
video_view.setZOrderOnTop(true);
希望这也适用于您.