Browse Source

修改直播为wss

bihs 5 days ago
parent
commit
07f5447430

+ 2 - 2
qmjszx-business/src/main/java/beilv/hik/controller/utils/GetCameraPreviewURL.java

@@ -18,7 +18,7 @@ public class GetCameraPreviewURL {
         ArtemisConfig.appKey = appKey;  // 密钥appkey
         ArtemisConfig.appSecret = appSecret;// 密钥appSecret
         final String ARTEMIS_PATH = "/artemis";
-        final String previewURLsApi = ARTEMIS_PATH + "/api/video/v1/cameras/previewURLs";
+        final String previewURLsApi = ARTEMIS_PATH + "/api/video/v2/cameras/previewURLs";
         Map<String, String> path = new HashMap<String, String>(2) {
             {
                 put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
@@ -28,7 +28,7 @@ public class GetCameraPreviewURL {
         JSONObject jsonBody = new JSONObject();
         jsonBody.put("cameraIndexCode", cameraIndexCode);
         jsonBody.put("streamType", 0);
-        jsonBody.put("protocol", "ws");
+        jsonBody.put("protocol", "wss");
         jsonBody.put("transmode", 1);
         jsonBody.put("expand", "streamform=ps");
         String body = jsonBody.toJSONString();