Skip to content

Commit c503e49

Browse files
authored
Merge pull request surmon-china#172 from Jondari/feature/handle-subtitle
add trackList prop to the component to handle subitles or captions
2 parents 523b99c + eeac13c commit c503e49

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/player.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<template>
22
<div class="video-player" v-if="reseted">
3-
<video class="video-js" ref="video"></video>
3+
<video class="video-js" ref="video">
4+
<track v-for="crtTrack in trackList" :kind="crtTrack.kind" :label="crtTrack.label" :src="crtTrack.src" :srcLang="crtTrack.srcLang" :default="crtTrack.default"/>
5+
</video>
46
</div>
57
</template>
68

@@ -100,6 +102,10 @@
100102
globalEvents: {
101103
type: Array,
102104
default: () => []
105+
},
106+
trackList: {
107+
type: Array,
108+
default: () => []
103109
}
104110
},
105111
data() {

0 commit comments

Comments
 (0)