how to remove fade in and fade out of audio in begining and when we pause the player? #51
Answered
by
jrfeng
sampatsharma143
asked this question in
Q&A
-
how to remove fade in and fade out of audio in begining and when we pause the player? |
Beta Was this translation helpful? Give feedback.
Answered by
jrfeng
Jul 30, 2023
Replies: 2 comments
-
add a new method Example: @NonNull
@Override
protected MusicPlayer onCreateMusicPlayer(@NonNull Context context, @NonNull MusicItem musicItem, @NonNull Uri uri) {
MediaMusicPlayer mediaMusicPlayer = new MediaMusicPlayer(context,uri);
mediaMusicPlayer.setVolumeEaseEnabled(false); // disable volume ease effect
return mediaMusicPlayer;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jrfeng
-
Thank you so much. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add a new method
setVolumeEaseEnabled(boolean)
. overridePlayerService#onCreateMusicPlayer
and invokemediaMusicPlayer.setVolumeEaseEnabled(false)
.Example: