chenjunkai před 5 roky
rodič
revize
94e121ee33
1 změnil soubory, kde provedl 14 přidání a 16 odebrání
  1. 14 16
      controller/index.py

+ 14 - 16
controller/index.py

@@ -197,22 +197,20 @@ class oa2RtspStartView(TemplateView):
             print(PWD)
             print(MSG)
             self.runSendRtspMsg(UID, PWD, MSG)
-            res_json = [
-                {
-                    'endpointId': id,
-                    'manufacturerName': 'Axis',
-                    'manufacturerId': 'axis-ACCC8E5E7513',
-                    'modelName': 'P1425-LE',
-                    'friendlyName': 'Camera {nick}'.format(nick=ur_qs[0]['nick']),
-                    'description': 'Camera {nick}'.format(nick=ur_qs[0]['nick']),
-                    'resolutions': [{'width': 1280, 'height': 720}],
-                    'videoCodecs': ['H264'],
-                    'audioCodecs': ['ACC'],
-                    'protocols': ['RTSP'],
-                    'authorizationTypes': ['NONE'],
-                    'uri': 'rtsp://www.zositech.org:443/{stream_name}'.format(stream_name=ur_qs[0]['rtsp_url'])
-                }
-            ]
+            res_json = {
+                'endpointId': id,
+                'manufacturerName': 'Axis',
+                'manufacturerId': 'axis-ACCC8E5E7513',
+                'modelName': 'P1425-LE',
+                'friendlyName': 'Camera {nick}'.format(nick=ur_qs[0]['nick']),
+                'description': 'Camera {nick}'.format(nick=ur_qs[0]['nick']),
+                'resolutions': [{'width': 1280, 'height': 720}],
+                'videoCodecs': ['H264'],
+                'audioCodecs': ['ACC'],
+                'protocols': ['RTSP'],
+                'authorizationTypes': ['NONE'],
+                'uri': 'rtsp://www.zositech.org:443/{stream_name}'.format(stream_name=ur_qs[0]['rtsp_url'])
+            }
             return JsonResponse(res_json, safe=False)
         else:
             return JsonResponse({'msg': 'wrong'})