protyposis / MediaPlayer-Extended

Android MediaPlayer API-compatible media player library with exact seek and DASH support
Apache License 2.0
440 stars 127 forks source link

RTSP protocol #59

Closed hsunwei423 closed 7 years ago

hsunwei423 commented 7 years ago

hello, could this project support RTSP protocol?

I tried some RTSP uris but it can't work.

protyposis commented 7 years ago

RTSP is a supported network protocol so it should work. Are you sure the stream uses supported codecs? Can you provide a test URI?

hsunwei423 commented 7 years ago

I tried to test my onvif device but it didn't work. URI is like rtsp://[username]:[password]@192.168.x.x:554/... , would you tell me what's happened?

protyposis commented 7 years ago

I'm sorry but that is obviously not an URI I can test.

hsunwei423 commented 7 years ago

Hello, I think I found a solution which I tried to do Basic Authentication with header but I don't know how to add header in your code. Would you tell me how to do this? http://cruxintw.blogspot.tw/2015/03/android-mediaplayer-rtsp-streaming.html

protyposis commented 7 years ago

You can use one of these methods and supply the headers as a map: