I have rtsp audio streams from a specific site (m.aveamuzik.com) that play within a browser. When I try to play the same stream using MediaPlayer
class, I get MEDIA_ERROR_UNKNOWN
(with extra=-2147483648
). The error is not well documented but a little googling shows that it is most probably because of unsupported media format.
My question is, if MediaPlayer
class does not support some format, how does the built-in browser play it? Also, how to use the same mechanism used by the browser in my code, instead of the MediaPlayer
class?
Edit 1: @Joe
I tried the following code:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(streamURL));
startActivity(intent);
MX Player and BSPlayer showed up as options to open the file, but not anything related with AudioPreviewActivity
. Actually this is quite reasonable as my URLs are rtsp
, but the intent filters for AudioPreviewActivity
are just for http
, file
and content
type of URIs.