媒体播放器禁止错误(403)

时间:2016-01-07 08:09:23

标签: android android-mediaplayer

我一直在从我的服务器流式播放音乐,但现在由于一些奇怪的原因,我收到错误403.在logcat上,我有这个,

01-07 11:07:44.077 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [seekToEx] HTTP header =>User-Agent: LG-D855/V21a Player/LG Player 1.0 for Android 5.0 (stagefright alternative)
01-07 11:07:48.794 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response code] STATUS CODE:403
01-07 11:07:48.795 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] null: [HTTP/1.1 403 Forbidden]
01-07 11:07:48.795 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] Connection: [close]
01-07 11:07:48.795 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] Content-Length: [0]
01-07 11:07:48.795 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] Content-Type: [text/plain]
01-07 11:07:48.796 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] Date: [Thu, 07 Jan 2016 08:07:50 GMT]
01-07 11:07:48.796 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] Last-Modified: [Wed, 02 May 2007 10:26:10 GMT]
01-07 11:07:48.796 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] Server: [gvs 1.0]
01-07 11:07:48.796 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] X-Android-Received-Millis: [1452154068792]
01-07 11:07:48.796 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] X-Android-Response-Source: [NETWORK 403]
01-07 11:07:48.797 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] X-Android-Sent-Millis: [1452154067394]
01-07 11:07:48.797 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [response header] X-Content-Type-Options: [nosniff]
01-07 11:07:48.797 15543-15688/com.radioafrica.music D/MediaHTTPConnectionEx: [ResponseMessage]:Forbidden
01-07 11:07:48.798 15543-15688/com.radioafrica.music D/MediaHTTPConnection: readAt 0 / 32768 => -1

我似乎无法播放任何信息流。什么似乎是问题?

1 个答案:

答案 0 :(得分:0)

HTTP Error 403 means Forbidden

服务器拒绝您访问该资源。这可能是由不同的事情造成的 -

  1. 未经过身份验证
  2. IP Block
  3. 用户代理阻止
  4. 服务器问题(文件系统权限)
  5. 如果你说这是一个新问题,而你没有更改代码 - 主机服务也可以进行更改,现在阻止你的播放器。

    您是否可以从真实的浏览器中获取流?从电脑?不同的IP?