Compare commits

...

4 Commits

Author SHA1 Message Date
阿斌
7931719037
Pre Merge pull request !36 from 阿斌/N/A 2025-09-23 15:27:57 +00:00
lin
dd2f99487d 优化播放效果 2025-09-23 23:27:42 +08:00
lin
3009951e45 优化播放效果 2025-09-23 23:07:36 +08:00
阿斌
da98101aac
update src/main/resources/civilCode.csv.
行政规划错误。江苏南通海门市,修改为海门区,浙江杭州删除下城区、江干区,新增钱塘区,临平区

Signed-off-by: 阿斌 <38912748@qq.com>
2024-12-15 08:58:42 +00:00
4 changed files with 66 additions and 54 deletions

View File

@ -861,7 +861,7 @@
320623,如东县,3206 320623,如东县,3206
320681,启东市,3206 320681,启东市,3206
320682,如皋市,3206 320682,如皋市,3206
320684,海门,3206 320684,海门,3206
320685,海安市,3206 320685,海安市,3206
3207,连云港市,32 3207,连云港市,32
320703,连云区,3207 320703,连云区,3207
@ -918,8 +918,6 @@
33,浙江省, 33,浙江省,
3301,杭州市,33 3301,杭州市,33
330102,上城区,3301 330102,上城区,3301
330103,下城区,3301
330104,江干区,3301
330105,拱墅区,3301 330105,拱墅区,3301
330106,西湖区,3301 330106,西湖区,3301
330108,滨江区,3301 330108,滨江区,3301
@ -927,6 +925,8 @@
330110,余杭区,3301 330110,余杭区,3301
330111,富阳区,3301 330111,富阳区,3301
330112,临安区,3301 330112,临安区,3301
330113,临平区,3301
330114,钱塘区,3301
330122,桐庐县,3301 330122,桐庐县,3301
330127,淳安县,3301 330127,淳安县,3301
330182,建德市,3301 330182,建德市,3301

1 编号 名称 上级
861 320623 如东县 3206
862 320681 启东市 3206
863 320682 如皋市 3206
864 320684 海门市 海门区 3206
865 320685 海安市 3206
866 3207 连云港市 32
867 320703 连云区 3207
918 33 浙江省
919 3301 杭州市 33
920 330102 上城区 3301
330103 下城区 3301
330104 江干区 3301
921 330105 拱墅区 3301
922 330106 西湖区 3301
923 330108 滨江区 3301
925 330110 余杭区 3301
926 330111 富阳区 3301
927 330112 临安区 3301
928 330113 临平区 3301
929 330114 钱塘区 3301
930 330122 桐庐县 3301
931 330127 淳安县 3301
932 330182 建德市 3301

View File

@ -295,6 +295,7 @@ export default {
} else { } else {
this.videoUrl = streamInfo['ws_flv'] this.videoUrl = streamInfo['ws_flv']
} }
console.log(location.protocol)
this.streamInfo = streamInfo this.streamInfo = streamInfo
this.timeLen = timeLen this.timeLen = timeLen
this.startTime = startTime this.startTime = startTime

View File

