iZakirSheikh / Audiofy

▶ Simple and lightweight, yet polished and powerful Android Audio/Video player based on ExoPlayer, Media3 and Jetpack Compose
https://play.google.com/store/apps/details?id=com.prime.player
Apache License 2.0
205 stars 19 forks source link

start Playback #69

Closed valiantyan closed 3 months ago

valiantyan commented 3 months ago

Why can't I see how to start the Playback service?

iZakirSheikh commented 3 months ago

I can't understand you. What are you refering to.

valiantyan commented 3 months ago

Why is there no startService Playback code? I didn't understand how to startService when I looked at the code.

iZakirSheikh commented 3 months ago

Actually

Why is there no startService Playback code? I didn't understand how to startService when I looked at the code.

Oh I see. Actually it is automatically handled by Android media3 library. When you call play on Remote (see RemoteImpl); the library start is automatically handled.

valiantyan commented 3 months ago

I found that after playing the wrong music file, the playback service can no longer work properly

Uploading error.mp4…

valiantyan commented 3 months ago

https://github.com/iZakirSheikh/Audiofy/assets/5484163/787f2afb-4fcf-4b16-89b5-b190349f85dc

iZakirSheikh commented 3 months ago
valiantyan commented 3 months ago
valiantyan commented 3 months ago

error file [file.zip](https://github.com/user-attachments/files/15781240/file.zip)

valiantyan commented 3 months ago

image Add player.prepare() and it will be normal