。。。
This commit is contained in:
parent
6e4c75927e
commit
d95fd0496a
|
@ -33,10 +33,14 @@ public class BaoTouVideoPreviewService extends AbstractVideoPreviewService {
|
|||
@Override
|
||||
public String getHls(String key) {
|
||||
String hls = null;
|
||||
Request request = new Request.Builder().url(String.format(baoTouProperties.getHlsurl(), key)).build();
|
||||
String url = String.format(baoTouProperties.getHlsurl(), key);
|
||||
logger.info("包头预览:" + url);
|
||||
Request request = new Request.Builder().url(url).build();
|
||||
try (Response response = client.newCall(request).execute()) {
|
||||
if (response.isSuccessful()) {
|
||||
JSONObject jsonObject = JSON.parseObject(response.body().string());
|
||||
String body = response.body().string();
|
||||
logger.error("包头预览返回:" + body);
|
||||
JSONObject jsonObject = JSON.parseObject(body);
|
||||
if (jsonObject.containsKey("data")) {
|
||||
hls = jsonObject.getString("data");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue