Should a MediaPlayer run in separate thread?

后端 未结 3 1959
花落未央
花落未央 2020-12-15 21:52

I\'m building an app that streams music from a web server. The app has foreground service that uses a MediaPlayer for playback.

My code is based on this example: ht

3条回答
  •  再見小時候
    2020-12-15 22:04

    Could the streaming music be causing the main thread to stop until the music has finished streaming? This could be why it is slowing it right down.

    I'm no expert and am currently learning myself, but it's worth thinking about.

提交回复
热议问题