济菏高速业务端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
714 B

1 year ago
<template>
<video controls autoplay muted class="video-stream" v-bind="$attrs" ref="videoContainerRef" />
</template>
<script>
import { HttpLivePlayer } from "./videoStream.js"
export default {
name: 'Video',
props: {
camId: {
type: String,
default: null
},
pileNum: {
type: String,
default: null
},
1 year ago
url: {
type: String,
default: null
}
},
mounted() {
const player = new HttpLivePlayer(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum });
1 year ago
this.$once("hook:beforeDestroy", () => player.destroy());
}
}
</script>
<style lang='scss' scoped>
.video-stream {
background-color: #000;
}
</style>