bilibili / flv.js

HTML5 FLV Player
Apache License 2.0
22.85k stars 3.38k forks source link

demo 不能运行啊 #11

Closed haowenjiang closed 7 years ago

haowenjiang commented 7 years ago

demo 不能运行啊

inwikipedia commented 7 years ago

确实不能运行 为啥一直有人转发....

bulesky520 commented 7 years ago

可以运行的,主要看你提示什么?demo 上是要提供一个json 文件访问。json包含的基本内容如下:{
"type":"mp4", "url":"http://www.zk888.net/sp/%E5%BA%93%E5%AD%98%E7%AE%A1%E7%90%86/%E4%B8%B2%E7%A0%81%E8%BF%BD%E6%BA%AF.mp4" } 或者你也可以直接按主页上的Demo 创建更简单

xqq commented 7 years ago

You may need to configure Access-Control-Allow-Origin header according to CORS policy

See https://github.com/Bilibili/flv.js/blob/master/docs/cors.md

haowenjiang commented 7 years ago

按说明编译一下的确是可以运行了。 还有个问题,直播怎么做?用 httpflv 还是 websocket,特别是 websocket 怎么做?

xqq commented 7 years ago

httpflv,配置CORS头即可 websocket 需要自己写服务端支持

ZoroZdd commented 7 years ago

运行demo flvjs这个对象报错 import也报错? 莫非是我打开方式不对?

xqq commented 7 years ago

@ZoroZdd 从 https://github.com/Bilibili/flv.js/releases 下载编译好的js或自行编译引入

ZoroZdd commented 7 years ago

谢作者 我试试

tenglongwentian commented 7 years ago

求能够运行的demo,江湖救急

yangzhencheng commented 6 years ago

mp4 可以运行,但 flv 是不能运行的!不知道为什么……关键是,我要播放 flv 文件!