@ -5,7 +5,7 @@
@dblclick="fullscreenSwich" @dblclick="fullscreenSwich"
> >
<div style="width:100%; padding-top: 56.25%; position: relative;" /> <div style="width:100%; padding-top: 56.25%; position: relative;" />
<div id="buttonsBox" class="buttons-box" v-if="typeof showButton == 'undefined' || showButton"> <div id="buttonsBox" class="buttons-box" >
<div class="buttons-box-left"> <div class="buttons-box-left">
<i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick" /> <i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick" />
<i v-if="playing" class="iconfont icon-pause jessibuca-btn" @click="pause" /> <i v-if="playing" class="iconfont icon-pause jessibuca-btn" @click="pause" />
@ -55,19 +55,24 @@ export default {
} }
}, },
watch: { watch: {
videoUrl: { // videoUrl: {
handler(val, _) { // handler(val, _) {
this.$nextTick(() => { // if (typeof val !== 'undefined' && val !== 'undefined') {
this.play(val) // console.log(22222111)
}) // console.log(val)
}, // this.$nextTick(() => {
immediate: true //
} // this.play(val)
// })
// }
// },
// immediate: true
// }
}, },
created() { created() {
const paramUrl = decodeURIComponent(this.$route.params.url) const paramUrl = decodeURIComponent(this.$route.params.url)
this.$nextTick(() => { this.$nextTick(() => {
if (typeof (this.videoUrl) === 'undefined') { if (typeof (this.videoUrl) === 'undefined' || typeof (paramUrl) !== 'undefined') {
this.videoUrl = paramUrl this.videoUrl = paramUrl
} }
this.btnDom = document.getElementById('buttonsBox') this.btnDom = document.getElementById('buttonsBox')
@ -89,16 +94,21 @@ export default {
if (jessibucaPlayer[this._uid]) { if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].destroy() jessibucaPlayer[this._uid].destroy()
} }
console.log(1111)
console.log(this.$refs.container.dataset['jessibuca'])
if (this.$refs.container.dataset['jessibuca']) {
this.$refs.container.dataset['jessibuca'] = undefined this.$refs.container.dataset['jessibuca'] = undefined
}
if (this.$refs.container.getAttribute('data-jessibuca')) { if (this.$refs.container.getAttribute('data-jessibuca')) {
this.$refs.container.removeAttribute('data-jessibuca') this.$refs.container.removeAttribute('data-jessibuca')
} }
const options = { const options = {
container: this.$refs.container, container: this.$refs.container,
videoBuffer: 0, videoBuffer: 0,
isResize: false, isResize: true,
useMSE: true, useMSE: true,
useWCS: true, useWCS: false,
text: '', text: '',
// background: '', // background: '',
controlAutoHide: false, controlAutoHide: false,
@ -144,20 +154,19 @@ export default {
jessibucaPlayer[this._uid] = new window.Jessibuca(options) jessibucaPlayer[this._uid] = new window.Jessibuca(options)
const jessibuca = jessibucaPlayer[this._uid] const jessibuca = jessibucaPlayer[this._uid]
const _this = this
jessibuca.on('pause', () => { jessibuca.on('pause', () => {
_this.playing = false this.playing = false
this.$emit('playStatusChange', false) this.$emit('playStatusChange', false)
}) })
jessibuca.on('play', () => { jessibuca.on('play', () => {
_this.playing = true this.playing = true
this.$emit('playStatusChange', true) this.$emit('playStatusChange', true)
}) })
jessibuca.on('fullscreen', (msg) => { jessibuca.on('fullscreen', (msg) => {
_this.fullscreen = msg this.fullscreen = msg
}) })
jessibuca.on('mute', (msg) => { jessibuca.on('mute', (msg) => {
_this.isNotMute = !msg this.isNotMute = !msg
}) })
jessibuca.on('performance', (performance) => { jessibuca.on('performance', (performance) => {
let show = '卡顿' let show = '卡顿'
@ -166,10 +175,10 @@ export default {
} else if (performance === 1) { } else if (performance === 1) {
show = '流畅' show = '流畅'
} }
_this.performance = show this.performance = show
}) })
jessibuca.on('kBps', (kBps) => { jessibuca.on('kBps', (kBps) => {
_this.kBps = Math.round(kBps) this.kBps = Math.round(kBps)
}) })
jessibuca.on('videoInfo', (msg) => { jessibuca.on('videoInfo', (msg) => {
console.log('Jessibuca -> videoInfo: ', msg) console.log('Jessibuca -> videoInfo: ', msg)
@ -193,13 +202,17 @@ export default {
console.log('Jessibuca -> playToRenderTimes: ', msg) console.log('Jessibuca -> playToRenderTimes: ', msg)
}) })
jessibuca.on('timeUpdate', (videoPTS) => { jessibuca.on('timeUpdate', (videoPTS) => {
console.log(videoPTS)
if (jessibuca.videoPTS) { if (jessibuca.videoPTS) {
this.playerTime += (videoPTS - jessibuca.videoPTS) this.playerTime += (videoPTS - jessibuca.videoPTS)
this.$emit('playTimeChange', this.playerTime) this.$emit('playTimeChange', this.playerTime)
} }
jessibuca.videoPTS = videoPTS jessibuca.videoPTS = videoPTS
}) })
jessibuca.on('play', () => {
this.playing = true
this.loaded = true
this.quieting = jessibuca.quieting
})
}, },
playBtnClick: function(event) { playBtnClick: function(event) {
this.play(this.videoUrl) this.play(this.videoUrl)
@ -210,18 +223,18 @@ export default {
this.destroy() this.destroy()
} }
this.create() this.create()
jessibucaPlayer[this._uid].on('play', () => { this.$nextTick(() => {
this.playing = true
this.loaded = true
this.quieting = jessibuca.quieting
})
if (jessibucaPlayer[this._uid].hasLoaded()) {
jessibucaPlayer[this._uid].play(url) jessibucaPlayer[this._uid].play(url)
if (jessibucaPlayer[this._uid].hasLoaded()) {
// jessibucaPlayer[this._uid].play(url)
} else { } else {
jessibucaPlayer[this._uid].on('load', () => { jessibucaPlayer[this._uid].on('load', () => {
jessibucaPlayer[this._uid].play(url) // jessibucaPlayer[this._uid].play(url)
}) })
} }
})
}, },
pause: function() { pause: function() {
if (jessibucaPlayer[this._uid]) { if (jessibucaPlayer[this._uid]) {

View File

@ -21,12 +21,11 @@
@tab-click="changePlayer" @tab-click="changePlayer"
> >
<el-tab-pane label="Jessibuca" name="jessibuca"> <el-tab-pane label="Jessibuca" name="jessibuca">
<div style="height: 22.5vw">
<jessibucaPlayer <jessibucaPlayer
style="height: 22.5vw"
v-if="activePlayer === 'jessibuca'" v-if="activePlayer === 'jessibuca'"
ref="jessibuca" ref="jessibuca"
:visible.sync="showVideoDialog" :visible.sync="showVideoDialog"
:video-url="videoUrl"
:error="videoError" :error="videoError"
:message="videoError" :message="videoError"
:has-audio="hasAudio" :has-audio="hasAudio"
@ -34,7 +33,6 @@
autoplay autoplay
live live
/> />
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="WebRTC" name="webRTC"> <el-tab-pane label="WebRTC" name="webRTC">
@ -427,7 +425,6 @@ export default {
console.log(this.player[tab.name][0]) console.log(this.player[tab.name][0])
this.activePlayer = tab.name this.activePlayer = tab.name
this.videoUrl = this.getUrlByStreamInfo() this.videoUrl = this.getUrlByStreamInfo()
console.log(this.videoUrl)
}, },
openDialog: function(tab, deviceId, channelId, param) { openDialog: function(tab, deviceId, channelId, param) {
if (this.showVideoDialog) { if (this.showVideoDialog) {
@ -470,22 +467,23 @@ export default {
this.playFromStreamInfo(false, streamInfo) this.playFromStreamInfo(false, streamInfo)
}, },
getUrlByStreamInfo() { getUrlByStreamInfo() {
console.log(this.streamInfo)
let streamInfo = this.streamInfo let streamInfo = this.streamInfo
if (this.streamInfo.transcodeStream) { if (this.streamInfo.transcodeStream) {
streamInfo = this.streamInfo.transcodeStream streamInfo = this.streamInfo.transcodeStream
} }
let videoUrl
if (location.protocol === 'https:') { if (location.protocol === 'https:') {
this.videoUrl = streamInfo[this.player[this.activePlayer][1]] videoUrl = streamInfo[this.player[this.activePlayer][1]]
} else { } else {
this.videoUrl = streamInfo[this.player[this.activePlayer][0]] videoUrl = streamInfo[this.player[this.activePlayer][0]]
} }
return this.videoUrl return videoUrl
}, },
playFromStreamInfo: function(realHasAudio, streamInfo) { playFromStreamInfo: function(realHasAudio, streamInfo) {
this.showVideoDialog = true this.showVideoDialog = true
this.hasaudio = realHasAudio && this.hasaudio this.hasaudio = realHasAudio && this.hasaudio
console.log(66666666)
if (this.$refs[this.activePlayer]) { if (this.$refs[this.activePlayer]) {
this.$refs[this.activePlayer].play(this.getUrlByStreamInfo(streamInfo)) this.$refs[this.activePlayer].play(this.getUrlByStreamInfo(streamInfo))
} else { } else {