Merge remote-tracking branch 'origin/master' into wvp-28181-2.0
# Conflicts: # README.md # src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java # src/main/java/com/genersoft/iot/vmp/gb28181/transmit/SIPProcessorFactory.java # src/main/java/com/genersoft/iot/vmp/gb28181/transmit/callback/DeferredResultHolder.java # src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java # src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java # src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHTTPProxyController.java # src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java # src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorager.java # src/main/java/com/genersoft/iot/vmp/storager/jdbc/VideoManagerJdbcStoragerImpl.java # src/main/java/com/genersoft/iot/vmp/storager/redis/VideoManagerRedisStoragerImpl.java # src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java # src/main/java/com/genersoft/iot/vmp/vmanager/playback/PlaybackController.java # src/main/java/com/genersoft/iot/vmp/vmanager/service/impl/PlayServiceImpl.java # src/main/java/com/genersoft/iot/vmp/web/ApiStreamController.java # src/main/resources/application-dev.yml # web_src/src/components/gb28181/devicePlayer.vue
This commit is contained in:
@@ -19,12 +19,12 @@
|
||||
<el-option label="设备" value="false"></el-option>
|
||||
<el-option label="子目录" value="true"></el-option>
|
||||
</el-select>
|
||||
在线状态: <el-select size="mini" @change="search" v-model="online" placeholder="请选择" default-first-option>
|
||||
在线状态: <el-select size="mini" style="margin-right: 1rem;" @change="search" v-model="online" placeholder="请选择" default-first-option>
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="在线" value="on"></el-option>
|
||||
<el-option label="离线" value="off"></el-option>
|
||||
<el-option label="在线" value="true"></el-option>
|
||||
<el-option label="离线" value="false"></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-checkbox size="mini" style="margin-right: 1rem; float: right;" v-model="autoList" @change="autoListChange">自动刷新</el-checkbox>
|
||||
</div>
|
||||
<devicePlayer ref="devicePlayer" v-loading="isLoging"></devicePlayer>
|
||||
<!--设备列表-->
|
||||
@@ -56,7 +56,7 @@
|
||||
<el-button-group>
|
||||
<!-- <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> -->
|
||||
<el-button size="mini" icon="el-icon-video-play" @click="sendDevicePush(scope.row)">播放</el-button>
|
||||
<el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="scope.row.play" @click="stopDevicePush(scope.row)">停止</el-button>
|
||||
<el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="!!scope.row.streamId" @click="stopDevicePush(scope.row)">停止</el-button>
|
||||
<el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.parental == 1" @click="changeSubchannel(scope.row)">查看</el-button>
|
||||
<el-button size="mini" icon="el-icon-video-camera" type="primary" @click="queryRecords(scope.row)">设备录象</el-button>
|
||||
<!-- <el-button size="mini" @click="sendDevicePush(scope.row)">录像查询</el-button> -->
|
||||
@@ -98,13 +98,17 @@ export default {
|
||||
count: parseInt(this.$route.params.count),
|
||||
total: 0,
|
||||
beforeUrl: "/videoList",
|
||||
isLoging: false
|
||||
isLoging: false,
|
||||
autoList: false
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initData();
|
||||
this.updateLooper = setInterval(this.initData, 10000);
|
||||
if (this.autoList) {
|
||||
this.updateLooper = setInterval(this.initData, 1500);
|
||||
}
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
this.$destroy('videojs');
|
||||
@@ -161,7 +165,7 @@ export default {
|
||||
.then(function (res) {
|
||||
console.log(res);
|
||||
that.total = res.data.total;
|
||||
that.deviceChannelList = res.data.data;
|
||||
that.deviceChannelList = res.data.list;
|
||||
// 防止出现表格错位
|
||||
that.$nextTick(() => {
|
||||
that.$refs.channelListTable.doLayout();
|
||||
@@ -179,17 +183,16 @@ export default {
|
||||
let deviceId = this.deviceId;
|
||||
this.isLoging = true;
|
||||
let channelId = itemData.channelId;
|
||||
let getEncoding = itemData.hasAudio ? '1' : '0'
|
||||
console.log("通知设备推流1:" + deviceId + " : " + channelId + ":" + getEncoding);
|
||||
console.log("通知设备推流1:" + deviceId + " : " + channelId );
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: '/api/play/' + deviceId + '/' + channelId + '?getEncoding=' + getEncoding
|
||||
url: '/api/play/' + deviceId + '/' + channelId
|
||||
}).then(function (res) {
|
||||
console.log(res.data)
|
||||
let ssrc = res.data.ssrc;
|
||||
let streamId = res.data.streamId;
|
||||
that.isLoging = false;
|
||||
if (!!ssrc) {
|
||||
if (!!streamId) {
|
||||
// that.$refs.devicePlayer.play(res.data, deviceId, channelId, itemData.hasAudio);
|
||||
that.$refs.devicePlayer.openDialog("media", deviceId, channelId, {
|
||||
streamInfo: res.data,
|
||||
@@ -212,7 +215,7 @@ export default {
|
||||
var that = this;
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url: '/api/play/' + itemData.ssrc + '/stop'
|
||||
url: '/api/play/' + itemData.streamId + '/stop'
|
||||
}).then(function (res) {
|
||||
console.log(JSON.stringify(res));
|
||||
that.initData();
|
||||
@@ -258,7 +261,7 @@ export default {
|
||||
})
|
||||
.then(function (res) {
|
||||
that.total = res.data.total;
|
||||
that.deviceChannelList = res.data.data;
|
||||
that.deviceChannelList = res.data.list;
|
||||
// 防止出现表格错位
|
||||
that.$nextTick(() => {
|
||||
that.$refs.channelListTable.doLayout();
|
||||
@@ -283,6 +286,13 @@ export default {
|
||||
}).then(function (res) {
|
||||
console.log(JSON.stringify(res));
|
||||
});
|
||||
},
|
||||
autoListChange: function () {
|
||||
if (this.autoList) {
|
||||
this.updateLooper = setInterval(this.initData, 1500);
|
||||
}else{
|
||||
window.clearInterval(this.updateLooper);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="devicePlayer" v-loading="isLoging">
|
||||
|
||||
|
||||
<el-dialog title="视频播放" top="0" :close-on-click-modal="false" :visible.sync="showVideoDialog" :destroy-on-close="true" @close="close()">
|
||||
<!-- <LivePlayer v-if="showVideoDialog" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" :message="videoError" :hasaudio="hasaudio" fluent autoplay live></LivePlayer> -->
|
||||
<player ref="videoPlayer" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" :hasaudio="hasaudio" fluent autoplay live></player>
|
||||
@@ -121,7 +121,7 @@
|
||||
<p>采样率: {{item.sample_rate}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
@@ -158,7 +158,6 @@ export default {
|
||||
searchHistoryResult: [] //媒体流历史记录搜索结果
|
||||
},
|
||||
showVideoDialog: false,
|
||||
ssrc: '',
|
||||
streamId: '',
|
||||
convertKey: '',
|
||||
deviceId: '',
|
||||
@@ -210,7 +209,6 @@ export default {
|
||||
this.tabActiveName = tab;
|
||||
this.channelId = channelId;
|
||||
this.deviceId = deviceId;
|
||||
this.ssrc = "";
|
||||
this.streamId = "";
|
||||
this.videoUrl = ""
|
||||
if (!!this.$refs.videoPlayer) {
|
||||
@@ -234,11 +232,10 @@ export default {
|
||||
console.log(val)
|
||||
},
|
||||
play: function (streamInfo, hasAudio) {
|
||||
|
||||
|
||||
this.hasaudio = hasAudio;
|
||||
this.isLoging = false;
|
||||
this.videoUrl = streamInfo.ws_flv;
|
||||
this.ssrc = streamInfo.ssrc;
|
||||
this.streamId = streamInfo.streamId;
|
||||
this.playFromStreamInfo(false, streamInfo)
|
||||
},
|
||||
@@ -248,7 +245,7 @@ export default {
|
||||
this.$refs.videoPlayer.pause()
|
||||
that.$axios({
|
||||
method: 'post',
|
||||
url: '/api/play/' + that.ssrc + '/convert'
|
||||
url: '/api/play/' + that.streamId + '/convert'
|
||||
}).then(function (res) {
|
||||
if (res.data.code == 0) {
|
||||
that.convertKey = res.data.key;
|
||||
@@ -317,7 +314,7 @@ export default {
|
||||
}
|
||||
this.convertKey = ''
|
||||
},
|
||||
|
||||
|
||||
copySharedInfo: function (data) {
|
||||
console.log('复制内容:' + data);
|
||||
this.coverPlaying = false;
|
||||
@@ -368,9 +365,9 @@ export default {
|
||||
},
|
||||
playRecord: function (row) {
|
||||
let that = this;
|
||||
if (that.ssrc != "") {
|
||||
if (that.streamId != "") {
|
||||
that.stopPlayRecord(function () {
|
||||
that.ssrc = "",
|
||||
that.streamId = "",
|
||||
that.playRecord(row);
|
||||
})
|
||||
} else {
|
||||
@@ -380,7 +377,7 @@ export default {
|
||||
row.endTime
|
||||
}).then(function (res) {
|
||||
var streamInfo = res.data;
|
||||
that.ssrc = streamInfo.ssrc;
|
||||
that.streamId = streamInfo.streamId;
|
||||
that.videoUrl = streamInfo.ws_flv;
|
||||
});
|
||||
}
|
||||
@@ -390,7 +387,7 @@ export default {
|
||||
this.videoUrl = '';
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: '/api/playback/' + this.ssrc + '/stop'
|
||||
url: '/api/playback/' + this.streamId + '/stop'
|
||||
}).then(function (res) {
|
||||
if (callback) callback()
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;">
|
||||
<span style="font-size: 1rem; font-weight: bold;">设备列表</span>
|
||||
<div style="position: absolute; right: 1rem; top: 0.3rem;">
|
||||
<el-button icon="el-icon-refresh-right" circle size="mini" @click="getDeviceList()"></el-button>
|
||||
<el-button icon="el-icon-refresh-right" circle size="mini" :loading="getDeviceListLoading" @click="getDeviceList()"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
<devicePlayer ref="devicePlayer"></devicePlayer>
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-table-column label="地址" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag size="medium">{{ scope.row.host.address }}</el-tag>
|
||||
<el-tag size="medium">{{ scope.row.hostAddress }}</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
<el-table-column label="操作" width="240" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" icon="el-icon-refresh" @click="refDevice(scope.row)">刷新通道</el-button>
|
||||
<el-button size="mini" :ref="scope.row.deviceId + 'refbtn' " icon="el-icon-refresh" @click="refDevice(scope.row)">刷新通道</el-button>
|
||||
<el-button size="mini" icon="el-icon-s-open" type="primary" @click="showChannelList(scope.row)">查看通道</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -90,7 +90,8 @@
|
||||
winHeight: window.innerHeight - 200,
|
||||
currentPage:1,
|
||||
count:15,
|
||||
total:0
|
||||
total:0,
|
||||
getDeviceListLoading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -130,7 +131,7 @@
|
||||
},
|
||||
getDeviceList: function() {
|
||||
let that = this;
|
||||
|
||||
this.getDeviceListLoading = true;
|
||||
this.$axios.get(`/api/devices`,{
|
||||
params: {
|
||||
page: that.currentPage - 1,
|
||||
@@ -139,11 +140,14 @@
|
||||
} )
|
||||
.then(function (res) {
|
||||
console.log(res);
|
||||
console.log(res.data.list);
|
||||
that.total = res.data.total;
|
||||
that.deviceList = res.data.data;
|
||||
that.deviceList = res.data.list;
|
||||
that.getDeviceListLoading = false;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
that.getDeviceListLoading = false;
|
||||
});
|
||||
|
||||
},
|
||||
@@ -158,17 +162,31 @@
|
||||
refDevice: function(itemData) {
|
||||
///api/devices/{deviceId}/sync
|
||||
console.log("刷新对应设备:" + itemData.deviceId);
|
||||
var that = this;
|
||||
that.$refs[itemData.deviceId + 'refbtn' ].loading = true;
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url: '/api/devices/' + itemData.deviceId + '/sync'
|
||||
}).then(function(res) {
|
||||
// console.log("刷新设备结果:"+JSON.stringify(res));
|
||||
console.log("刷新设备结果:"+JSON.stringify(res));
|
||||
if (!res.data.deviceId) {
|
||||
that.$message({
|
||||
showClose: true,
|
||||
message: res.data,
|
||||
type: 'error'
|
||||
});
|
||||
}else{
|
||||
that.$message({
|
||||
showClose: true,
|
||||
message: '请求成功',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
that.initData()
|
||||
that.$refs[itemData.deviceId + 'refbtn' ].loading = false;
|
||||
}).catch(function(e) {
|
||||
that.$message({
|
||||
showClose: true,
|
||||
message: '请求成功',
|
||||
type: 'success'
|
||||
});
|
||||
console.error(e)
|
||||
that.$refs[itemData.deviceId + 'refbtn' ].loading = false;
|
||||
});;
|
||||
},
|
||||
//通知设备上传媒体流
|
||||
|
||||
Reference in New Issue
Block a user