Commit 395d70a8b8b255bc01e84f01d96332a8ba21fd95

Authored by liujun001
1 parent b7aaa70a

修改超时时间

src/main/resources/application-test.properties
... ... @@ -78,7 +78,7 @@ wvp.login.url=http://61.169.120.202:28080/api/user/login
78 78 wvp.channel.list.url=http://61.169.120.202:28080/api/device/query/query/channel/carNo/{carNo}
79 79 wvp.channel.list.img.url=http://61.169.120.202:28080/api/device/query/snap/
80 80 wvp.channel.play.url =http://61.169.120.202:1091/rtp/
81   -wvp.channel.live.broadcast.url=http://61.169.120.202:28080/#/play/wasm/ws%3A%2F%2F192.168.169.100%3A1091%2Frtp%2F{device}_{channel}.live.flv
  81 +wvp.channel.live.broadcast.url=http://61.169.120.202:28080/#/play/wasm/ws%3A%2F%2F61.169.120.202%3A1091%2Frtp%2F{device}_{channel}.live.flv
82 82 wvp.channel.history.list.url=http://61.169.120.202:28080/api/gb_record/query/{device}/{channel}?startTime={startTimeStr}&endTime={endTimeStr}
83 83  
84 84  
... ...
src/main/resources/static/pages/video/video.js
... ... @@ -204,15 +204,11 @@ function playWvpVideo(playURL, deviceId, channelId) {
204 204  
205 205 }
206 206  
207   -function playVideo(url, ID) {
  207 +function playVideo(url, ID,time) {
208 208 return new WebMediaPlayer(url, ID, function () {
209 209 }, {
210   - cbUserPtr: this,
211   - decodeType: 'auto',
212   - openAudio: true,
213   - autoplay: true,
214   - bigPlay: false,
215   - showMode: false
  210 + autoplay: 1,
  211 + currentTime:time
216 212 }).play();
217 213 }
218 214  
... ... @@ -314,7 +310,7 @@ function playDeviceVidemoQueryHistory(idDiv, url, device, channel, startTime, en
314 310 console.log(url);
315 311 var idDiv1 = "device_video_play_" + (Date.now());
316 312 $("#videoPlay", $("#" + idDiv)).html("<div id='" + idDiv1 + "' style='height:550px;width:99%'></div>")
317   - player = playVideo(url, idDiv1);
  313 + player = playVideo(url, idDiv1,0);
318 314  
319 315 }
320 316  
... ... @@ -356,7 +352,7 @@ function skeywebPlayerChannel($skeyewebplayer, carNo) {
356 352 if (rep.data) {
357 353 let html = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" class=\"layui-table\"><tbody>";
358 354 $.each(rep.data, function (index, node) {
359   - html = html + "<tr><td><button class=\"layui-btn layui-btn-primary\" channelNode='" + node.name + "' deviceId='" + node.deviceId + "' channelId='" + node.channelId + "' onclick=\"skeyewebplayerChannelClick('" + rep.wvpPlayURL + "',this)\">" + node.name + "</button></td></tr>";
  355 + html = html + "<tr><td><button class=\"layui-btn layui-btn-primary\" channelNode='" + node.name + "' deviceId='" + node.deviceId + "' channelId='" + node.channelId + "' onclick=\"skeyewebplayerChannelClick('" + rep.wvpLiveBroadcast + "',this)\">" + node.name + "</button></td></tr>";
360 356 });
361 357 $("#skeyewebplayerDivChannel", $skeyewebplayer).html(html);
362 358 closeLoading();
... ... @@ -365,17 +361,16 @@ function skeywebPlayerChannel($skeyewebplayer, carNo) {
365 361 });
366 362 }
367 363  
368   -function skeyewebplayerChannelClick(playURL, btn) {
369   - console.log(btn);
  364 +function skeyewebplayerChannelClick(playURL, btn,deviceId,channelId) {
370 365 let children = $("#skeyewebplayerDivContent", $("#skeyewebplayer")).children();
371 366 let length = children.length;
372 367 if (length === 1) {
373   - displaySkeyewebplayerChannel(children[0], playURL, btn);
  368 + displaySkeyewebplayerChannel(children[0], playURL, btn,deviceId,channelId);
374 369 } else if (length > 1) {
375 370 for (let i = 0; i < length; i++) {
376 371 let classCss = $(children[i]).attr("class");
377 372 if (classCss.indexOf("skeyewebplayerDivContent_play_selected") > -1) {
378   - displaySkeyewebplayerChannel(children[i], playURL, btn);
  373 + displaySkeyewebplayerChannel(children[i], playURL, btn,deviceId,channelId);
379 374 break;
380 375 }
381 376 }
... ... @@ -384,19 +379,22 @@ function skeyewebplayerChannelClick(playURL, btn) {
384 379  
385 380 }
386 381  
387   -function displaySkeyewebplayerChannel(htmlNode, playURL, btn) {
  382 +function displaySkeyewebplayerChannel(htmlNode, playURL, btn,deviceId,channelId) {
388 383 loading = loadingFunction();
389 384 let $htmlNode = $(htmlNode);
390   -
391 385 let $btn = $(btn);
392   - $("div[class='skeyewebplayerDiv_title']", $htmlNode).html($btn.attr("channelNode"));
  386 + deviceId = $btn.attr("deviceId");
  387 + channelId = $btn.attr("channelId");
393 388  
394   - let playURL1 = playURL + $btn.attr("deviceId") + "_" + $btn.attr("channelId") + ".live.mp4";
395   - $("div[class='skeyewebplayerDiv_play_content']", $htmlNode).html("");
396 389  
397   - playVideo2(playURL1, $("div[class='skeyewebplayerDiv_play_content']", $htmlNode));
  390 + let htmlObj = $("div[class='skeyewebplayerDiv_play_content']", $htmlNode);
398 391  
  392 + htmlObj.html("");
  393 + $("div[class='skeyewebplayerDiv_title']", $htmlNode).html($btn.attr("channelNode"));
  394 + playURL = playURL.replace("{device}",deviceId).replace("{channel}",channelId);
  395 + let playURL1 = "<iframe style='width:100%;height:100%;' src ='"+playURL+"'/>";
399 396  
  397 + htmlObj.html(playURL1);
400 398 closeLoading();
401 399 }
402 400  
... ... @@ -433,7 +431,7 @@ function skeyWebPlayer(len, parentId) {
433 431 var html = "";
434 432 for (let i = 0; i < len; i++) {
435 433 html += "<div class='" + classCss + "' id='skeyewebplayerDivContent_play_" + i + "' onclick=\"skeyewebplayerDivContent_play_click(this)\"><div class='skeyewebplayerDiv_title'>";
436   - html += "</div><div id='skeyewebplayerDiv_play_content_" + i + "' class='skeyewebplayerDiv_play_content'></div></div>";
  434 + html += "</div><div id='skeyewebplayerDiv_play_content_" + i + "' class='skeyewebplayerDiv_play_content' style='height: 95%'></div></div>";
437 435 }
438 436 $skeyewebplayerDivContent.html(html);
439 437  
... ...