Compare commits

...

4 Commits

4 changed files with 166 additions and 135 deletions

View File

@ -59,7 +59,7 @@ services:
networks: networks:
- media-net - media-net
ports: ports:
#- "6080:80/tcp" # [播流]HTTP 安全考虑-非测试阶段需要注释掉改为由nginx代理播流地址 - "80:80/tcp" # [播流]HTTP 安全考虑-非测试阶段需要注释掉改为由nginx代理播流地址
#- "4443:443/tcp" # [播流]HTTPS 安全考虑-非测试阶段需要注释掉改为由nginx代理播流地址 #- "4443:443/tcp" # [播流]HTTPS 安全考虑-非测试阶段需要注释掉改为由nginx代理播流地址
- "${MediaRtmp:-10935}:${MediaRtmp:-10935}/tcp" # [收流]RTMP - "${MediaRtmp:-10935}:${MediaRtmp:-10935}/tcp" # [收流]RTMP
- "${MediaRtmp:-10935}:${MediaRtmp:-10935}/udp" # [收流]RTMP - "${MediaRtmp:-10935}:${MediaRtmp:-10935}/udp" # [收流]RTMP

View File

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.jt1078.config; package com.genersoft.iot.vmp.jt1078.config;
import com.genersoft.iot.vmp.jt1078.bean.common.ConfigAttribute;
import lombok.Data; import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
@ -19,7 +18,8 @@ public class JT1078Config {
private Boolean record = false; private Boolean record = false;
/** /**
* IdleStateHandler reader idle timeout, unit: minutes * IDLE状态超时时间单位默认0表示不启用启用后当连接进入IDLE状态超过该时间时将被断开连接
连接进入IDLE状态的条件是在readerIdleTime时间内没有收到任何数据包并且在writerIdleTime时间内没有发送任何数据包
*/ */
private Integer readerIdleTime = 15; private Integer readerIdleTime = 0;
} }

View File

@ -273,6 +273,11 @@ export default {
}, },
setPlaybackRate: function() { setPlaybackRate: function() {
},
resize(width, height) {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].resize()
}
} }
} }
} }

View File

