视频没有显示在VideoView但我可以听到它的声音 [英] Video is not showing on VideoView but i can hear its sound
本文介绍了视频没有显示在VideoView但我可以听到它的声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
-
在我的按钮,点击我写了下面code从播放视频 我的 SD卡(MP4)。
On my button click i wrote the following code for playing video from my 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();
我可以从SD卡播放的播放器录制的视频。
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);
希望这也适用于你。
Hope this also works for you.
这篇关于视频没有显示在VideoView但我可以听到它的声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文