Added popups
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user