<template>
  <div :class="['cameraVideo',border?'cameraVideoBorder':'']">
    <span v-show="border" class="top-left"></span>
    <span v-show="border" class="top-right"></span>
    <span v-show="border" class="bottom-left"></span>
    <span v-show="border" class="bottom-right"></span>
    <video muted autoplay width="100%" loop :class="[reverse?'reverse':'']"
           class="videoControl" :id="videoData">
      <source :src="videoData" type="video/mp4">
    </video>
  </div>
</template>

<script>
export default {
  name: "localCamera",
  props: ["videoData", 'border', 'reverse'],
  watch: {},
  data() {
    return {
    };
  },
  methods: {
    setTime() {
      let el = document.getElementById(this.videoData)
      el.currentTime = 0
      el.play()
    }
  },
  computed: {},
  mounted() {
  },
  beforeDestroy() {
  },
};
</script>

<style lang="less" scoped>
.reverse {
  rotate: 180deg;
}

.cameraVideo {
  position: relative;


  .videoControl {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: fill;
    // aspect-ratio: 4/3;
    padding: 1px;
  }
}

.cameraVideoBorder {
  border: 1px solid #022950;
}

.top-left {
  position: absolute;
  left: -2px;
  top: -2px;
  padding: 6px;
  border-style: solid;
  border-color: #1889f1;
  border-width: 2px 0 0 2px;
}

.top-right {
  position: absolute;
  right: -2px;
  top: -2px;
  padding: 6px;
  border-style: solid;
  border-color: #1889f1;
  border-width: 2px 2px 0 0;
}

.bottom-left {
  position: absolute;
  right: -2px;
  bottom: -2px;
  padding: 6px;
  border-style: solid;
  border-color: #1889f1;
  border-width: 0 2px 2px 0;
}

.bottom-right {
  position: absolute;
  left: -2px;
  bottom: -2px;
  padding: 6px;
  border-style: solid;
  border-color: #1889f1;
  border-width: 0 0 2px 2px;
}
.lkqz_0{
  z-index: 2;
  position: absolute;
  font-size: 16px;
  color: white;
  font-weight: 700;
  left: 12px;
  top: 8px;
}
</style>
