Skip to content

Commit

Permalink
cleanup(text): Remove hard-coded tts:extent namespace in TTML parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Álvaro Velad Galván authored and Mathias DIDIER committed Sep 25, 2020
1 parent 0a93b4e commit 586249c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/text/ttml_text_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ shaka.text.TtmlTextParser = class {
const TtmlTextParser = shaka.text.TtmlTextParser;
const XmlUtils = shaka.util.XmlUtils;
const ttpNs = TtmlTextParser.parameterNs_;
const ttsNs = TtmlTextParser.styleNs_;
const str = shaka.util.StringUtils.fromUTF8(data);
const ret = [];
const parser = new DOMParser();
Expand Down Expand Up @@ -95,7 +96,7 @@ shaka.text.TtmlTextParser = class {
tickRate = XmlUtils.getAttributeNS(tt, ttpNs, 'tickRate');
cellResolution = XmlUtils.getAttributeNS(tt, ttpNs, 'cellResolution');
spaceStyle = tt.getAttribute('xml:space') || 'default';
extent = tt.getAttribute('tts:extent');
extent = XmlUtils.getAttributeNS(tt, ttsNs, 'extent');
}

if (spaceStyle != 'default' && spaceStyle != 'preserve') {
Expand Down Expand Up @@ -395,7 +396,7 @@ shaka.text.TtmlTextParser = class {
* @param {!Element} regionElement
* @param {!Array.<!Element>} styles Defined in the top of tt element and
* used principally for images.
* @param {string} globalExtent
* @param {?string} globalExtent
* @return {shaka.text.CueRegion}
* @private
*/
Expand Down

0 comments on commit 586249c

Please sign in to comment.