Onvif | RTSP streaming media service
Building entrance, extract the startup box: www.liveqing.com/docs/downlo…
How to call interfaces in secondary development
Here is a complete example of a jquery call
< HTML >< head> <title>LiveNVR interface call example </title> <script SRC ="jquery-2.2.4.js"></script> </head> <body> </body> <script> $.ajax({ url: "http://nvr.liveqing.com:10800/api/v1/login", type: 'GET', data: { username:"test", password:"098f6bcd4621d373cade4e832627b4f6" }, xhrFields: { withCredentials: true }, crossDomain: true, success: function (ret) { console.log(ret) var token = ret.LiveQing.Body.Token; Alert (token) getchannels (token)}, error: function (XHR, textStatus errorThrown) {alert (XHR. Status)}}); <! Function getChannels (token) {$. Ajax ({url: "http://nvr.liveqing.com:10800/api/v1/getchannels", type: 'GET', data: { start:0, limit:10 }, xhrFields: { withCredentials: true }, crossDomain: true, beforeSend: function (xhr) { xhr.setRequestHeader("cookie", "token="+token); }, success: function (ret) { console.log(ret) alert(JSON.stringify(ret)); }, error: function (XHR, textStatus errorThrown) {alert (XHR. Status)}}); } </script> </html>Copy the code