临时提交

This commit is contained in:
lin
2025-09-24 23:01:40 +08:00
parent dd2f99487d
commit a8f2d2ebf7

View File

@@ -34,7 +34,7 @@
const jessibucaPlayer = {} const jessibucaPlayer = {}
export default { export default {
name: 'Jessibuca', name: 'Jessibuca',
props: ['videoUrl', 'error', 'hasAudio', 'height', 'showButton'], props: ['showButton'],
data() { data() {
return { return {
playing: false, playing: false,
@@ -54,28 +54,15 @@ export default {
forceNoOffscreen: false forceNoOffscreen: false
} }
}, },
watch: { beforeCreate() {
// videoUrl: { const paramUrl = decodeURIComponent(this.$route.params.url)
// handler(val, _) { if (typeof (this.videoUrl) === 'undefined' || typeof (paramUrl) !== 'undefined') {
// if (typeof val !== 'undefined' && val !== 'undefined') { this.videoUrl = paramUrl
// console.log(22222111) }
// console.log(val)
// this.$nextTick(() => {
//
// this.play(val)
// })
// }
// },
// immediate: true
// }
}, },
created() { created() {
const paramUrl = decodeURIComponent(this.$route.params.url) this.createPlayer().then(player => {
this.$nextTick(() => {
if (typeof (this.videoUrl) === 'undefined' || typeof (paramUrl) !== 'undefined') {
this.videoUrl = paramUrl
}
this.btnDom = document.getElementById('buttonsBox')
}) })
}, },
mounted() {}, mounted() {},
@@ -90,12 +77,10 @@ export default {
this.playerTime = 0 this.playerTime = 0
}, },
methods: { methods: {
create() { createPlayer() {
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']) { if (this.$refs.container.dataset['jessibuca']) {
this.$refs.container.dataset['jessibuca'] = undefined this.$refs.container.dataset['jessibuca'] = undefined
} }