From 0802677d0b609abc8de0f0d882c6dbf483fc1987 Mon Sep 17 00:00:00 2001 From: 64850858 <648540858@qq.com> Date: 星期五, 25 六月 2021 16:58:27 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java index 6d0bbf1..535c790 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java @@ -96,15 +96,16 @@ try { String classPath = ResourceUtils.getURL("classpath:").getPath(); // System.out.println(classPath); - String path = classPath + "static/static/snap/"; + // 鍏煎鎵撳寘涓簀ar鐨刢lass璺緞 if(classPath.contains("jar")) { classPath = classPath.substring(0, classPath.lastIndexOf(".")); - classPath = classPath.substring(0, classPath.lastIndexOf("/")); - path = classPath + "/snap/"; + classPath = classPath.substring(0, classPath.lastIndexOf("/") + 1); } - if (path.startsWith("file:")) { - path = path.substring(path.indexOf(":") + 1, path.length()); + if (classPath.startsWith("file:")) { + classPath = classPath.substring(classPath.indexOf(":") + 1, classPath.length()); } + String path = classPath + "static/static/snap/"; + // 鍏煎Windows绯荤粺璺緞锛堝幓闄ゅ墠闈㈢殑鈥�/鈥濓級 if(System.getProperty("os.name").contains("indows")) { path = path.substring(1, path.length()); } @@ -116,7 +117,7 @@ StreamInfo streamInfoForSuccess = (StreamInfo)wvpResult.getData(); String streamUrl = streamInfoForSuccess.getFmp4(); // 璇锋眰鎴浘 - zlmresTfulUtils.getSnap(streamUrl, 5, 1, path, fileName); + zlmresTfulUtils.getSnap(streamUrl, 15, 1, path, fileName); } } System.out.println(path); -- Gitblit v1.8.0