Compare commits

...

3 Commits

Author SHA1 Message Date
阿斌
a8e13f8cb8
Pre Merge pull request !43 from 阿斌/N/A 2026-05-22 06:15:07 +00:00
lin
37a4ea2a56 优化播放效果 2026-05-22 14:14:41 +08:00
阿斌
42a85fbb07
修复生产厂商的gbManufacture少一个r导致设备厂商无法显示
Signed-off-by: 阿斌 <38912748@qq.com>
2025-12-03 10:50:05 +00:00
4 changed files with 22 additions and 9 deletions

View File

@ -54,10 +54,12 @@ export default {
} }
}, },
created() { created() {
const paramUrl = decodeURIComponent(this.$route.params.url) if (this.$route.params.url) {
console.log(paramUrl) const paramUrl = decodeURIComponent(this.$route.params.url)
if (!this.videoUrl && paramUrl) { console.log(paramUrl)
this.videoUrl = paramUrl if (!this.videoUrl) {
this.videoUrl = paramUrl
}
} }
this.btnDom = document.getElementById('buttonsBox') this.btnDom = document.getElementById('buttonsBox')
}, },
@ -217,6 +219,10 @@ export default {
this.play(this.videoUrl) this.play(this.videoUrl)
}, },
play: function(url) { play: function(url) {
if (!url) {
console.warn('Jessibuca -> invalid url, skip play')
return
}
this.videoUrl = url this.videoUrl = url
console.log('Jessibuca -> url: ', url) console.log('Jessibuca -> url: ', url)
if (!jessibucaPlayer[this._uid]) { if (!jessibucaPlayer[this._uid]) {

View File

@ -44,6 +44,9 @@ export default {
}, },
methods: { methods: {
getMediaInfo: function() { getMediaInfo: function() {
if (!this.app || !this.stream || !this.mediaServerId) {
return
}
this.$store.dispatch('server/getMediaInfo', { this.$store.dispatch('server/getMediaInfo', {
app: this.app, app: this.app,
stream: this.stream, stream: this.stream,
@ -52,6 +55,7 @@ export default {
.then(data => { .then(data => {
this.info = data this.info = data
}) })
.catch(() => {})
}, },
startTask: function() { startTask: function() {
this.task = setInterval(this.getMediaInfo, 1000) this.task = setInterval(this.getMediaInfo, 1000)

View File

@ -473,10 +473,13 @@ export default {
this.mediaServerId = streamInfo.mediaServerId this.mediaServerId = streamInfo.mediaServerId
this.playFromStreamInfo(false, streamInfo) this.playFromStreamInfo(false, streamInfo)
}, },
getUrlByStreamInfo() { getUrlByStreamInfo(streamInfo) {
let streamInfo = this.streamInfo streamInfo = streamInfo || this.streamInfo
if (this.streamInfo.transcodeStream) { if (!streamInfo) {
streamInfo = this.streamInfo.transcodeStream return ''
}
if (streamInfo.transcodeStream) {
streamInfo = streamInfo.transcodeStream
} }
let videoUrl let videoUrl
if (location.protocol === 'https:') { if (location.protocol === 'https:') {

View File

@ -89,7 +89,7 @@
<div class="infobox-content" v-if="channel"> <div class="infobox-content" v-if="channel">
<el-descriptions class="margin-top" :title="channel.gbName" :column="1" :colon="true" size="mini" :labelStyle="labelStyle" > <el-descriptions class="margin-top" :title="channel.gbName" :column="1" :colon="true" size="mini" :labelStyle="labelStyle" >
<el-descriptions-item label="编号" >{{channel.gbDeviceId}}</el-descriptions-item> <el-descriptions-item label="编号" >{{channel.gbDeviceId}}</el-descriptions-item>
<el-descriptions-item label="生产厂商">{{channel.gbManufacture}}</el-descriptions-item> <el-descriptions-item label="生产厂商">{{channel.gbManufacturer}}</el-descriptions-item>
<el-descriptions-item label="安装地址" >{{channel.gbAddress == null?'未知': channel.gbAddress}}</el-descriptions-item> <el-descriptions-item label="安装地址" >{{channel.gbAddress == null?'未知': channel.gbAddress}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<div style="padding-top: 10px; margin: 0 auto; width: fit-content;"> <div style="padding-top: 10px; margin: 0 auto; width: fit-content;">