Added popups

This commit is contained in:
2021-02-03 00:26:54 +01:00
parent 03e1490721
commit 3afcb45871
6 changed files with 90 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ class Model {
let xmlDoc = parser.parseFromString(xml, "text/xml");
this.comments = [];
this.popups = [];
let comment = xmlDoc.getElementsByTagName("comment");
for (let i = 0; i < comment.length; i++) {
@@ -16,8 +17,14 @@ class Model {
this.comments.push(new Comment(start, end, title, text));
}
let popup = xmlDoc.getElementsByTagName("popup");
for (let i = 0; i < popup.length; i++) {
let start = popup[i].getElementsByTagName("start")[0].innerHTML;
let end = popup[i].getElementsByTagName("end")[0].innerHTML;
let text = popup[i].getElementsByTagName("text")[0].innerHTML;
return this.comments;
this.popups.push(new Popup(start, end, text));
}
}
getVideoFileName(xml) {