From 0f92d8221fdb7d8eeec8b2cd9df2a0b1e98cdfd9 Mon Sep 17 00:00:00 2001 From: Jacob Trimble Date: Tue, 13 Aug 2019 10:41:33 -0700 Subject: [PATCH] Fix use of private tags. Issue #1553 Change-Id: I8c0412eda3d68f2ad475bf8282afcaeffd80852a --- lib/dash/segment_base.js | 2 ++ lib/hls/hls_parser.js | 1 + lib/media/streaming_engine.js | 1 + lib/media/video_wrapper.js | 1 + lib/player.js | 3 +++ lib/text/ttml_text_parser.js | 6 +++--- lib/util/platform.js | 1 + ui/presentation_time.js | 1 + 8 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/dash/segment_base.js b/lib/dash/segment_base.js index 0ac7b04c7..517c2499a 100644 --- a/lib/dash/segment_base.js +++ b/lib/dash/segment_base.js @@ -207,6 +207,7 @@ shaka.dash.SegmentBase = class { * * @param {shaka.dash.DashParser.Context} context * @return {?{start: number, end: number}} + * @private */ static computeIndexRange_(context) { const MpdUtils = shaka.dash.MpdUtils; @@ -231,6 +232,7 @@ shaka.dash.SegmentBase = class { * * @param {shaka.dash.DashParser.Context} context * @return {!Array.} + * @private */ static computeIndexUris_(context) { const ManifestParserUtils = shaka.util.ManifestParserUtils; diff --git a/lib/hls/hls_parser.js b/lib/hls/hls_parser.js index a6a4b7a86..02006974b 100644 --- a/lib/hls/hls_parser.js +++ b/lib/hls/hls_parser.js @@ -797,6 +797,7 @@ shaka.hls.HlsParser = class { * @param {!shaka.hls.Tag} tag * @param {string} type * @return {Map.} closedCaptions + * @private */ getClosedCaptions_(tag, type) { const ContentType = shaka.util.ManifestParserUtils.ContentType; diff --git a/lib/media/streaming_engine.js b/lib/media/streaming_engine.js index fb6930bd9..aafff385a 100644 --- a/lib/media/streaming_engine.js +++ b/lib/media/streaming_engine.js @@ -656,6 +656,7 @@ shaka.media.StreamingEngine = class { * @param {!shaka.media.StreamingEngine.MediaState_} mediaState * @param {number} periodIndex * @return {boolean} + * @private */ shouldAbortCurrentRequest_(mediaState, periodIndex) { // If the operation is completed, it will be set to null, and there's no diff --git a/lib/media/video_wrapper.js b/lib/media/video_wrapper.js index 0559da345..35c578400 100644 --- a/lib/media/video_wrapper.js +++ b/lib/media/video_wrapper.js @@ -117,6 +117,7 @@ shaka.media.VideoWrapper = class { * set the start time once the element is ready. * * @param {number} startTime + * @private */ delaySetStartTime_(startTime) { const readyEvent = 'loadedmetadata'; diff --git a/lib/player.js b/lib/player.js index 9bd60bf50..f78aa45cd 100644 --- a/lib/player.js +++ b/lib/player.js @@ -1514,6 +1514,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @param {shaka.routing.Payload} has * @param {shaka.routing.Payload} wants * @return {!Promise} + * @private */ async onInitializeDrm_(has, wants) { goog.asserts.assert( @@ -1745,6 +1746,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @param {shaka.routing.Payload} has * @param {shaka.routing.Payload} wants * @return {!Promise} + * @private */ async onInitializeSrcEqualsDrm_(has, wants) { const ContentType = shaka.util.ManifestParserUtils.ContentType; @@ -2166,6 +2168,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * can monitor our buffer lead during playback. * * @param {number} rebufferingGoal + * @private */ startBufferManagement_(rebufferingGoal) { goog.asserts.assert( diff --git a/lib/text/ttml_text_parser.js b/lib/text/ttml_text_parser.js index 325c69101..e7298df30 100644 --- a/lib/text/ttml_text_parser.js +++ b/lib/text/ttml_text_parser.js @@ -222,14 +222,14 @@ shaka.text.TtmlTextParser = class { * @return {string} * @private */ - static sanitizeTextContent(element, whitespaceTrim) { + static sanitizeTextContent_(element, whitespaceTrim) { let payload = ''; for (const node of element.childNodes) { if (node.nodeName == 'br' && element.childNodes[0] !== node) { payload += '\n'; } else if (node.childNodes && node.childNodes.length > 0) { - payload += shaka.text.TtmlTextParser.sanitizeTextContent( + payload += shaka.text.TtmlTextParser.sanitizeTextContent_( /** @type {!Element} */ (node), whitespaceTrim ); @@ -328,7 +328,7 @@ shaka.text.TtmlTextParser = class { /\w+/.test(childNode.textContent) ) ) { - payload = shaka.text.TtmlTextParser.sanitizeTextContent( + payload = shaka.text.TtmlTextParser.sanitizeTextContent_( cueElement, whitespaceTrim, ); diff --git a/lib/util/platform.js b/lib/util/platform.js index 1929f34f3..7b7408df6 100644 --- a/lib/util/platform.js +++ b/lib/util/platform.js @@ -168,6 +168,7 @@ shaka.util.Platform = class { * Cached elements expire in one second so that they can be GC'd or removed. * * @return {!HTMLMediaElement} + * @private */ static anyMediaElement_() { const Platform = shaka.util.Platform; diff --git a/ui/presentation_time.js b/ui/presentation_time.js index 786f9e9ad..d834cee6a 100644 --- a/ui/presentation_time.js +++ b/ui/presentation_time.js @@ -135,6 +135,7 @@ shaka.ui.PresentationTimeTracker = class extends shaka.ui.Element { /** * Set the aria label to be 'Live' when the content is live stream. + * @private */ onTracksChanged_() { if (this.player.isLive()) {