
--- client/views/component/player/VideoComponent.vue
+++ client/views/component/player/VideoComponent.vue
... | ... | @@ -1,0 +1,34 @@ |
1 |
+<template> |
|
2 |
+ <div class="video-player"> |
|
3 |
+ <video ref="videoPlayer" class="video-element" :src="videoUrl" controls @error="onError"></video> |
|
4 |
+ </div> |
|
5 |
+</template> |
|
6 |
+<script> |
|
7 |
+export default { |
|
8 |
+ name: 'VideoPlayer', |
|
9 |
+ props: { |
|
10 |
+ videoUrl: { |
|
11 |
+ type: String, |
|
12 |
+ required: true |
|
13 |
+ } |
|
14 |
+ }, |
|
15 |
+ methods: { |
|
16 |
+ onError(e) { |
|
17 |
+ console.error('비디오 로드 중 오류가 발생했습니다:', e); |
|
18 |
+ this.$emit('error', e); |
|
19 |
+ } |
|
20 |
+ } |
|
21 |
+}; |
|
22 |
+</script> |
|
23 |
+<style scoped> |
|
24 |
+.video-player { |
|
25 |
+ width: 100%; |
|
26 |
+ max-width: 800px; |
|
27 |
+ margin: 0 auto; |
|
28 |
+} |
|
29 |
+ |
|
30 |
+.video-element { |
|
31 |
+ width: 100%; |
|
32 |
+ display: block; |
|
33 |
+} |
|
34 |
+</style>(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/bbsDcry/video/VideoHistoryDetail.vue
+++ client/views/pages/bbsDcry/video/VideoHistoryDetail.vue
... | ... | @@ -24,6 +24,7 @@ |
24 | 24 |
</dl> |
25 | 25 |
<div class="gallery video"> |
26 | 26 |
<img :src="eximg" alt=""> |
27 |
+ <Video-component :videoUrl="findResult.files[0].filePath" /> |
|
27 | 28 |
</div> |
28 | 29 |
</form> |
29 | 30 |
<h3>내용</h3> |
... | ... | @@ -66,6 +67,7 @@ |
66 | 67 |
</template> |
67 | 68 |
<script> |
68 | 69 |
// COMPONENT |
70 |
+import VideoComponent from '../../../component/player/VideoComponent.vue'; |
|
69 | 71 |
import ViewerComponent from '../../../component/editor/ViewerComponent.vue'; |
70 | 72 |
// API |
71 | 73 |
import { findDcryProc, deleteDcryProc } from '@/resources/api/dcry'; |
... | ... | @@ -73,6 +75,7 @@ |
73 | 75 |
|
74 | 76 |
export default { |
75 | 77 |
components: { |
78 |
+ VideoComponent, |
|
76 | 79 |
ViewerComponent, |
77 | 80 |
}, |
78 | 81 |
|
--- client/views/pages/main/Main.vue
+++ client/views/pages/main/Main.vue
... | ... | @@ -322,7 +322,6 @@ |
322 | 322 |
|
323 | 323 |
// 페이지 이동 |
324 | 324 |
fnMoveTo(page, id) { |
325 |
- console.log("!! ", id); |
|
326 | 325 |
if (page === 'TotalSearch') { |
327 | 326 |
this.$router.push({ name: page, query: { searchRecord: this.searchRecord, searchText: this.searchText }, }); |
328 | 327 |
} else { |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?