<template>
  <div class="video-wrap">
    <VideoHeader :detail="detail" />
    <div class="content">
      <h3>直播已结束，稍后提供精彩回放</h3>
      <div class="time">
        <p><label>结束时间：</label>{{ detail.endTime }}</p>
        <p><label>直播时长：</label>{{ formatHSM(detail.duration) }}</p>
      </div>
      <img :src="detail.imgUrl" alt="" srcset="" />
    </div>
    <input type="text" placeholder="直播结束，暂不支持互动哟~" disabled />
  </div>
</template>

<script setup>
import { defineProps } from "vue";
import VideoHeader from "../components/VideoHeader.vue";
import { formatHSM } from "@/utils/format";
defineProps({
  detail: {
    type: Object,
    default: () => ({}),
  },
});
</script>
<style scoped lang="scss">
.video-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url(../../../assets/images/video-bg.png) no-repeat center;
  background-size: cover;
}
.content {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  transform: translateY(-50%);
  padding: 0 20px;
  h3 {
    color: rgb(255, 255, 255);
    text-align: center;
    font-size: 32px;
    font-weight: 400;
    line-height: 32px;
    margin-bottom: 24px;
  }
  .time {
    display: flex;
    padding: 10px 0;
    justify-content: space-around;
    align-items: center;
    color: rgb(255, 255, 255);
    font-size: 28px;
    font-style: normal;
    font-weight: 500;
    line-height: 36px;
    opacity: 0.6;
    border-radius: 32px;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 32px;
  }
  img {
    display: block;
    border-radius: 24px;
    height: 400px;
    width: 100%;
  }
}
input {
  position: absolute;
  bottom: 50px;
  left: 20px;
  right: 20px;
  text-align: center;
  color: rgb(179, 179, 179);
  font-size: 24px;
  font-weight: 500;
  line-height: 64px;
  opacity: 0.5;
  border-radius: 32px;
  background: rgba(0, 0, 0, 0.3);
}
</style>
