Aliplayer2.0.1上支持了在PC端的chrome、firefox等浏览器上支持h5播放器播放m3u8视频,会自动适配,用户不需要设置参数。
当出现下面错误时,需要启用播放域名允许跨域访问,
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9030' is therefore not allowed access.
添加允许跨域访问的header,值为播放视频网站的域名,比如网站为http://acfunc.com, 那么值就为http://acfunc.com
如果ts分片地址的域名和m3u8的地址的域名不一样,那么ts分片地址的域名也需要添加允许跨域访问的header