-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
线上版本播放视频崩溃 已经崩溃了两百多次了 需要帮忙 需要协助 #35
Comments
是否在播放器未销毁时 创建新播放器 |
应该不会 我们看捕获到的崩溃前的操作步骤 没有退出 用户一直在播放、暂停 |
- (void)setReplayInfo:(EHOCReplayModel *)replay
{
if (!_videoPlayer) {
[_webView layoutIfNeeded];
_videoPlayer = [[SkinVideoViewController alloc] initWithFrame:_webView.bounds];
[_webView addSubview:_videoPlayer.view];
[_videoPlayer setParentViewController:self];
[_videoPlayer keepNavigationBar:YES];
[_videoPlayer setHeadTitle:_replay.title];
[_videoPlayer setNavigationController:self.navigationController];
[_videoPlayer setMovieSourceType:MPMovieSourceTypeStreaming];
[_videoPlayer setVid:_replay.poly_id];
[_videoPlayer enableDanmu:NO];
[_videoPlayer setEnableDanmuDisplay:NO]; // 不显示弹幕按钮
// 注册监听
[_videoPlayer configObserver];
__weak typeof(self) weakself = self;
[_videoPlayer setFullscreenBlock:^{
weakself.titleLbl.hidden = TRUE;
weakself.titleImgView.hidden = TRUE;
}];
[_videoPlayer setShrinkscreenBlock:^{
weakself.titleLbl.hidden = FALSE;
weakself.titleImgView.hidden = FALSE;
}];
}
} |
这个是初始化的方法 这个方法只执行一次 用户一致保持在播放视频的界面 但是用户不停的最小化 在返回 在最小化 在返回 然后点暂停 播放 暂停 播放 最后就出现了崩溃 |
我看看你怎么销毁播放器的 |
- (void)viewWillAppear:(BOOL)animated
{
if (self.navigationController.navigationBarHidden) {
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
[super viewWillAppear:animated];
// 续播
if (_videoPlayer) {
[_videoPlayer configObserver];
[_videoPlayer play];
}
// 打开旋转响应
AppDelegate *deletege = (AppDelegate *)[[UIApplication sharedApplication] delegate];
deletege.clientstate = 1;
}
- (void)viewWillDisappear:(BOOL)animated
{
[self.navigationController setNavigationBarHidden:YES animated:YES];
[super viewWillDisappear:animated];
// 暂停
if (_videoPlayer) {
[_videoPlayer cancelObserver];
[_videoPlayer pause];
}
// 关闭旋转响应
AppDelegate *deletege = (AppDelegate *)[[UIApplication sharedApplication] delegate];
deletege.clientstate = 0;
}
- (void)dealloc
{
[_videoPlayer stop];
_videoPlayer.contentURL = nil;
[_videoPlayer cancel];
} |
- (void)viewDidLoad
{
[super viewDidLoad];
if ([_replay.platform isEqualToString:@"GRE"]) {
[_headImgView setImage:[UIImage imageNamed:@"course_bg_headgre"]];
} else if ([_replay.platform isEqualToString:@"GMAT"]) {
[_headImgView setImage:[UIImage imageNamed:@"course_bg_headgmat"]];
} else if ([_replay.platform isEqualToString:@"雅思"]) {
[_headImgView setImage:[UIImage imageNamed:@"course_bg_headielts"]];
}
_webView.scrollView.scrollEnabled = FALSE;
[_webView changeBackColor:[UIColor clearColor]];
_webView.allowsInlineMediaPlayback = YES;
[self setReplayInfo:_replay];
} |
- (void)popSelfAction
{
[self.navigationController popViewControllerAnimated:YES];
} |
该视图控制器时候销毁 delloc 是否执行 |
我这边确认了一下 如果用户返回的话 dealloc 会执行 |
2017-06-08 16:46:22.257842+0800 KGMAT[2811:939942] [DYMTLInitPlatform] platform initialization successful |
这是完整的Xcode-Log 我刚才没有返回 只是在播放的界面 不停的拖拽进度条 不停的点击播放暂停 不停的最小化 在返回 最小化期间 试着打了一个电话 发了一条语音 看了一下别的视频 再回来 就会崩溃 |
(lldb) bt
(lldb) |
我跑一下你们的Demo 试试 |
经测试 Demo也会崩溃 稍后我会发截图~ |
解决了吗 这边也是一直存在 |
应该还没解决 上周客服说它们重现不了 我给客服发过崩溃的操作视频 崩溃的问题还没有反馈结果 @sunlei4076 |
我司已经在考虑更换SDK了 牵扯到的比较多 暂时还没有具体的方案 |
可以试试最新的release版本,polyv-ios-client-demo release v1.4.0,对应的是 dev 分支的最新代码。该版本使用 AVPlayer 改写了原来使用的播放器,看能不能解决你的问题。 |
线上崩溃:
An AVPlayerItem cannot be associated with more than one instance of AVPlayer (_mh_execute_header + 1613604)
线上崩溃捕获到的日志:
2017-06-07 07:57:53.837 BTGAspects: Unable to find selector -[NSURLSessionConfiguration setProtocolClasses:].
2017-06-07 07:57:55.094 BUGTAGS: Bugtags v2.3.0(0510) started successfully
2017-06-07 07:58:27.002 [PLV_SDK_INFO] 播放在线视频,自动。
2017-06-07 08:21:32.107 ::: Socket broke, syncing message ..
崩溃步骤:
2017-06-07 08:01:40.588 Selector playButtonClick by (UIButton) in SkinVideoViewController
2017-06-07 08:01:58.904 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView) in EHCourseReplayController
2017-06-07 08:02:05.355 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView) in EHCourseReplayController
2017-06-07 08:02:06.205 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView):_bottomBar(UIView) in EHCourseReplayController
2017-06-07 08:02:07.915 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView) in EHCourseReplayController
2017-06-07 08:02:08.661 Selector progressSliderTouchBegan: by (UISlider) in SkinVideoViewController
2017-06-07 08:02:08.676 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView):_slider(PLVSlider):_slider(UISlider) in EHCourseReplayController
2017-06-07 08:02:08.752 Selector progressSliderValueChanged: by (UISlider) in SkinVideoViewController
2017-06-07 08:02:08.767 Selector progressSliderValueChanged: by (UISlider) in SkinVideoViewController
2017-06-07 08:02:08.783 Selector progressSliderValueChanged: by (UISlider) in SkinVideoViewController
2017-06-07 08:02:08.982 Selector progressSliderTouchEnded: by (UISlider) in SkinVideoViewController
2017-06-07 08:02:10.794 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView) in EHCourseReplayController
2017-06-07 08:02:17.641 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView):_pauseButton(UIButton) in EHCourseReplayController
2017-06-07 08:02:17.736 Selector pauseButtonClick by (UIButton) in SkinVideoViewController
2017-06-07 08:02:54.464 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView) in EHCourseReplayController
2017-06-07 08:02:55.525 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView):_playButton(UIButton) in EHCourseReplayController
2017-06-07 08:02:55.673 Selector playButtonClick by (UIButton) in SkinVideoViewController
2017-06-07 08:07:22.896 Application WillResignActive
2017-06-07 08:07:24.920 Application DidBecomeActive
2017-06-07 08:14:03.800 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView) in EHCourseReplayController
2017-06-07 08:14:04.581 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView):_pauseButton(UIButton) in EHCourseReplayController
2017-06-07 08:14:04.747 Selector pauseButtonClick by (UIButton) in SkinVideoViewController
2017-06-07 08:15:27.010 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView):_playButton(UIButton) in EHCourseReplayController
2017-06-07 08:15:27.157 Selector playButtonClick by (UIButton) in SkinVideoViewController
2017-06-07 08:16:49.332 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView) in EHCourseReplayController
2017-06-07 08:21:06.671 Application WillResignActive
2017-06-07 08:21:07.313 Application DidEnterBackground
2017-06-07 08:21:08.038 Application WillEnterForeground
2017-06-07 08:21:08.554 Application DidBecomeActive
2017-06-07 08:21:09.723 Touch _webView(UIWebView):(MPMovieView):(SkinVideoViewControllerView):_playButton(UIButton) in EHCourseReplayController
2017-06-07 08:21:09.815 Selector playButtonClick by (UIButton) in SkinVideoViewController
2017-06-07 08:21:13.580 Application WillResignActive
2017-06-07 08:21:14.128 Application DidEnterBackground
The text was updated successfully, but these errors were encountered: