DaiCuoBBs

 找回密码
 免费注册

QQ登录

只需一步,快速开始

[Nginx] nginx配置支持m3u8 ts hls

[复制链接]
admin 发表于 2020-5-29 02:11:19 | 显示全部楼层 |阅读模式
  1. location /hls/{
  2.   types{
  3.     application/vnd.apple.mpegurl m3u8;
  4.     video/mp2t ts;
  5.   }
  6.   expires -1;
  7.   add_header Cache-Control no-cache;
  8.   add_header 'Access-Control-Allow-Origin' '*';
  9.   add_header 'Access-Control-Allow-Credentials' 'true';
  10.   add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
  11.   add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
  12. }
复制代码

mime.types文件中增加

application/x-mpegURL m3u8;
application/vna.apple.mpegurl m3u8;
video/mp2t ts;

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|Archiver|手机版|小黑屋|大错站长论坛

GMT+8, 2020-7-2 13:14 , Processed in 0.055377 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表