Former-commit-id: 0ddd203200af485650f72fbfc69bbb33853f3d9f
TangShanKaiPing
wanggang 6 years ago
parent ab66e0e1e5
commit 990f71cd98

@ -7,7 +7,7 @@
<option v-for="c in GetCameras()" :value="c.Number">{{c.DisplayName||c.Name}}</option>
</select>
<div style="width:100%;height:265px;margin:0;padding:0;background:#000;">
<video id="flvPlayer" class="video" muted controls autoplay style="width:100%;max-width:100%;height:100%;"></video>
<video id="flvPlayer" class="video" controls autoplay style="width:100%;max-width:100%;height:100%;"></video>
</div>
</div>
<div class="col-md-6">
@ -69,7 +69,7 @@
<h3 style="line-height:88px;margin:0;">{{GetData('光强检测器',null,'后门','光照度','Description')}}</h3>
</div>
<div class="col-md-4" style="height:88px;">
<span style="display:inline-block;position:absolute;right:20px;bottom:5px;white-space: nowrap;">后门光照:{{GetData('光强检测器',null,'后门','光照度','Value') }}{{ GetData('光强检测器',null,'后门','光照度','Value')}}</span>
<span style="display:inline-block;position:absolute;right:20px;bottom:5px;white-space: nowrap;">后门光照:{{GetData('光强检测器',null,'后门','光照度','Value') }}{{ GetData('光强检测器',null,'后门','光照度','Unit')}}</span>
</div>
</div>
</div>
@ -442,6 +442,7 @@
</script>
<script>
var flvPlayer;
var timer;
var decodedFrames;
$('body').on('change', '#camera', function (e) {
UpdateCamera()
@ -455,7 +456,7 @@
}
function playFlv(videoElement, url) {
try {
var flvPlayer = flvjs.createPlayer({
flvPlayer = flvjs.createPlayer({
type: 'flv',
url: url,
isLive: true,
@ -468,7 +469,7 @@
});
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
var timer = setInterval(function () {
timer = setInterval(function () {
console.log('.');
if (flvPlayer.statisticsInfo.speed == 0) {
console.log('reload1');
@ -493,6 +494,9 @@
}
}
function closePlayer(flvPlayer) {
if (timer) {
clearInterval(timer);
}
if (flvPlayer != null) {
flvPlayer.pause();
flvPlayer.unload();

Loading…
Cancel
Save