Is there any UIVideoPlayer tutorial?

Is there any UIVideoPlayer tutorial?
0.0 0


I mean to debug the header. Set a break point in there or step into/through the code.


You mean like this?

But I have just compiled lib of cocos2d, it will debug that? Now it just goto constructor end line… and nothing…


No, set a breakpoint inside the UIVideoPlayer.h file.

Normally your IDE will color the executed codepath for you.

It will debug it, if you compiled the debug version of it.


I have just compiled lib, so probably it will not debug. But when I ctrl+click to #include “ui/UIVideoPlayer.h” I goto UIVideoPlayer.h file. But how can I set breakpoint, if I can’t compile project, when I add:

#include “ui/UIVideoPlayer.h”

using namespace cocos2d::ui;
using namespace cocos2d::experimental::ui;


Hmm. After cleaning delivered data folder and rebuild, now all works… very strange.


That’s why you need to compile it as debug.

Because the pre-processor will parse it.

With modern IDEs you would just need to open the header file and the executed code path will be highlighted and you can hover over the pre-processor defines.

Xcode is far from perfect. I had many such issues over time. Maybe it was an issue with cached headers.

The most prominent IDE with such issues is Eclipse.


Anyway, thank you for your help.


One more question: when I video playing, I see this controls:

How can I hide it?


Please help. Actually, I need that no any controls were on the screen, because it’s nightmare now, I can pause video, press “Done” and get some glitches here… This player is in beta state now? Maybe better to not use it?

I need control over this:


I solved this by editing the following files:


Hello @larsven

iOS and Android both worked for me.
Thank you.


We created a video tutorial for this


I am facing issues on android device, The video is not playing and I get a pop up which says “Video can not be played”. Can somebody help me? @pabitrapadhy @SonarSystems


What is the source of the video?


Video is in my res folder in mp4 format.


How big is it?


I am getting a problem that media player is not showing the controller on android device, how can i enable the media players seekbar on android device?