how to remove fade in and fade out of audio in begining and when we pause the player? #51
-
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.
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.
-
Thank you so much. |
Beta Was this translation helpful? Give feedback.
add a new method
setVolumeEaseEnabled(boolean)
. overridePlayerService#onCreateMusicPlayer
and invokemediaMusicPlayer.setVolumeEaseEnabled(false)
.Example: