박정하 박정하 05-19
250519 박정하 브라우저 재생 미지원 확장자 호환 버전 적용
@001c20a4d49be9cb1d2f3920061e475279c940cc
client/views/component/player/VideoComponent.vue
--- client/views/component/player/VideoComponent.vue
+++ client/views/component/player/VideoComponent.vue
@@ -1,21 +1,35 @@
 <template>
   <div class="video-player">
+    <!-- 재생 오류 시 메시지 -->
+    <div v-if="hasError" class="error-message mb-10">
+      <p>이 비디오 형식은 웹 브라우저에서 직접 재생할 수 없습니다. 다운로드 버튼을 이용해 원본 파일을 다운로드하세요.</p>
+    </div>
+    <!-- 비디오 플레이어 -->
     <video ref="videoPlayer" class="video-element" :src="videoUrl" controls @error="onError"></video>
   </div>
 </template>
 <script>
 export default {
-  name: 'VideoPlayer',
+  name: 'VideoComponent',
   props: {
     videoUrl: {
       type: String,
       required: true
+    },
+    fileId: {
+      type: String,
+      default: null
     }
+  },
+  data() {
+    return {
+      hasError: false
+    };
   },
   methods: {
     onError(e) {
       console.error('비디오 로드 중 오류가 발생했습니다:', e);
-      this.$emit('error', e);
+      this.hasError = true;
     }
   }
 };
@@ -23,11 +37,20 @@
 <style scoped>
 .video-player {
   width: 100%;
-  margin: 0 auto;
+  position: relative;
 }
 
 .video-element {
   width: 100%;
   display: block;
 }
+
+.error-message {
+  background-color: #ffeeee;
+  padding: 10px;
+  margin-top: 10px;
+  border-radius: 4px;
+  text-align: center;
+  font-size: 14px;
+}
 </style>
(파일 끝에 줄바꿈 문자 없음)
client/views/pages/bbsDcryVideo/VideoHistoryDetail.vue
--- client/views/pages/bbsDcryVideo/VideoHistoryDetail.vue
+++ client/views/pages/bbsDcryVideo/VideoHistoryDetail.vue
@@ -23,7 +23,7 @@
         </dd>
       </dl>
       <div class="gallery video">
-        <Video-component v-if="findResult.hasOwnProperty('files') && findResult.files.length > 0" :videoUrl="findResult.files[0].filePath" />
+        <Video-component v-if="findResult.hasOwnProperty('files') && findResult.files.length > 0" :videoUrl="findResult.files[findResult.files.length - 1].filePath" :fileId="findResult.files[0].fileId" />
         <img v-else :src="eximg" alt="">
       </div>
     </form>
Add a comment
List