I am developing a game using cocos2d-x and I want to play it. Activity has one OpenGL view, and I also added a VideoView above it and set the visibility to INVIVIBLE.
When I need to play a video, I just hide the OpenGL view and turn on my VideoView. After that I create a MediaPlayer, call setDisplay with the holder of this VideoView, etc., and ultimately the video plays well. When the video ends, I again switch the visibility - opengl to VISIBLE and video to INVISIBLE.
However, the problem is that when I try to play the video a second time, it just doesn’t appear, however the sound from the video is being played.
Is there a catch with visibility?
source
share