Method for launching audio player on Android from web page for streaming media

后端 未结 4 1168
终归单人心
终归单人心 2021-01-13 12:50

To link to SHOUTcast/HTTP internet radio streams, traditionally you would link to a playlist file, such as an M3U or PLS. From there, the browser would launch the audio pla

4条回答
  •  礼貌的吻别
    2021-01-13 13:37

    What kind of stream does you M3U file contain?

    You can skip the M3U and set your datasource directly to a rtsp stream for example.

    mediaPlayer.setDataSource("rtsp://xxx/stream.stream");
    

    Works perfectly

    Don't forget to run it in a different thread.

提交回复
热议问题