Skip to content

Commit

Permalink
[ONEM-26034] Use |innerText| for accessing dash.js subs content
Browse files Browse the repository at this point in the history
HTML node property |textContent| returns text without any whitespaces.
It leads to |DASH-FMP4-AVC1-AAC-TTML Subtitles| failures on dash.js,
because the returned value is verified against expected text which
inluced '\n' character.

Usage of |innerText| property solves the above issue.
  • Loading branch information
maciej-kolanski-red committed Jul 12, 2022
1 parent 0195e13 commit 0b65c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engines.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function extractSubtitleCue(content, callback) {
var subtitlesDiv = document.getElementById("subtitles");
var elements = subtitlesDiv.getElementsByTagName("div");
for (var i = 0; i < elements.length; i++) {
callback(elements[i].textContent);
callback(elements[i].innerText);
}
} else {
for (var i = 0; i < cues.length; i++) {
Expand Down

0 comments on commit 0b65c2d

Please sign in to comment.