iOS11.3 中VideoPlayer播放不了,黑屏

iOS11.3 beta4中VideoPlayer播放不了,黑屏,不知道到时iOS11.3正式版会不会这样


iOS11.3正式版也播放不了,黑屏

@minggo 求解决,

iOS11.3 videoplayer放不了视频了,求解求解。
升级到iOS11.3之前播放正常,升级了之后,播放视频直接提示播放完毕。
参考app:小小英语L1

@minggo 求解决

解决了吗?

2018-04-10 16:28:18.954971+0800 LittleEnglishL1-mobile[11535:1102036] [] <<<< AVOutputDeviceDiscoverySession (FigRouteDiscoverer) >>>> -[AVFigRouteDiscovererOutputDeviceDiscoverySessionImpl outputDeviceDiscoverySessionDidChangeDiscoveryMode:]: Setting device discovery mode to DiscoveryMode_None (client: LittleEnglishL1-mobile)
2018-04-10 16:28:18.979016+0800 LittleEnglishL1-mobile[11535:1102036] [] <<<< AVOutputDeviceDiscoverySession (FigRouteDiscoverer) >>>> -[AVFigRouteDiscovererOutputDeviceDiscoverySessionImpl outputDeviceDiscoverySessionDidChangeDiscoveryMode:]: Setting device discovery mode to DiscoveryMode_Presence (client: LittleEnglishL1-mobile)
2018-04-10 16:28:18.994754+0800 LittleEnglishL1-mobile[11535:1102036] cocos2d: surface size: 1334x750
V/AudioCache (311): pcm buffer was loaded successfully, total frames: 46080, total read frames: 45504, adjust frames: 0, remainingFrames: 576
V/AudioCache (311): pcm buffer was loaded successfully, total frames: 157824, total read frames: 157824, adjust frames: 0, remainingFrames: 0

有解决方案么?

是ios11.3的视屏播放,状态分发错误,然后cocos2dx底层没有判断:
文件UIVideoPlayer-ios.mm

-(void) videoFinished:(NSNotification )notification
{
if(_videoPlayer != nullptr)
{
** if ([self.moviePlayer playbackState] == MPMoviePlaybackStatePlaying) {
*
** return;**
** }**
if([self.moviePlayer playbackState] != MPMoviePlaybackStateStopped)
{
_videoPlayer->onPlayEvent((int)VideoPlayer::EventType::COMPLETED);
}
}
}

1赞

实测楼上方法有用

非常感谢!
验证有效
app已更新。

1赞

能不能详细一点,这样说萌新不知道所以然来