liyuntian 10 сар өмнө
parent
commit
7395170e0d

+ 4 - 4
mcp/src/main/java/com/chuanxia/mcp/service/impl/CdnDoaminServiceImpl.java

@@ -179,7 +179,7 @@ public class CdnDoaminServiceImpl extends ServiceImpl<CdnDomainMapper, CdnDomain
                 String header = request.getHeader("user-agent");
                 UserAgent userAgent = UserAgent.parseUserAgentString(header);
                 CdnUa uaByConfig = getUaByConfig(userAgent);
-                String ratio = "1024*768";
+                String ratio = "1024x768";
                 if (uaByConfig != null) {
                     //根据配置+网速,生成对应分辨率
                     Integer level = uaByConfig.getLevel();
@@ -249,7 +249,7 @@ public class CdnDoaminServiceImpl extends ServiceImpl<CdnDomainMapper, CdnDomain
         }
         response.setContentType("text/plain");
         response.setHeader("Content-Disposition", "attachment;filename=" + id + ".m3u8");
-        ServletOutputStream out = null;
+        ServletOutputStream out;
         try {
             out = response.getOutputStream();
             StringBuilder builder = new StringBuilder();
@@ -342,8 +342,8 @@ public class CdnDoaminServiceImpl extends ServiceImpl<CdnDomainMapper, CdnDomain
     /**
      * 根据当前浏览器ua,获取对应配置
      *
-     * @param userAgent
-     * @return
+     * @param userAgent ua信息
+     * @return ua配置信息
      */
     private CdnUa getUaByConfig(UserAgent userAgent) {
         LambdaQueryWrapper<CdnUa> query = Wrappers.lambdaQuery();