Can I overlap a sprite or a layer on video?

Can I overlap a sprite or a layer on video?
0.0 0

#1

In sample code cpp-tests, there is a UIVideoPlayer sample in android platform.

I change the video’s position to (0,0) and even add a layer(or a sprite) overlapped on it, the video just can’t be covered any way(video playing is fine), even the FPS and the vertex count info are the same.

Is it normal? Nothing can overlaps the video? If not, how can I overlap my sprite(or layer) on it?


#2

Were you able to solve this problem?


#3

@wajahatali,

You might get updated information here:


#4

The only way to do this is to actually edit the layers cocos2d creates and adds inside the native code! The reason this happens is because the video view natively is added to the openGL layer so if you want to do this just change inside cocos2d where the video view is added as a child and change the order here! I can verify that this works


#5

@ChrisS91 You’re right, that’s how we solved it.
@wajahatali @ChrisS91 has the solution, you can ask him.


#6

Hello @ChrisS91 @wajahatali

We need the sprite frame above the video .

For example,in the below image corner part of the video is coverd by frame sprite.

What exactly we need to do inside UIVideoPlayer-ios.mm?
How exactly we can achieve these?

Thanks,