diff --git a/src/js/subtitle.js b/src/js/subtitle.js index a828fe9..32c2fc4 100644 --- a/src/js/subtitle.js +++ b/src/js/subtitle.js @@ -23,7 +23,7 @@ class Subtitle { const template = document.createElement('div'); template.appendChild(cue.getCueAsHTML()); const trackHtml = template.innerHTML.split(/\r?\n/).map(item => `
${item}
`).join(''); - this.container.insertAdjacentHTML('beforeend', trackHtml); + this.container.innerHTML = trackHtml; } this.events.trigger('subtitle_change'); };