开发者

Android MediaPlayer on UI Thread

When using android's mediaplayer to stream audio off the web, is it okay to call all the functions (stop(), reset(), setDataSource(), etc.) on the UI thread, or should I create a separate thread for that. In other words, will those functions ever take a few seconds to respond and thereby cause pe开发者_JS百科rceptible lag?

If I do have to call them from separate threads, what's the best way to handle that?


I call MediaPlayer methods off the default app thread without any issues. Do be sure to make proper use of its state machine, of course :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