Update subtitle.js

This commit is contained in:
Harvey Zack 2018-10-17 19:23:03 +08:00 committed by GitHub
parent e25be0c71f
commit 134d4df546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ class Subtitle {
const template = document.createElement('div');
template.appendChild(cue.getCueAsHTML());
const trackHtml = template.innerHTML.split(/\r?\n/).map(item => `<p>${item}</p>`).join('');
this.container.insertAdjacentHTML('beforeend', trackHtml);
this.container.innerHTML = trackHtml;
}
this.events.trigger('subtitle_change');
};