|
|
@ -28,19 +28,18 @@ export default { |
|
|
|
default: 'flv' |
|
|
|
}, |
|
|
|
rangeIndex: { |
|
|
|
type: Number, |
|
|
|
default: 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
async mounted() { |
|
|
|
// setTimeout(() => { |
|
|
|
// this.$nextTick(() => { |
|
|
|
if (this.videoType == 'flv') { |
|
|
|
// const player = await openLiveVideo(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum }) |
|
|
|
const player = new HttpLivePlayer(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum, rangeIndex: this.rangeIndex }); |
|
|
|
if (this.videoType == 'flv') { |
|
|
|
// const player = await openLiveVideo(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum }) |
|
|
|
const player = new HttpLivePlayer(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum, rangeIndex: this.rangeIndex }); |
|
|
|
|
|
|
|
this.$once("hook:beforeDestroy", () => player?.destroy()); |
|
|
|
} |
|
|
|
this.$once("hook:beforeDestroy", () => player?.destroy()); |
|
|
|
} |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
|
|
|
|