@ -50,7 +50,10 @@
</div> </div>
</div> </div>
<div id="playerBox" style="width: 100%;"> <div id="playerBox" style="width: 100%;">
<div class="playBox" style="height: calc(100vh - 220px); width: 100%; background-color: #000000"> <div :class="{
'play-box': true,
'play-box-fullscreen': isFullScreen,
}">
<div <div
v-if="playLoading" v-if="playLoading"
style="position: relative; left: calc(50% - 32px); top: 43%; z-index: 100;color: #fff;float: left; text-align: center;" style="position: relative; left: calc(50% - 32px); top: 43%; z-index: 100;color: #fff;float: left; text-align: center;"
@ -88,8 +91,13 @@
@playTimeChange="showPlayTimeChange" @playTimeChange="showPlayTimeChange"
/> />
</div> </div>
<div class="player-option-box"> <div :class="{
'player-option-box': true,
'player-option-box-bottom': isFullScreen
}">
<div v-if="showTime" class="time-line-show">{{ showTimeValue }}</div>
<VideoTimeline <VideoTimeline
style="height: 55px"
ref="Timeline" ref="Timeline"
:init-time="initTime" :init-time="initTime"
:time-segments="timeSegments" :time-segments="timeSegments"
@ -98,8 +106,6 @@
@mousedown="timelineMouseDown" @mousedown="timelineMouseDown"
@mouseup="mouseupTimeline" @mouseup="mouseupTimeline"
/> />
<div v-if="showTime" class="time-line-show">{{ showTimeValue }}</div>
</div>
<div style="height: 40px; background-color: #383838; display: grid; grid-template-columns: 1fr 400px 1fr"> <div style="height: 40px; background-color: #383838; display: grid; grid-template-columns: 1fr 400px 1fr">
<div style="text-align: left;"> <div style="text-align: left;">
<div class="record-play-control" style="background-color: transparent; box-shadow: 0 0 10px transparent"> <div class="record-play-control" style="background-color: transparent; box-shadow: 0 0 10px transparent">
@ -182,13 +188,13 @@
title="下一个" title="下一个"
@click="playNext()" @click="playNext()"
/> />
<el-dropdown @command="changePlaySpeed"> <el-dropdown @command="changePlaySpeed" placement="top">
<a <a
target="_blank" target="_blank"
class="record-play-control-item record-play-control-speed" class="record-play-control-item record-play-control-speed"
title="倍速播放" title="倍速播放"
>{{ playSpeed }}X</a> >{{ playSpeed }}X</a>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown" :append-to-body="false">
<el-dropdown-item <el-dropdown-item
v-for="item in playSpeedRange" v-for="item in playSpeedRange"
:key="item" :key="item"
@ -201,13 +207,13 @@
</div> </div>
<div style="text-align: right;"> <div style="text-align: right;">
<div class="record-play-control" style="background-color: transparent; box-shadow: 0 0 10px transparent"> <div class="record-play-control" style="background-color: transparent; box-shadow: 0 0 10px transparent">
<el-dropdown @command="changePlayer"> <el-dropdown @command="changePlayer" placement="top">
<a <a
target="_blank" target="_blank"
class="record-play-control-item record-play-control-speed" class="record-play-control-item record-play-control-speed"
title="切换播放器" title="切换播放器"
>{{ playerLabel }}</a> >{{ playerLabel }}</a>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown" :append-to-body="false">
<el-dropdown-item command="jessibuca">Jessibuca</el-dropdown-item> <el-dropdown-item command="jessibuca">Jessibuca</el-dropdown-item>
<el-dropdown-item command="webRTC">WebRTC</el-dropdown-item> <el-dropdown-item command="webRTC">WebRTC</el-dropdown-item>
<el-dropdown-item command="h265web">H265Web</el-dropdown-item> <el-dropdown-item command="h265web">H265Web</el-dropdown-item>
@ -232,6 +238,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<record-download ref="recordDownload" /> <record-download ref="recordDownload" />
<chooseTimeRange ref="chooseTimeRange" /> <chooseTimeRange ref="chooseTimeRange" />
</div> </div>
@ -444,8 +451,10 @@ export default {
const playerHeight = this.$refs.recordVideoPlayer.playerHeight const playerHeight = this.$refs.recordVideoPlayer.playerHeight
screenfull.request(document.getElementById('playerBox')) screenfull.request(document.getElementById('playerBox'))
screenfull.on('change', (event) => { screenfull.on('change', (event) => {
this.$refs.recordVideoPlayer.resize(playerWidth, playerHeight)
this.isFullScreen = screenfull.isFullscreen this.isFullScreen = screenfull.isFullscreen
if (this.$refs.recordVideoPlayer && this.$refs.recordVideoPlayer.resize) {
this.$refs.recordVideoPlayer.resize(playerWidth, playerHeight)
}
}) })
this.isFullScreen = true this.isFullScreen = true
}, },
@ -674,14 +683,31 @@ export default {
} }
.player-option-box { .player-option-box {
height: 50px height: 95px;
}
.player-option-box-bottom {
width: 100%;
position: absolute;
bottom: 0;
} }
.time-line-show { .time-line-show {
position: relative; position: relative;
color: rgba(250, 249, 249, 0.89); color: rgba(250, 249, 249, 0.89);
left: calc(50% - 85px); top: -24px;
top: -72px; height: 0;
width: stretch;
float: left;
text-align: center;
text-shadow: 1px 0 #5f6b7c, -1px 0 #5f6b7c, 0 1px #5f6b7c, 0 -1px #5f6b7c, 1.1px 1.1px #5f6b7c, 1.1px -1.1px #5f6b7c, -1.1px 1.1px #5f6b7c, -1.1px -1.1px #5f6b7c; text-shadow: 1px 0 #5f6b7c, -1px 0 #5f6b7c, 0 1px #5f6b7c, 0 -1px #5f6b7c, 1.1px 1.1px #5f6b7c, 1.1px -1.1px #5f6b7c, -1.1px 1.1px #5f6b7c, -1.1px -1.1px #5f6b7c;
} }
.play-box {
width: 100%; aspect-ratio: 16 / 9;
background-color: #000000;
height: calc(100vh - 220px);
}
.play-box-fullscreen {
height: 100vh !important;
}
</style> </style>