Ivelius
Ivelius

Reputation: 5013

Playing RTSP Video stream with authentication Android

I have Server that streams MPEG-4 H264 decoded video via RTSP with simple authentication. How can I provide authentication details to MediaPlayer ?

Upvotes: 2

Views: 1831

Answers (1)

dst
dst

Reputation: 3337

You can set your headers manually when using setDataSource (Context context, Uri uri, Map<String, String> headers). I'd guess (never worked with RTSP, yet) that you need an "Authorization" header with a base64-encoded username and password combination.

Upvotes: 2

Related Questions