Android video view creates a black screen after the video

家住魔仙堡 提交于 2020-01-05 05:08:12

问题


I'm using Android's VideoView for playing locally stored mp4 videos. My app is a hybrid app, i.e. a webview based app, and i'm using native code to play videos. The video plays in the same activity as that of the webview. I'm facing an issue only with Android version 4.0.X. Before starting the video i toggle the visibility of webview and videoview so that webview is invisible and videoview is visible. After the video is over, i reverse this. I still see a black screen over the webview whose area is the same as the video dimensions. For example, if video is covering only partial screen and plays in the center of the screen, then only that much area remains black. And this gets removed only if i change the orientation of the app. Both the webview and videoview are under a Frame Layout. Why does this happen, and only in Android 4.0.X? Pls help.

来源:https://stackoverflow.com/questions/24903232/android-video-view-creates-a-black-screen-after-the-video

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!