侧边栏壁纸
  • 累计撰写 781 篇文章
  • 累计创建 1 个标签
  • 累计收到 1 条评论
标签搜索

请求

Dettan
2021-04-10 / 0 评论 / 0 点赞 / 107 阅读 / 715 字
温馨提示:
本文最后更新于 2022-04-30,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

if (wsinit == 0) {
    var url = "http://localhost:8090/vmp/dvDevice/getAudioUrl?id=34020000001320000002@34020000001320000002&format=flv&transporttype=udp";
    var request = new XMLHttpRequest();
    request.open("POST", url, false);
    request.setRequestHeader('Access-Control-Allow-Headers', '*');
    request.setRequestHeader("Access-Control-Allow-Origin", '*');
request.send(null);
var obj = JSON.parse(request.responseText);
var port = obj["TransportPort"];
var pushUrl = "ws://127.0.0.1:12345/cgmedia/websocket/pushaudiostream?id=34020000001320000002@34020000001320000002&transportport=";
pushUrl += port;
pushUrl += "&format=mp3";

wsinit = 1;

}






0

评论区