yljk标准视频加密
This commit is contained in:
@@ -73,6 +73,7 @@ public class ShiroConfig {
|
|||||||
// filterMap.put("/book/bookchaptercontent/**","anon");
|
// filterMap.put("/book/bookchaptercontent/**","anon");
|
||||||
filterMap.put("/book/user/**","anon");
|
filterMap.put("/book/user/**","anon");
|
||||||
filterMap.put("/sys/vodAli/vodAliVideoRe","anon");
|
filterMap.put("/sys/vodAli/vodAliVideoRe","anon");
|
||||||
|
filterMap.put("/sys/vodAli/getTokenForYLJK","anon");
|
||||||
filterMap.put("/webjars/**", "anon");
|
filterMap.put("/webjars/**", "anon");
|
||||||
filterMap.put("/druid/**", "anon");
|
filterMap.put("/druid/**", "anon");
|
||||||
filterMap.put("/app/**", "anon");
|
filterMap.put("/app/**", "anon");
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.peanut.modules.sys.controller;
|
package com.peanut.modules.sys.controller;
|
||||||
|
|
||||||
import com.aliyun.vod20170321.models.DecryptKMSDataKeyResponseBody;
|
import com.aliyun.vod20170321.models.DecryptKMSDataKeyResponseBody;
|
||||||
|
import com.aliyun.vod20170321.models.GetPlayInfoResponseBody;
|
||||||
import com.peanut.common.utils.PlayToken;
|
import com.peanut.common.utils.PlayToken;
|
||||||
import com.peanut.common.utils.SpdbUtil;
|
import com.peanut.common.utils.SpdbUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -46,5 +47,13 @@ public class VodAliController {
|
|||||||
spdbUtil.vodTranslationM3u8(vid);
|
spdbUtil.vodTranslationM3u8(vid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/getTokenForYLJK")
|
||||||
|
public String getTokenForYLJK(String vid) throws Exception {
|
||||||
|
String s = playToken.generateToken();
|
||||||
|
GetPlayInfoResponseBody urlBody = SpdbUtil.getUrl(vid);
|
||||||
|
String url = urlBody==null?null:urlBody.getPlayInfoList().getPlayInfo().get(0).getPlayURL()+"?MtsHlsUriToken="+s;
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user