static getContents(node) {
    if (!Array.from(node.children).every(
        (n) => typeof n === 'string' )) {
      return null;
    }

    // Read merged text content from all text nodes.
    let text = shaka.util.TXml.getTextContents(node);
    if (text) {
      text = text.trim();
    }
    return text;
  }
Gets the text contents of a node.
@param {!shaka.extern.xml.Node} node The XML element.
@return {?string} The text contents, or null if there are none.