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

希望可以实现audio focus,增加用户体验 #89

Closed
yinlianggood opened this issue Nov 6, 2019 · 1 comment
Closed

希望可以实现audio focus,增加用户体验 #89

yinlianggood opened this issue Nov 6, 2019 · 1 comment

Comments

@yinlianggood
Copy link

希望大佬实现播放音频,暂停其它正在播放中的应用。

@befovy
Copy link
Owner

befovy commented Nov 7, 2019

考虑实现如下:
增加一个 FijkPlayer 的设置选项,
如果选项打开后,
当播放器进入 started 状态的时候,会去申请 audioFocus。
退出 started 状态时, 释放 audioFocus。
出现 audioFocus 错误不进行处理,不判断 audioFocus 返回值。

上面实现也仅适用于 单个播放器实例,如果同时打开多个播放器,上面规则不使用。

audioFocus 怎么处理又好多情况,都涉及到产品如何决策,没办法做一个通用的,只能搞一个最简单的实现。

befovy added a commit that referenced this issue Nov 22, 2019
* fix(example): add enable-accurate-seek option, fix #113

* feat: android and iOS hostOption, android request and release audio focus

* docs: add license for source code

* fix: clear request status when AUDIOFOCUS_LOSS_TRANSIENT

finish #89
@befovy befovy closed this as completed Nov 22, 2019
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

2 participants