m3u8 响应头兼容部分浏览器直接解析 m3u8 文件

This commit is contained in:
赵俊
2021-05-30 15:53:55 +08:00
parent b5c757f9f0
commit 2a949db5d2

View File

@@ -72,7 +72,7 @@ public class DirectLinkController {
if (StrUtil.equalsIgnoreCase(FileUtil.extName(fileItem.getName()), "m3u8")) {
String textContent = HttpUtil.getTextContent(url);
response.setContentType("application/json;charset=utf-8");
response.setContentType("application/vnd.apple.mpegurl;charset=utf-8");
PrintWriter out = response.getWriter();
out.write(textContent);
out.flush();