Cocos2d and video

Hello,

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 :
http://www.cocos2d-x.org/boards/7/topics/550

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.
Damien

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);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

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);
this.setRenderer(mRenderer);
this.getHolder().setFormat(PixelFormat.TRANSLUCENT);

But that’s still not a transparent view.

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

Thanks.