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

【问答】Android 中通过MediaPlayer播放视频如何切换原伴唱 #749

Open
jameschen4540 opened this issue Mar 5, 2020 · 2 comments

Comments

@jameschen4540
Copy link

开始准备是说通过MediaPlayer.getTrackInfo()来获取音轨,但是获取的音轨数组长度为0,后来通过MediaPlayer.setVolume(leftVolume, rightVolume)实现,但是这个也有问题,在某些设备上面不能切换,有些设备只显示原唱,有些只显示伴唱

@ipcjs
Copy link

ipcjs commented Mar 6, 2020

单条音轨也可以分原唱伴唱?

@jameschen4540
Copy link
Author

是单条音轨,包含左右声道,通过调用MediaPlayer.setVolume(0, 1),MediaPlayer.setVolume(1, 1)方法是可以正常切换原唱和背景音的,只是在某些设备上这个方法不起作用,所以想问下有没有其他方法

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