-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInfos.vue
58 lines (55 loc) · 1.26 KB
/
Infos.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<template>
<div class="KaliopPlayer-infos">
<p class="KaliopPlayer-infosTitle">{{ title }}</p>
<span class="KaliopPlayer-infosDate">{{ date }}</span>
<span class="KaliopPlayer-infosAuthor">{{ author }}</span>
<span class="KaliopPlayer-infosDuration">{{ duration }}</span>
</div>
</template>
<script>
export default {
name: 'Infos',
props : {
eventBus: {
required: true,
type: Object
},
originTitle: {
required: true,
type: String
},
originDate: {
required: false,
type: String
},
originDuration: {
required: false,
type: String
},
originAuthor: {
required: false,
type: String
}
},
data() {
return {
title: '',
date: '',
duration: '',
author: ''
}
},
mounted() {
this.title = this.originTitle
this.date = this.originDate
this.duration = this.originDuration
this.author = this.originAuthor
this.eventBus.$on('Player::UpdateMedia', ({ media } = payload) => {
this.title = media.title
this.date = media.date
this.duration = media.duration
this.author = media.author
})
},
}
</script>