Windows 7 本地环境。
我的设置是这样的:
Red5/webapps/app/streams/vid.flv
我需要访问视频。我正在尝试通过 JW 播放器播放文件,但它给出了 not found or access denied
错误
我在浏览器中输入了 JW 播放器显示的路径,它是 localhost:5080/app/streams/vid.flv
它给了我一个 http 403
错误。
我该如何解决这个问题?提前致谢。
更多信息:
我可以去 http://localhost:5080/webapp/
并查看目录列表,其中包含 streams
和 temp
。
我可以进入 temp
,并获得另一个目录列表。
但是,我不能进入 streams
,因为当我尝试时,它会给我一个 403
目录列表还为我提供了 Tomcat 版本信息,即 Apache Tomcat/6.0.26
最佳答案
到目前为止,我知道 Red5 不支持 http streaming
。当您使用 JW Player 时,您可以使用 rtmp 协议(protocol)
关注this tutorial设置 JW Player 以使用 rtmp
播放视频。
“403 禁止”的更新
默认情况下,red5 应用程序中的 web.xml 配置为禁止访问 streams 文件夹
。删除下面的代码片段以访问它:
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/streams/*</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
但请记住,通过使用直接 url 路径访问 .flv
文件,它将下载文件但不会流式传输它。
关于flash - Red5/Tomcat "403 forbidden"某目录错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17245357/