This commit is contained in:
Harvey Zack committed 2018-10-17 19:38:18 +08:00
1 parent 9dd49a849c
commit d276c22f9c
5 files changed
+7 -8

No files matched your search

+1 -2
View File
@@ -38,11 +38,10 @@ export default class Subtitle {
if (cue) {
const template = document.createElement('div');
template.appendChild(cue.getCueAsHTML());
const trackHtml = template.innerHTML
$subtitle.innerHTML = template.innerHTML
.split(/\r?\n/)
.map(item => `<p>${item}</p>`)
.join('');
$subtitle.insertAdjacentHTML('beforeend', trackHtml);
}
});
}