[FREE]πŸ”Š MKMusicPLayer Extension with remarkable features

hi. how work this extension on the background?

hello I found a bug, where mp3 files are loaded from url. If you play it and then immediately pause it before entering the first second, the music will still play

Extension was updated to V3 to be easier to use

what changed ?

  • Loading Audio:

    • The PlayAudio() function was renamed to LoadAudio() to better reflect its functionality of loading audio without immediately playing it.

    • Both LoadAudio() and LoadAudioFromURL() were updated to use mediaPlayer.prepareAsync() for asynchronous audio preparation, improving responsiveness.

    • Error handling was improved by catching specific exceptions (e.g., IOException, IllegalArgumentException) and triggering an AudioLoadError event with detailed error messages.

  • The FadeIn() and FadeOut() functions were rewritten to use ValueAnimator instead of Handler.postDelayed() for a more efficient and smoother fading implementation.

  • An onAnimationStart() listener was added to the FadeIn() function to resume playback if the player is paused when the fade-in effect starts.

  • Improved Responsiveness: Asynchronous audio preparation prevents UI freezes.

  • Robust Error Handling: Specific exception handling and detailed error messages.

  • Optimized Fade Effects: Smoother and more efficient fading using ValueAnimator.

1 Like

thank you @_Ahmed for this update , i have used this on my app. :+1:

1 Like

You have mentioned the slider as jump to audio position

But you have not mentioned that in aia, can you show me blocks to use that feature, i tried but failed

Since LoadAutio() is just loading file, how to play audio?

Use resume

Use this to start or resume

1 Like

Reply my question too, its 8 days since i asked