发现cocos2d-x 引擎在ios 11.3上播放视频会黑屏并且直接跳过
两种解决办法,升级引擎到3.16版本之后
或者修改Oc的代码
在UIVideoPlayer-ios.mm下
-(void) videoFinished:(NSNotification *)notification
{if(_videoPlayer != nullptr){//fix : ios 11.3 sends wrong notificaiton here, we need to ignore itif ([self.moviePlayer playbackState] == MPMoviePlaybackStatePlaying){return;}if([self.moviePlayer playbackState] != MPMoviePlaybackStateStopped){_videoPlayer->onPlayEvent((int)VideoPlayer::EventType::COMPLETED);}}
}
就好啦!