Chimeejs / chimee

a video player framework aims to bring wonderful experience on browser
http://chimee.pyzy.net/
MIT License
2.4k stars 201 forks source link

点播FLV,静态资源在部分WEB服务器中不支持OPTION方法 #144

Closed dutong0321 closed 6 years ago

dutong0321 commented 6 years ago

Expected Behavior【期望行为】

是否能够告知示例中的FLV源是采用的是什么WEB服务器,又是如何配置的?

songguangyu commented 6 years ago

在nginx里 针对option 配置一下就可以了 返回 http code 200

dutong0321 commented 6 years ago

@songguangyu 非常感谢您的帮助,之前通过搜索引擎尝试过这种方法,结果会报出Request header field range is not allowed by Access-Control-Allow-Headers in preflight response这样的错误,然后我又将range添加到Access-Control-Allow-Headers中,但是依然无解,错误依旧在。

dutong0321 commented 6 years ago

如果出现跨域问题,配置跨域访问,如果出现405 not allowed,在nginx的配置文件中,需要对option配置,返回http code 200,如果出现Request header field range is not allowed by Access-Control-Allow-Headers in preflight response,需要将range添加到Access-Control-Allow-Headers,如果依然存在该问题,请检查flv文件,如:nginx-rtmp-module中的recoder后,需要用yamdi等工具添加关键帧。