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

我现在无法在onPrepared获取AudioSessionId,请问该怎么解决? #3609

Closed
q-Mony opened this issue Jun 21, 2022 · 4 comments
Closed

Comments

@q-Mony
Copy link

q-Mony commented Jun 21, 2022

问题描述:

我现在想做一个随声音变化的动画,这个时候需要用到AudioSessionId,我现在使用demo中的无控制播放界面来播放音乐,继承的是StandardGSYVideoPlayer,我现在无法在onPrepared获取AudioSessionId,请问该怎么解决?

问题机型/系统:

真机 红米k30尊享版

GSY依赖版本

//视频播放器
implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.1.8-release-jitpack'
//是否需要ExoPlayer模式
implementation 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer-exo2:v8.1.8-release-jitpack'
//更多 ijk 的编码支持
implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-ex_so:v8.1.8-release-jitpack'

Demo中的复现步骤

我现在使用demo中的无控制播放界面来播放音乐,继承的是StandardGSYVideoPlayer,我现在无法在onPrepared获取AudioSessionId

问题代码:(如果有)

            LogUtil.d(
                "获取session2",
                "${
                    GSYVideoManager.instance().getCurPlayerManager().getMediaPlayer()
                        .getAudioSessionId()
                }"
            )
            LogUtil.d("获取session21", "${gsyVideoManager.player.mediaPlayer.audioSessionId}")

获取的全是0

CarGuo added a commit that referenced this issue Jun 22, 2022
@CarGuo
Copy link
Owner

CarGuo commented Jun 22, 2022

image

应该 exo 的默认有问题,已经修改,下版本发布

@CarGuo CarGuo closed this as completed Jun 22, 2022
@q-Mony
Copy link
Author

q-Mony commented Jun 22, 2022

image

应该 exo 的默认有问题,已经修改,下版本发布
好的

@CarGuo
Copy link
Owner

CarGuo commented Jun 23, 2022

已经发布 v8.3.1-release-jitpack

@q-Mony
Copy link
Author

q-Mony commented Jun 23, 2022

已经发布 v8.3.1-release-jitpack

👌🏻

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