Skip to content
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

与播放器集成,开启后台运行,播放器还有可能报error = 1 的“ 未知的播放器错误 ” #18

Open
yaoxc opened this issue Nov 16, 2017 · 7 comments

Comments

@yaoxc
Copy link

yaoxc commented Nov 16, 2017

No description provided.

@yaoxc
Copy link
Author

yaoxc commented Nov 17, 2017

我又验证了几次,App退到后台很长一段时间,如果没被系统杀掉,再进入前台,本地的代理服务很可能挂掉,造成视频就播放不了了。

@mayudong1
Copy link
Contributor

不如把应用方式改成在进入后台后停止本地代理服务,回到前台后再重新开启
现在demo中虽然加了后台运行的代码,但其实那个操作也只能保证短时间内应用不被清理,时间太长是依然会有问题

@yaoxc
Copy link
Author

yaoxc commented Nov 20, 2017

@mayudong1 如果代理服务停止,只需要重新启动,不需要重新做缓存大小或缓存文件数量这些设置了吧?
if (![[KSYHTTPProxyService sharedInstance] isRunning]) { [[KSYHTTPProxyService sharedInstance] startServer]; }

@mayudong1
Copy link
Contributor

那个KSYHTTPProxyService用的是单例模式,如果没有被销毁过就不需要重新设置了,但以防万一,还是建议重新设置一下

@yaoxc
Copy link
Author

yaoxc commented Nov 23, 2017

@mayudong1 超过这个函数设置的最大文件数,
-(void)setMaxFilesCountLimited:(NSInteger)maxFilesCount;
会怎么处理缓存呢?

@yaoxc
Copy link
Author

yaoxc commented Nov 23, 2017

@mayudong1 我在播放前检查服务是否启动,
if (![[KSYHTTPProxyService sharedInstance] isRunning]) {
[[KSYHTTPProxyService sharedInstance] startServer];
}
执行启动服务,本地代理还是未启动,播放不了视频,望回复,是什么原因。。。

@lwb22853628
Copy link

@mayudong1 我也遇到此问题 该如何解决?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants