<template>
  <dv-border-box-11 class="monitor-thumbnail" :title="monitor.location">
    <div class="monitor-content">
      <div class="video-container">
        <video autoplay loop muted>
          <source :src="monitor.videoSrc" type="video/mp4">
        </video>
      </div>
    </div>
  </dv-border-box-11>
</template>

<script setup>
defineProps({
  monitor: {
    type: Object,
    required: true,
    default: () => ({
      location: '港口区',
      videoSrc: ''
    })
  }
})
</script>

<style scoped>
.monitor-thumbnail {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.monitor-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.video-container {
  width: 94%;
  height: 74%;
  background: #000;
  margin-bottom: 10px;
  border-radius: 0 7px 7px 0;
  overflow: hidden;
  
  video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
</style>