MediaPlayer is a big class for all purpose media type playing, including local file and streaming playing.
The story start from
android.media package locates in
frameworks/base/media, and it's Java source is
This package provide various of interface for media playing/recording/decoding etc, including the
MediaPlayer we are going to talk about today.
I would not talk much about
MediaPlayer constrution, the part we are insterested is what happens after calling
From developer.android, MediaPlayer provide 4 types of method reloading for
void setDataSource(String path)
void setDataSource(Context context, Uri uri, Map<String, String> headers)
void setDataSource(Context context, Uri uri)
void setDataSource(FileDescriptor fd, long offset, long length)
void setDataSource(FileDescriptor fd)