开发者

MediaPlayer Redirect return http 307 on Android 2.2

开发者 https://www.devze.com 2023-01-28 03:05 出处:网络
I have an app using the MediaPlayer class... It has always worked on 1.6 and 2.1 devices, but since I have beentesting on a 2.2 device (and the emulator) I have noticed that it won\'t stream a mp3 fil

I have an app using the MediaPlayer class... It has always worked on 1.6 and 2.1 devices, but since I have beentesting on a 2.2 device (and the emulator) I have noticed that it won't stream a mp3 file if a redirect takes place first... It will return the following :

12-04 11:40:48.813: ERROR/HTTPDataSource(34): HTTP request failed w/ http status 307
12-04 11:40:48.813: INFO/AwesomePlayer(34): mConnectingDataSource->connect() returned -1004
12-04 11:40:开发者_JAVA百科48.813: ERROR/MediaPlayer(2305): error (1, -1004)
12-04 11:40:48.813: ERROR/MediaPlayer(2305): Error (1,-1004)

I was wondering if anyone has noticed this behavior and if so if anyone has any solution for the problem ? It might be an "AwesomePlayer" but it doesnt behave any better than it predecessor :(


As much as i have been played with MediaPlayer Class, I think you Have to give final URL ( NO REDIRECTION ) to MediaPlayer. i faced similar problem in one of my project.

Sol: find out some way to get final redirected-url.

0

精彩评论

暂无评论...
验证码 换一张
取 消