From 3c55b50cfdde236d0dfb86c539b7f84b7356424e Mon Sep 17 00:00:00 2001
From: xc <double72cheng@gmail.com>
Date: Thu, 22 Apr 2021 15:24:45 +0800
Subject: [PATCH] 修复在全屏浏览模式下 点击全屏监控无法最大化bug
---
src/main/resources/public/monitor/live.html | 40 +++++++++++++++-------------------------
1 files changed, 15 insertions(+), 25 deletions(-)
diff --git a/src/main/resources/public/monitor/live.html b/src/main/resources/public/monitor/live.html
index b6d2864..6e4ebc4 100755
--- a/src/main/resources/public/monitor/live.html
+++ b/src/main/resources/public/monitor/live.html
@@ -16,10 +16,11 @@
margin: 0 auto;
text-align: center;
}
-/* .player-wrapper canvas {
- width: 100%;
- height: 100%;
- }*/
+
+ /* .player-wrapper canvas {
+ width: 100%;
+ height: 100%;
+ }*/
</style>
</head>
@@ -29,7 +30,7 @@
<!-- jessiebuca播放器 -->
<div class="wrap">
<div class="content">
- <div class="player" onmouseover="playerShow()"onmouseout="playerHidden()">
+ <div class="player" onmouseover="playerShow()" onmouseout="playerHidden()">
<div class="player-wrapper" id="container" style="background-color: #0D0E1B;">
</div>
<div class="control">
@@ -67,7 +68,7 @@
window.onkeydown = function () {
h5lc.fullscreen = false
}
- var isLive=true;
+ var isLive = true;
var $play = document.getElementById('play');
var $stop = document.getElementById('stop');
var container = document.getElementById("container");
@@ -76,7 +77,7 @@
var isPlaying = false;
let source = queryParam('source') || 'localhost';
- var h5lc = new Jessibuca({container, decoder: "../js/ff/ff.js", videoBuffer: 0});
+ var h5lc = new Jessibuca({container, decoder: "../js/timeline/ff.js", videoBuffer: 0});
h5lc.onLoad = function () {
//this.play("wss://pulls.1234326.cn/live/L01.flv")
@@ -99,7 +100,7 @@
h5lc.play(data)
}
);*/
- play();
+ h5lc.play("ws://172.16.30.113:8082/live/ff80808178af424e0178af44e677000343616d657261.flv")
$play.style.display = 'none';
$stop.style.display = 'inline';
}, false);
@@ -110,46 +111,35 @@
}
isPlaying = false;
//stop();
-
$play.style.display = 'inline';
$stop.style.display = 'none';
}, false);
- function play(firstResponseIp) {
- h5lc.play("ws://172.16.30.113:8082/live/video4.flv")
- }
-
function stop() {
$.get("http://127.0.0.1:8088/monica/video/stop?param=live/test", function () {
- alert("视频流已关闭");
h5lc.close()
}
);
- h5lc.close()
}
function queryParam(name, url) {
var search = window.location.search;
var qArr = '';
var key = {};
-
if (url) {
qArr = url.split("?")[1].split("&")
-
} else {
if (!window.location.search) {
return
}
qArr = search.substr(1).split("&")
}
-
for (var i = 0; i < qArr.length; i++) {
var firstPos = qArr[i].indexOf('=');
key[qArr[i].slice(0, firstPos)] = qArr[i].slice(firstPos + 1)
}
-
if (name) {
return key[name]
} else {
@@ -161,16 +151,16 @@
}
}
- function playerShow(){
+ function playerShow() {
if (isLive) {
- $(".player .control").css("display","block")
- }else {
- $(".player .control").css("display","none")
+ $(".player .control").css("display", "block")
+ } else {
+ $(".player .control").css("display", "none")
}
}
- function playerHidden(){
- $(".player .control").css("display","none")
+ function playerHidden() {
+ $(".player .control").css("display", "none")
}
</script>
--
Gitblit v1.9.1