fullSizeBannerVideo.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <section
  3. class="img--section--full"
  4. :class="mask"
  5. :data-type="type"
  6. :data-text-location="textLocation"
  7. >
  8. <div :style="{ height: height + 'px' }">
  9. <video
  10. :autoplay="true"
  11. :loop="true"
  12. :muted="true"
  13. crossorigin="anonymous"
  14. controls=""
  15. playsinline=""
  16. poster=""
  17. controlslist="nodownload noplaybackrate"
  18. disablepictureinpicture=""
  19. preload="metadata"
  20. class="VideoPlayer__VideoComponent-sc-72ae48fe-2 dAzSac"
  21. >
  22. <source media="(min-width:320px)" :src="videoPath" />
  23. </video>
  24. <div class="alt--text" v-if="altText" :style="'color:' + textColor">
  25. {{ altText }}
  26. </div>
  27. <div class="sub--title" v-if="subTitle" :style="'color:' + textColor">
  28. {{ subTitle }}
  29. </div>
  30. <div class="btn--wrapper" v-if="btnText">
  31. <NuxtLink :to="btnLink" :target="btnTarget" class="default--round--btn">
  32. {{ btnText }}
  33. </NuxtLink>
  34. <NuxtLink
  35. v-if="btnText2"
  36. :to="btnLink2"
  37. :target="btnTarget2"
  38. class="default--round--btn reverse"
  39. >
  40. {{ btnText2 }}
  41. </NuxtLink>
  42. </div>
  43. </div>
  44. <div v-if="cautionText" class="caution--text--small" v-html="cautionText"></div>
  45. </section>
  46. </template>
  47. <script setup>
  48. // Props 정의
  49. const props = defineProps({
  50. height: {
  51. type: String,
  52. default: "100vh",
  53. },
  54. videoPath: {
  55. type: String,
  56. default: "",
  57. },
  58. mask: {
  59. type: String,
  60. default: "",
  61. validator: (value) => ["", "hidden"].includes(value),
  62. },
  63. textLocation: {
  64. type: String,
  65. default: "bottom",
  66. validator: (value) => ["bottom", "top", "left", "right"].includes(value),
  67. },
  68. textColor: {
  69. type: String,
  70. default: "#fff",
  71. validator: (value) => ["#fff", "#020203"].includes(value),
  72. },
  73. cautionText: {
  74. type: String,
  75. default: "",
  76. },
  77. altText: {
  78. type: String,
  79. default: "",
  80. },
  81. subTitle: {
  82. type: String,
  83. default: "",
  84. },
  85. btnText: {
  86. type: String,
  87. default: "",
  88. },
  89. btnLink: {
  90. type: String,
  91. default: "",
  92. },
  93. btnTarget: {
  94. type: String,
  95. default: "",
  96. },
  97. btnText2: {
  98. type: String,
  99. default: "",
  100. },
  101. btnLink2: {
  102. type: String,
  103. default: "",
  104. },
  105. btnTarget2: {
  106. type: String,
  107. default: "",
  108. },
  109. type: {
  110. type: String,
  111. default: "contain", // 'horz' , 'vert'
  112. validator: (value) => ["contain", "cover"].includes(value),
  113. },
  114. });
  115. </script>