Play Video in android and ios

Play Video in android and ios
0.0 0


I am trying to implement intro video in my game but cant get the right solution i want to play a video in ios and android how could i achieve this. Is there any api or something which can play video in both ?


There isn’t to my knowledge, since it’s not the goal of cocos2d-x.

You need to do it yourself using native Objective-C and Java code. The relevant class are MPMoviePlayerController on iOS and VideoView on Android. It is relatively easy to have a simple fullscreen intro video.

Alternatives include rendering the video with your game engine (instead of doing a real video) or using animations, though they are not quite the same as a video.