Cocos2d and video

Cocos2d and video
0.0 0



I’m new here and I try to check what is possible to do on Android and iPhone. (Lazy guy you will think but yes :wink:

I try cocos2d and it work great, I’m also new in android dev so I try to use a movie in my app.
After so difficulties to remember Java and understand how Android works, I success it but only in Java.
So I do it in my .java file, and use setContentView, so I guess delete the surface view of cocos2d.

In this forum, I find this post :

Is there a way to do the same for Android, and after is there a way to can use the same function in all platform to use the video ?

I still continue to try, but if someone can point me on the good way, it will really good.

Thanks to all.


Gav Thornton do it by wrapped the method from objc to c**, then call it in c** code.
So the same to you, please try to wrap your implemented video playback method in JNI, then call it in c++ code.
I still have no idea about the cross-platform class for video playback, not familiar with these interfaces. Maybe you can lead to further.


Thanks to reply.

I already try to do that, but I’m new in android dev so I’m not sure where to do it.

I forget to say it, but that I want is to have the video on background and the cocos window on front.
But anyway, before I have to success to do it like you say.

I still continue my tests.


I do some tests, but I still don’t success it.

I try to make the cocos2d-x view transparent.

In iPhone and with cocos2d-iPhone I can do it with :

glClearColor(0.0, 0.0, 0.0, 0.0);

but I don’t success to do it with that. So I found a java code that I put in the initView() function of cocos2d-x :

this.setEGLConfigChooser(8, 8, 8, 8, 16, 0);

But that’s still not a transparent view.

Can someone tell me how to make the cocos2d-x view transparent in Android ?