From 7a770783a83eaba8a42ccabd3b0b4e798937d1d8 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Fri, 12 May 2017 14:23:50 -0700 Subject: [PATCH] Fix export of DataViewReader DataViewReader is referenced in the exported class Mp4Parser, so it must be exported as well. This fixes broken exports and externs in v2.1.0 and v2.1.1. Change-Id: If94e623d36694dd528495f654bbb8f27d0b113ba --- lib/util/data_view_reader.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/util/data_view_reader.js b/lib/util/data_view_reader.js index 9ce6ac2fc..1f77255f4 100644 --- a/lib/util/data_view_reader.js +++ b/lib/util/data_view_reader.js @@ -31,6 +31,7 @@ goog.require('shaka.util.StringUtils'); * * @struct * @constructor + * @export */ shaka.util.DataViewReader = function(dataView, endianness) { /** @private {!DataView} */ @@ -57,6 +58,7 @@ shaka.util.DataViewReader.Endianness = { /** * @return {boolean} True if the reader has more data, false otherwise. + * @export */ shaka.util.DataViewReader.prototype.hasMoreData = function() { return this.position_ < this.dataView_.byteLength; @@ -66,6 +68,7 @@ shaka.util.DataViewReader.prototype.hasMoreData = function() { /** * Gets the current byte position. * @return {number} + * @export */ shaka.util.DataViewReader.prototype.getPosition = function() { return this.position_; @@ -75,6 +78,7 @@ shaka.util.DataViewReader.prototype.getPosition = function() { /** * Gets the byte length of the DataView. * @return {number} + * @export */ shaka.util.DataViewReader.prototype.getLength = function() { return this.dataView_.byteLength; @@ -85,6 +89,7 @@ shaka.util.DataViewReader.prototype.getLength = function() { * Reads an unsigned 8 bit integer, and advances the reader. * @return {number} The integer. * @throws {shaka.util.Error} when reading past the end of the data view. + * @export */ shaka.util.DataViewReader.prototype.readUint8 = function() { try { @@ -101,6 +106,7 @@ shaka.util.DataViewReader.prototype.readUint8 = function() { * Reads an unsigned 16 bit integer, and advances the reader. * @return {number} The integer. * @throws {shaka.util.Error} when reading past the end of the data view. + * @export */ shaka.util.DataViewReader.prototype.readUint16 = function() { try { @@ -117,6 +123,7 @@ shaka.util.DataViewReader.prototype.readUint16 = function() { * Reads an unsigned 32 bit integer, and advances the reader. * @return {number} The integer. * @throws {shaka.util.Error} when reading past the end of the data view. + * @export */ shaka.util.DataViewReader.prototype.readUint32 = function() { try { @@ -133,6 +140,7 @@ shaka.util.DataViewReader.prototype.readUint32 = function() { * Reads a signed 32 bit integer, and advances the reader. * @return {number} The integer. * @throws {shaka.util.Error} when reading past the end of the data view. + * @export */ shaka.util.DataViewReader.prototype.readInt32 = function() { try { @@ -150,6 +158,7 @@ shaka.util.DataViewReader.prototype.readInt32 = function() { * @return {number} The integer. * @throws {shaka.util.Error} when reading past the end of the data view or * when reading an integer too large to store accurately in JavaScript. + * @export */ shaka.util.DataViewReader.prototype.readUint64 = function() { var low, high; @@ -186,6 +195,7 @@ shaka.util.DataViewReader.prototype.readUint64 = function() { * @param {number} bytes The number of bytes to read. * @return {!Uint8Array} * @throws {shaka.util.Error} when reading past the end of the data view. + * @export */ shaka.util.DataViewReader.prototype.readBytes = function(bytes) { goog.asserts.assert(bytes > 0, 'Bad call to DataViewReader.readBytes'); @@ -203,6 +213,7 @@ shaka.util.DataViewReader.prototype.readBytes = function(bytes) { * Skips the specified number of bytes. * @param {number} bytes The number of bytes to skip. * @throws {shaka.util.Error} when skipping past the end of the data view. + * @export */ shaka.util.DataViewReader.prototype.skip = function(bytes) { goog.asserts.assert(bytes >= 0, 'Bad call to DataViewReader.skip'); @@ -217,6 +228,7 @@ shaka.util.DataViewReader.prototype.skip = function(bytes) { * Keeps reading until it reaches a byte that equals to zero. The text is * assumed to be UTF-8. * @return {string} + * @export */ shaka.util.DataViewReader.prototype.readTerminatedString = function() { var start = this.position_;