shaka-player
Version:
DASH/EME video player library
1,700 lines (1,698 loc) • 112 kB
JavaScript
/*! @license
* Shaka Player
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Generated externs. DO NOT EDIT!
* @externs
* @suppress {duplicate} To prevent compiler errors with the
* namespace being declared both here and by goog.provide in the
* library.
*/
/** @namespace */
window.shaka = {};
/** @const */
shaka.abr = {};
/** @const */
shaka.ads = {};
/** @const */
shaka.cast = {};
/** @const */
shaka.dash = {};
/** @const */
shaka.hls = {};
/** @const */
shaka.media = {};
/** @const */
shaka.net = {};
/** @const */
shaka.offline = {};
/** @const */
shaka.text = {};
/** @const */
shaka.util = {};
/**
* @implements {shaka.extern.Cue}
*/
shaka.text.Cue = class {
/**
* @param {number} startTime
* @param {number} endTime
* @param {string} payload
*/
constructor(startTime, endTime, payload) {}
};
/**
* @override
*/
shaka.text.Cue.prototype.startTime;
/**
* @override
*/
shaka.text.Cue.prototype.direction;
/**
* @override
*/
shaka.text.Cue.prototype.endTime;
/**
* @override
* @type {string}
*/
shaka.text.Cue.prototype.payload;
/**
* @override
*/
shaka.text.Cue.prototype.region;
/**
* @override
*/
shaka.text.Cue.prototype.position;
/**
* @override
*/
shaka.text.Cue.prototype.positionAlign;
/**
* @override
*/
shaka.text.Cue.prototype.size;
/**
* @override
*/
shaka.text.Cue.prototype.textAlign;
/**
* @override
*/
shaka.text.Cue.prototype.writingMode;
/**
* @override
*/
shaka.text.Cue.prototype.lineInterpretation;
/**
* @override
*/
shaka.text.Cue.prototype.line;
/**
* @override
*/
shaka.text.Cue.prototype.lineHeight;
/**
* Line Alignment is set to start by default.
* @override
*/
shaka.text.Cue.prototype.lineAlign;
/**
* Set the captions at the bottom of the text container by default.
* @override
*/
shaka.text.Cue.prototype.displayAlign;
/**
* @override
*/
shaka.text.Cue.prototype.color;
/**
* @override
*/
shaka.text.Cue.prototype.backgroundColor;
/**
* @override
*/
shaka.text.Cue.prototype.backgroundImage;
/**
* @override
*/
shaka.text.Cue.prototype.border;
/**
* @override
*/
shaka.text.Cue.prototype.fontSize;
/**
* @override
*/
shaka.text.Cue.prototype.fontWeight;
/**
* @override
*/
shaka.text.Cue.prototype.fontStyle;
/**
* @override
*/
shaka.text.Cue.prototype.fontFamily;
/**
* @override
*/
shaka.text.Cue.prototype.letterSpacing;
/**
* @override
*/
shaka.text.Cue.prototype.linePadding;
/**
* @override
*/
shaka.text.Cue.prototype.opacity;
/**
* @override
*/
shaka.text.Cue.prototype.textDecoration;
/**
* @override
*/
shaka.text.Cue.prototype.wrapLine;
/**
* @override
*/
shaka.text.Cue.prototype.id;
/**
* @override
*/
shaka.text.Cue.prototype.nestedCues;
/**
* @override
*/
shaka.text.Cue.prototype.isContainer;
/**
* @override
*/
shaka.text.Cue.prototype.lineBreak;
/**
* @override
*/
shaka.text.Cue.prototype.spacer;
/**
* @override
*/
shaka.text.Cue.prototype.cellResolution;
/**
* @enum {string}
*/
shaka.text.Cue.positionAlign = {
'LEFT': 'line-left',
'RIGHT': 'line-right',
'CENTER': 'center',
'AUTO': 'auto'
};
/**
* @enum {string}
*/
shaka.text.Cue.textAlign = {
'LEFT': 'left',
'RIGHT': 'right',
'CENTER': 'center',
'START': 'start',
'END': 'end'
};
/**
* Vertical alignments of the cues within their extents.
* 'BEFORE' means displaying at the top of the captions container box, 'CENTER'
* means in the middle, 'AFTER' means at the bottom.
* @enum {string}
*/
shaka.text.Cue.displayAlign = {
'BEFORE': 'before',
'CENTER': 'center',
'AFTER': 'after'
};
/**
* @enum {string}
*/
shaka.text.Cue.direction = {
'HORIZONTAL_LEFT_TO_RIGHT': 'ltr',
'HORIZONTAL_RIGHT_TO_LEFT': 'rtl'
};
/**
* @enum {string}
*/
shaka.text.Cue.writingMode = {
'HORIZONTAL_TOP_TO_BOTTOM': 'horizontal-tb',
'VERTICAL_LEFT_TO_RIGHT': 'vertical-lr',
'VERTICAL_RIGHT_TO_LEFT': 'vertical-rl'
};
/**
* @enum {number}
*/
shaka.text.Cue.lineInterpretation = {
'LINE_NUMBER': 0,
'PERCENTAGE': 1
};
/**
* @enum {string}
*/
shaka.text.Cue.lineAlign = {
'CENTER': 'center',
'START': 'start',
'END': 'end'
};
/**
* Default text color according to
* https://w3c.github.io/webvtt/#default-text-color
* @enum {string}
*/
shaka.text.Cue.defaultTextColor = {
'white': '#FFF',
'lime': '#0F0',
'cyan': '#0FF',
'red': '#F00',
'yellow': '#FF0',
'magenta': '#F0F',
'blue': '#00F',
'black': '#000'
};
/**
* Default text background color according to
* https://w3c.github.io/webvtt/#default-text-background
* @enum {string}
*/
shaka.text.Cue.defaultTextBackgroundColor = {
'bg_white': '#FFF',
'bg_lime': '#0F0',
'bg_cyan': '#0FF',
'bg_red': '#F00',
'bg_yellow': '#FF0',
'bg_magenta': '#F0F',
'bg_blue': '#00F',
'bg_black': '#000'
};
/**
* In CSS font weight can be a number, where 400 is normal and 700 is bold.
* Use these values for the enum for consistency.
* @enum {number}
*/
shaka.text.Cue.fontWeight = {
'NORMAL': 400,
'BOLD': 700
};
/**
* @enum {string}
*/
shaka.text.Cue.fontStyle = {
'NORMAL': 'normal',
'ITALIC': 'italic',
'OBLIQUE': 'oblique'
};
/**
* @enum {string}
*/
shaka.text.Cue.textDecoration = {
'UNDERLINE': 'underline',
'LINE_THROUGH': 'lineThrough',
'OVERLINE': 'overline'
};
/**
* @implements {shaka.extern.CueRegion}
* @struct
*/
shaka.text.CueRegion = class {
/** */
constructor() {}
};
/**
* @override
*/
shaka.text.CueRegion.prototype.id;
/**
* @override
*/
shaka.text.CueRegion.prototype.viewportAnchorX;
/**
* @override
*/
shaka.text.CueRegion.prototype.viewportAnchorY;
/**
* @override
*/
shaka.text.CueRegion.prototype.regionAnchorX;
/**
* @override
*/
shaka.text.CueRegion.prototype.regionAnchorY;
/**
* @override
*/
shaka.text.CueRegion.prototype.width;
/**
* @override
*/
shaka.text.CueRegion.prototype.height;
/**
* @override
*/
shaka.text.CueRegion.prototype.heightUnits;
/**
* @override
*/
shaka.text.CueRegion.prototype.widthUnits;
/**
* @override
*/
shaka.text.CueRegion.prototype.viewportAnchorUnits;
/**
* @override
*/
shaka.text.CueRegion.prototype.scroll;
/**
* @enum {number}
*/
shaka.text.CueRegion.units = {
'PX': 0,
'PERCENTAGE': 1,
'LINES': 2
};
/**
* @enum {string}
*/
shaka.text.CueRegion.scrollMode = {
'NONE': '',
'UP': 'up'
};
/**
* @summary A set of BufferSource utility functions.
*/
shaka.util.BufferUtils = class {
/**
* Compare two buffers for equality. For buffers of different types, this
* compares the underlying buffers as binary data.
* @param {?BufferSource} arr1
* @param {?BufferSource} arr2
* @return {boolean}
*/
static equal(arr1, arr2) {}
/**
* Gets an ArrayBuffer that contains the data from the given TypedArray. Note
* this will allocate a new ArrayBuffer if the object is a partial view of
* the data.
* @param {!BufferSource} view
* @return {!ArrayBuffer}
*/
static toArrayBuffer(view) {}
/**
* Creates a new Uint8Array view on the same buffer. This clamps the values
* to be within the same view (i.e. you can't use this to move past the end
* of the view, even if the underlying buffer is larger). However, you can
* pass a negative offset to access the data before the view.
* @param {BufferSource} data
* @param {number=} offset The offset from the beginning of this data's view
* to start the new view at.
* @param {number=} length The byte length of the new view.
* @return {!Uint8Array}
*/
static toUint8(data, offset, length) {}
/**
* Creates a DataView over the given buffer.
* @see toUint8
* @param {BufferSource} buffer
* @param {number=} offset
* @param {number=} length
* @return {!DataView}
*/
static toDataView(buffer, offset, length) {}
};
/**
* An interface to standardize how objects are destroyed.
* @interface
*/
shaka.util.IDestroyable = class {
/**
* Request that this object be destroyed, releasing all resources and shutting
* down all operations. Returns a Promise which is resolved when destruction
* is complete. This Promise should never be rejected.
* @return {!Promise}
*/
destroy() {}
};
/**
*/
shaka.dependencies = class {
/**
* Registers a new dependency.
* @param {shaka.dependencies.Allowed} key which is used for retrieving a
* dependency
* @param {?} dep a dependency
*/
static add(key, dep) {}
/**
* Check if we have a dependency for the key.
* @param {shaka.dependencies.Allowed} key key
* @return {boolean}
*/
static has(key) {}
};
/**
* @enum {string}
*/
shaka.dependencies.Allowed = {
muxjs: 'muxjs'
};
/**
* @summary
* Describes an error that happened.
* @description
* This uses numerical codes to describe
* which error happened.
* Some error are caused by errors from the browser. In these cases, the error
* object is provided as part of the <code>data</code> field. System codes come
* from the browser and may or may not be documented. Here are some places
* where the errors may be documented:
* <ul>
* <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaError">MediaError</a>
* <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status">HTTP Codes</a>
* <li><a href="https://hresult.info">Edge/PlayReady errors</a>
* </ul>
* @implements {shaka.extern.Error}
* @extends {Error}
*/
shaka.util.Error = class {
/**
* @param {shaka.util.Error.Severity} severity
* @param {shaka.util.Error.Category} category
* @param {shaka.util.Error.Code} code
* @param {...*} varArgs
*/
constructor(severity, category, code, ...varArgs) {}
};
/**
* @override
*/
shaka.util.Error.prototype.severity;
/**
* @override
*/
shaka.util.Error.prototype.category;
/**
* @override
*/
shaka.util.Error.prototype.code;
/**
* @override
*/
shaka.util.Error.prototype.data;
/**
* @override
*/
shaka.util.Error.prototype.handled;
/**
* @enum {number}
*/
shaka.util.Error.Severity = {
'RECOVERABLE': 1,
'CRITICAL': 2
};
/**
* @enum {number}
*/
shaka.util.Error.Category = {
'NETWORK': 1,
'TEXT': 2,
'MEDIA': 3,
'MANIFEST': 4,
'STREAMING': 5,
'DRM': 6,
'PLAYER': 7,
'CAST': 8,
'STORAGE': 9,
'ADS': 10
};
/**
* @enum {number}
*/
shaka.util.Error.Code = {
'UNSUPPORTED_SCHEME': 1000,
'BAD_HTTP_STATUS': 1001,
'HTTP_ERROR': 1002,
'TIMEOUT': 1003,
'MALFORMED_DATA_URI': 1004,
'REQUEST_FILTER_ERROR': 1006,
'RESPONSE_FILTER_ERROR': 1007,
'MALFORMED_TEST_URI': 1008,
'UNEXPECTED_TEST_REQUEST': 1009,
'ATTEMPTS_EXHAUSTED': 1010,
'INVALID_TEXT_HEADER': 2000,
'INVALID_TEXT_CUE': 2001,
'UNABLE_TO_DETECT_ENCODING': 2003,
'BAD_ENCODING': 2004,
'INVALID_XML': 2005,
'INVALID_MP4_TTML': 2007,
'INVALID_MP4_VTT': 2008,
'UNABLE_TO_EXTRACT_CUE_START_TIME': 2009,
'INVALID_MP4_CEA': 2010,
'TEXT_COULD_NOT_GUESS_MIME_TYPE': 2011,
'CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS': 2012,
'TEXT_ONLY_WEBVTT_SRC_EQUALS': 2013,
'MISSING_TEXT_PLUGIN': 2014,
'CHAPTERS_TRACK_FAILED': 2015,
'BUFFER_READ_OUT_OF_BOUNDS': 3000,
'JS_INTEGER_OVERFLOW': 3001,
'EBML_OVERFLOW': 3002,
'EBML_BAD_FLOATING_POINT_SIZE': 3003,
'MP4_SIDX_WRONG_BOX_TYPE': 3004,
'MP4_SIDX_INVALID_TIMESCALE': 3005,
'MP4_SIDX_TYPE_NOT_SUPPORTED': 3006,
'WEBM_CUES_ELEMENT_MISSING': 3007,
'WEBM_EBML_HEADER_ELEMENT_MISSING': 3008,
'WEBM_SEGMENT_ELEMENT_MISSING': 3009,
'WEBM_INFO_ELEMENT_MISSING': 3010,
'WEBM_DURATION_ELEMENT_MISSING': 3011,
'WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING': 3012,
'WEBM_CUE_TIME_ELEMENT_MISSING': 3013,
'MEDIA_SOURCE_OPERATION_FAILED': 3014,
'MEDIA_SOURCE_OPERATION_THREW': 3015,
'VIDEO_ERROR': 3016,
'QUOTA_EXCEEDED_ERROR': 3017,
'TRANSMUXING_FAILED': 3018,
'CONTENT_TRANSFORMATION_FAILED': 3019,
'UNABLE_TO_GUESS_MANIFEST_TYPE': 4000,
'DASH_INVALID_XML': 4001,
'DASH_NO_SEGMENT_INFO': 4002,
'DASH_EMPTY_ADAPTATION_SET': 4003,
'DASH_EMPTY_PERIOD': 4004,
'DASH_WEBM_MISSING_INIT': 4005,
'DASH_UNSUPPORTED_CONTAINER': 4006,
'DASH_PSSH_BAD_ENCODING': 4007,
'DASH_NO_COMMON_KEY_SYSTEM': 4008,
'DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED': 4009,
'DASH_CONFLICTING_KEY_IDS': 4010,
'RESTRICTIONS_CANNOT_BE_MET': 4012,
'HLS_PLAYLIST_HEADER_MISSING': 4015,
'INVALID_HLS_TAG': 4016,
'HLS_INVALID_PLAYLIST_HIERARCHY': 4017,
'DASH_DUPLICATE_REPRESENTATION_ID': 4018,
'HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND': 4020,
'HLS_MASTER_PLAYLIST_NOT_PROVIDED': 4022,
'HLS_REQUIRED_ATTRIBUTE_MISSING': 4023,
'HLS_REQUIRED_TAG_MISSING': 4024,
'HLS_COULD_NOT_GUESS_CODECS': 4025,
'HLS_KEYFORMATS_NOT_SUPPORTED': 4026,
'DASH_UNSUPPORTED_XLINK_ACTUATE': 4027,
'DASH_XLINK_DEPTH_LIMIT': 4028,
'HLS_COULD_NOT_PARSE_SEGMENT_START_TIME': 4030,
'CONTENT_UNSUPPORTED_BY_BROWSER': 4032,
'CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM': 4033,
'HLS_AES_128_ENCRYPTION_NOT_SUPPORTED': 4034,
'HLS_INTERNAL_SKIP_STREAM': 4035,
'NO_VARIANTS': 4036,
'PERIOD_FLATTENING_FAILED': 4037,
'INCONSISTENT_DRM_ACROSS_PERIODS': 4038,
'HLS_VARIABLE_NOT_FOUND': 4039,
'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
'FAILED_TO_CREATE_CDM': 6002,
'FAILED_TO_ATTACH_TO_VIDEO': 6003,
'INVALID_SERVER_CERTIFICATE': 6004,
'FAILED_TO_CREATE_SESSION': 6005,
'FAILED_TO_GENERATE_LICENSE_REQUEST': 6006,
'LICENSE_REQUEST_FAILED': 6007,
'LICENSE_RESPONSE_REJECTED': 6008,
'ENCRYPTED_CONTENT_WITHOUT_DRM_INFO': 6010,
'NO_LICENSE_SERVER_GIVEN': 6012,
'OFFLINE_SESSION_REMOVED': 6013,
'EXPIRED': 6014,
'SERVER_CERTIFICATE_REQUIRED': 6015,
'INIT_DATA_TRANSFORM_ERROR': 6016,
'SERVER_CERTIFICATE_REQUEST_FAILED': 6017,
'LOAD_INTERRUPTED': 7000,
'OPERATION_ABORTED': 7001,
'NO_VIDEO_ELEMENT': 7002,
'OBJECT_DESTROYED': 7003,
'CONTENT_NOT_LOADED': 7004,
'CAST_API_UNAVAILABLE': 8000,
'NO_CAST_RECEIVERS': 8001,
'ALREADY_CASTING': 8002,
'UNEXPECTED_CAST_ERROR': 8003,
'CAST_CANCELED_BY_USER': 8004,
'CAST_CONNECTION_TIMED_OUT': 8005,
'CAST_RECEIVER_APP_UNAVAILABLE': 8006,
'STORAGE_NOT_SUPPORTED': 9000,
'INDEXED_DB_ERROR': 9001,
'DEPRECATED_OPERATION_ABORTED': 9002,
'REQUESTED_ITEM_NOT_FOUND': 9003,
'MALFORMED_OFFLINE_URI': 9004,
'CANNOT_STORE_LIVE_OFFLINE': 9005,
'NO_INIT_DATA_FOR_OFFLINE': 9007,
'LOCAL_PLAYER_INSTANCE_REQUIRED': 9008,
'NEW_KEY_OPERATION_NOT_SUPPORTED': 9011,
'KEY_NOT_FOUND': 9012,
'MISSING_STORAGE_CELL': 9013,
'STORAGE_LIMIT_REACHED': 9014,
'DOWNLOAD_SIZE_CALLBACK_ERROR': 9015,
'CS_IMA_SDK_MISSING': 10000,
'CS_AD_MANAGER_NOT_INITIALIZED': 10001,
'SS_IMA_SDK_MISSING': 10002,
'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004
};
/**
* @namespace shaka.util.StringUtils
* @summary A set of string utility functions.
*/
shaka.util.StringUtils = class {
/**
* Creates a string from the given buffer as UTF-8 encoding.
* @param {?BufferSource} data
* @return {string}
*/
static fromUTF8(data) {}
/**
* Creates a string from the given buffer as UTF-16 encoding.
* @param {?BufferSource} data
* @param {boolean} littleEndian
true to read little endian, false to read big.
* @param {boolean=} noThrow true to avoid throwing in cases where we may
* expect invalid input. If noThrow is true and the data has an odd
* length,it will be truncated.
* @return {string}
*/
static fromUTF16(data, littleEndian, noThrow) {}
/**
* Creates a string from the given buffer, auto-detecting the encoding that is
* being used. If it cannot detect the encoding, it will throw an exception.
* @param {?BufferSource} data
* @return {string}
*/
static fromBytesAutoDetect(data) {}
/**
* Creates a ArrayBuffer from the given string, converting to UTF-8 encoding.
* @param {string} str
* @return {!ArrayBuffer}
*/
static toUTF8(str) {}
/**
* Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
* @param {string} str
* @param {boolean} littleEndian
* @return {!ArrayBuffer}
*/
static toUTF16(str, littleEndian) {}
/**
* Resets the fromCharCode method's implementation.
* For debug use.
*/
static resetFromCharCode() {}
};
/**
* @summary A set of Uint8Array utility functions.
*/
shaka.util.Uint8ArrayUtils = class {
/**
* Compare two Uint8Arrays for equality.
* @param {Uint8Array} arr1
* @param {Uint8Array} arr2
* @return {boolean}
* @deprecated
*/
static equal(arr1, arr2) {}
/**
* Convert a buffer to a base64 string. The output will be standard
* alphabet as opposed to base64url safe alphabet.
* @param {BufferSource} data
* @return {string}
*/
static toStandardBase64(data) {}
/**
* Convert a buffer to a base64 string. The output will always use the
* alternate encoding/alphabet also known as "base64url".
* @param {BufferSource} data
* @param {boolean=} padding If true, pad the output with equals signs.
* Defaults to true.
* @return {string}
*/
static toBase64(data, padding) {}
/**
* Convert a base64 string to a Uint8Array. Accepts either the standard
* alphabet or the alternate "base64url" alphabet.
* @param {string} str
* @return {!Uint8Array}
*/
static fromBase64(str) {}
/**
* Convert a hex string to a Uint8Array.
* @param {string} str
* @return {!Uint8Array}
*/
static fromHex(str) {}
/**
* Convert a buffer to a hex string.
* @param {BufferSource} data
* @return {string}
*/
static toHex(data) {}
/**
* Concatenate buffers.
* @param {...BufferSource} varArgs
* @return {!Uint8Array}
*/
static concat(...varArgs) {}
};
/**
* @summary Manages text parsers and cues.
* @implements {shaka.util.IDestroyable}
*/
shaka.text.TextEngine = class {
/** @param {shaka.extern.TextDisplayer} displayer */
constructor(displayer) {}
/**
* @param {string} mimeType
* @param {!shaka.extern.TextParserPlugin} plugin
*/
static registerParser(mimeType, plugin) {}
/**
* @param {string} mimeType
*/
static unregisterParser(mimeType) {}
/**
* @return {?shaka.extern.TextParserPlugin}
*/
static findParser(mimeType) {}
/**
* @override
*/
destroy() {}
};
/**
* A timer allows a single function to be executed at a later time or at
* regular intervals.
* @final
*/
shaka.util.Timer = class {
/**
* Create a new timer. A timer is committed to a single callback function.
* While there is no technical reason to do this, it is far easier to
* understand and use timers when they are connected to one functional idea.
* @param {function()} onTick
*/
constructor(onTick) {}
/**
* Have the timer call |onTick| now.
* @return {!shaka.util.Timer}
*/
tickNow() {}
/**
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
* called first.
* @param {number} seconds
* @return {!shaka.util.Timer}
*/
tickAfter(seconds) {}
/**
* Have the timer call |onTick| every |seconds| until |stop| is called.
* @param {number} seconds
* @return {!shaka.util.Timer}
*/
tickEvery(seconds) {}
/**
* Stop the timer and clear the previous behaviour. The timer is still usable
* after calling |stop|.
*/
stop() {}
};
/**
* @summary
* <p>
* This defines the default ABR manager for the Player. An instance of this
* class is used when no ABR manager is given.
* </p>
* <p>
* The behavior of this class is to take throughput samples using
* segmentDownloaded to estimate the current network bandwidth. Then it will
* use that to choose the streams that best fit the current bandwidth. It will
* always pick the highest bandwidth variant it thinks can be played.
* </p>
* <p>
* After initial choices are made, this class will call switchCallback() when
* there is a better choice. switchCallback() will not be called more than once
* per ({@link shaka.abr.SimpleAbrManager.SWITCH_INTERVAL_MS}).
* </p>
* @implements {shaka.extern.AbrManager}
*/
shaka.abr.SimpleAbrManager = class {
/** */
constructor() {}
/**
* @override
*/
stop() {}
/**
* @override
*/
init(switchCallback) {}
/**
* @override
*/
chooseVariant() {}
/**
* @override
*/
enable() {}
/**
* @override
*/
disable() {}
/**
* @override
*/
segmentDownloaded(deltaTimeMs, numBytes) {}
/**
* @override
*/
getBandwidthEstimate() {}
/**
* @override
*/
setVariants(variants) {}
/**
* @override
*/
playbackRateChanged(rate) {}
/**
* @override
*/
configure(config) {}
};
/**
* A utility to wrap abortable operations. Note that these are not cancelable.
* Cancelation implies undoing what has been done so far, whereas aborting only
* means that further work is stopped.
* @implements {shaka.extern.IAbortableOperation.<T>}
* @template T
*/
shaka.util.AbortableOperation = class {
/**
* @param {!Promise.<T>} promise
* A Promise which represents the underlying operation. It is resolved when
* the operation is complete, and rejected if the operation fails or is
* aborted. Aborted operations should be rejected with a shaka.util.Error
* object using the error code OPERATION_ABORTED.
* @param {function():!Promise} onAbort
* Will be called by this object to abort the underlying operation.
* This is not cancelation, and will not necessarily result in any work
* being undone. abort() should return a Promise which is resolved when the
* underlying operation has been aborted. The returned Promise should never
* be rejected.
*/
constructor(promise, onAbort) {}
/**
* @param {!shaka.util.Error} error
* @return {!shaka.util.AbortableOperation} An operation which has already
* failed with the error given by the caller.
*/
static failed(error) {}
/**
* @return {!shaka.util.AbortableOperation} An operation which has already
* failed with the error OPERATION_ABORTED.
*/
static aborted() {}
/**
* @param {U} value
* @return {!shaka.util.AbortableOperation.<U>} An operation which has already
* completed with the given value.
* @template U
*/
static completed(value) {}
/**
* @param {!Promise.<U>} promise
* @return {!shaka.util.AbortableOperation.<U>} An operation which cannot be
* aborted. It will be completed when the given Promise is resolved, or
* will be failed when the given Promise is rejected.
* @template U
*/
static notAbortable(promise) {}
/**
* @override
*/
abort() {}
/**
* @param {!Array.<!shaka.util.AbortableOperation>} operations
* @return {!shaka.util.AbortableOperation} An operation which is resolved
* when all operations are successful and fails when any operation fails.
* For this operation, abort() aborts all given operations.
*/
static all(operations) {}
/**
* @override
*/
finally(onFinal) {}
/**
* @param {(undefined|
* function(T):U|
* function(T):!Promise.<U>|
* function(T):!shaka.util.AbortableOperation.<U>)} onSuccess
* A callback to be invoked after this operation is complete, to chain to
* another operation. The callback can return a plain value, a Promise to
* an asynchronous value, or another AbortableOperation.
* @param {function(*)=} onError
* An optional callback to be invoked if this operation fails, to perform
* some cleanup or error handling. Analogous to the second parameter of
* Promise.prototype.then.
* @return {!shaka.util.AbortableOperation.<U>} An operation which is resolved
* when this operation and the operation started by the callback are both
* complete.
* @template U
*/
chain(onSuccess, onError) {}
};
/**
* @const {!Promise.<T>}
*/
shaka.util.AbortableOperation.prototype.promise;
/**
* @summary Create an Event work-alike object based on the provided dictionary.
* The event should contain all of the same properties from the dict.
* @extends {Event}
*/
shaka.util.FakeEvent = class {
/**
* @param {string} type
* @param {Map.<string, Object>=} dict
*/
constructor(type, dict) {}
};
/**
* An interface to standardize how objects release internal references
* synchronously. If an object needs to asynchronously release references, then
* it should use 'shaka.util.IDestroyable'.
* @interface
*/
shaka.util.IReleasable = class {
/**
* Request that this object release all internal references.
*/
release() {}
};
/**
* @summary A work-alike for EventTarget. Only DOM elements may be true
* EventTargets, but this can be used as a base class to provide event dispatch
* to non-DOM classes. Only FakeEvents should be dispatched.
* @implements {EventTarget}
* @implements {shaka.util.IReleasable}
*/
shaka.util.FakeEventTarget = class {
/** */
constructor() {}
/**
* Add an event listener to this object.
* @param {string} type The event type to listen for.
* @param {shaka.util.FakeEventTarget.ListenerType} listener The callback or
* listener object to invoke.
* @param {(!AddEventListenerOptions|boolean)=} options Ignored.
* @override
*/
addEventListener(type, listener, options) {}
/**
* Add an event listener to this object that is invoked for all events types
* the object fires.
* @param {shaka.util.FakeEventTarget.ListenerType} listener The callback or
* listener object to invoke.
*/
listenToAllEvents(listener) {}
/**
* Remove an event listener from this object.
* @param {string} type The event type for which you wish to remove a
* listener.
* @param {shaka.util.FakeEventTarget.ListenerType} listener The callback or
* listener object to remove.
* @param {(EventListenerOptions|boolean)=} options Ignored.
* @override
*/
removeEventListener(type, listener, options) {}
/**
* Dispatch an event from this object.
* @param {!Event} event The event to be dispatched from this object.
* @return {boolean} True if the default action was prevented.
* @override
*/
dispatchEvent(event) {}
/**
* @override
*/
release() {}
};
/**
* These are the listener types defined in the closure extern for EventTarget.
* @typedef {EventListener|function(!Event):*}
*/
shaka.util.FakeEventTarget.ListenerType;
/**
* NetworkingEngine wraps all networking operations. This accepts plugins that
* handle the actual request. A plugin is registered using registerScheme.
* Each scheme has at most one plugin to handle the request.
* @implements {shaka.util.IDestroyable}
*/
shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
/**
* @param {function(number, number)=} onProgressUpdated Called when a progress
* event is triggered. Passed the duration, in milliseconds, that the
* request took, and the number of bytes transferred.
*/
constructor(onProgressUpdated) {}
/**
* @param {boolean} forceHTTPS
*/
setForceHTTPS(forceHTTPS) {}
/**
* Registers a scheme plugin. This plugin will handle all requests with the
* given scheme. If a plugin with the same scheme already exists, it is
* replaced, unless the existing plugin is of higher priority.
* If no priority is provided, this defaults to the highest priority of
* APPLICATION.
* @param {string} scheme
* @param {shaka.extern.SchemePlugin} plugin
* @param {number=} priority
* @param {boolean=} progressSupport
*/
static registerScheme(scheme, plugin, priority, progressSupport) {}
/**
* Removes a scheme plugin.
* @param {string} scheme
*/
static unregisterScheme(scheme) {}
/**
* Registers a new request filter. All filters are applied in the order they
* are registered.
* @param {shaka.extern.RequestFilter} filter
*/
registerRequestFilter(filter) {}
/**
* Removes a request filter.
* @param {shaka.extern.RequestFilter} filter
*/
unregisterRequestFilter(filter) {}
/**
* Clears all request filters.
*/
clearAllRequestFilters() {}
/**
* Registers a new response filter. All filters are applied in the order they
* are registered.
* @param {shaka.extern.ResponseFilter} filter
*/
registerResponseFilter(filter) {}
/**
* Removes a response filter.
* @param {shaka.extern.ResponseFilter} filter
*/
unregisterResponseFilter(filter) {}
/**
* Clears all response filters.
*/
clearAllResponseFilters() {}
/**
* Gets a copy of the default retry parameters.
* @return {shaka.extern.RetryParameters}
* NOTE: The implementation moved to shaka.net.Backoff to avoid a circular
* dependency between the two classes.
*/
static defaultRetryParameters() {}
/**
* Makes a simple network request for the given URIs.
* @param {!Array.<string>} uris
* @param {shaka.extern.RetryParameters} retryParams
* @param {?function(BufferSource):!Promise=} streamDataCallback
* @return {shaka.extern.Request}
*/
static makeRequest(uris, retryParams, streamDataCallback) {}
/**
* @override
*/
destroy() {}
/**
* Makes a network request and returns the resulting data.
* @param {shaka.net.NetworkingEngine.RequestType} type
* @param {shaka.extern.Request} request
* @return {!shaka.net.NetworkingEngine.PendingRequest}
*/
request(type, request) {}
};
/**
* A wrapper class for the number of bytes remaining to be downloaded for the
* request.
* Instead of using PendingRequest directly, this class is needed to be sent to
* plugin as a parameter, and a Promise is returned, before PendingRequest is
* created.
*/
shaka.net.NetworkingEngine.NumBytesRemainingClass = class {
/**
* Constructor
*/
constructor() {}
};
/**
* A pending network request. This can track the current progress of the
* download, and allows the request to be aborted if the network is slow.
* @implements {shaka.extern.IAbortableOperation.<shaka.extern.Response>}
* @extends {shaka.util.AbortableOperation}
*/
shaka.net.NetworkingEngine.PendingRequest = class extends shaka.util.AbortableOperation {
/**
* @param {!Promise} promise
* A Promise which represents the underlying operation. It is resolved
* when the operation is complete, and rejected if the operation fails or
* is aborted. Aborted operations should be rejected with a
* shaka.util.Error object using the error code OPERATION_ABORTED.
* @param {function():!Promise} onAbort
* Will be called by this object to abort the underlying operation. This
* is not cancelation, and will not necessarily result in any work being
* undone. abort() should return a Promise which is resolved when the
* underlying operation has been aborted. The returned Promise should
* never be rejected.
* @param {shaka.net.NetworkingEngine.NumBytesRemainingClass}
* numBytesRemainingObj
*/
constructor(promise, onAbort, numBytesRemainingObj) {}
};
/**
* Request types. Allows a filter to decide which requests to read/alter.
* @enum {number}
*/
shaka.net.NetworkingEngine.RequestType = {
'MANIFEST': 0,
'SEGMENT': 1,
'LICENSE': 2,
'APP': 3,
'TIMING': 4,
'SERVER_CERTIFICATE': 5
};
/**
* Priority level for network scheme plugins.
* If multiple plugins are provided for the same scheme, only the
* highest-priority one is used.
* @enum {number}
*/
shaka.net.NetworkingEngine.PluginPriority = {
'FALLBACK': 1,
'PREFERRED': 2,
'APPLICATION': 3
};
/**
* @summary
* An EventManager maintains a collection of "event
* bindings" between event targets and event listeners.
* @implements {shaka.util.IReleasable}
*/
shaka.util.EventManager = class {
/** */
constructor() {}
/**
* Detaches all event listeners.
* @override
*/
release() {}
/**
* Attaches an event listener to an event target.
* @param {EventTarget} target The event target.
* @param {string} type The event type.
* @param {shaka.util.EventManager.ListenerType} listener The event listener.
* @param {(boolean|!AddEventListenerOptions)=} options An object that
* specifies characteristics about the event listener.
* The passive option, if true, indicates that this function will never
* call preventDefault(), which improves scrolling performance.
*/
listen(target, type, listener, options) {}
/**
* Attaches an event listener to an event target. The listener will be
* removed when the first instance of the event is fired.
* @param {EventTarget} target The event target.
* @param {string} type The event type.
* @param {shaka.util.EventManager.ListenerType} listener The event listener.
* @param {(boolean|!AddEventListenerOptions)=} options An object that
* specifies characteristics about the event listener.
* The passive option, if true, indicates that this function will never
* call preventDefault(), which improves scrolling performance.
*/
listenOnce(target, type, listener, options) {}
/**
* Detaches an event listener from an event target.
* @param {EventTarget} target The event target.
* @param {string} type The event type.
* @param {shaka.util.EventManager.ListenerType=} listener The event listener.
*/
unlisten(target, type, listener) {}
/**
* Detaches all event listeners from all targets.
*/
removeAll() {}
};
/**
* @typedef {function(!Event)}
*/
shaka.util.EventManager.ListenerType;
/**
* @summary A set of FairPlay utility functions.
*/
shaka.util.FairPlayUtils = class {
/**
* Using the default method, extract a content ID from the init data. This is
* based on the FairPlay example documentation.
* @param {!BufferSource} initData
* @return {string}
*/
static defaultGetContentId(initData) {}
/**
* Transforms the init data buffer using the given data. The format is:
* <pre>
* [4 bytes] initDataSize
* [initDataSize bytes] initData
* [4 bytes] contentIdSize
* [contentIdSize bytes] contentId
* [4 bytes] certSize
* [certSize bytes] cert
* </pre>
* @param {!BufferSource} initData
* @param {!BufferSource|string} contentId
* @param {?BufferSource} cert The server certificate; this will throw if not
* provided.
* @return {!Uint8Array}
*/
static initDataTransform(initData, contentId, cert) {}
};
/**
* @summary An interface to register manifest parsers.
*/
shaka.media.ManifestParser = class {
/**
* Registers a manifest parser by file extension.
* @param {string} extension The file extension of the manifest.
* @param {shaka.extern.ManifestParser.Factory} parserFactory The factory
* used to create parser instances.
*/
static registerParserByExtension(extension, parserFactory) {}
/**
* Registers a manifest parser by MIME type.
* @param {string} mimeType The MIME type of the manifest.
* @param {shaka.extern.ManifestParser.Factory} parserFactory The factory
* used to create parser instances.
*/
static registerParserByMime(mimeType, parserFactory) {}
/**
* Unregisters a manifest parser by MIME type.
* @param {string} mimeType The MIME type of the manifest.
*/
static unregisterParserByMime(mimeType) {}
};
/**
* @summary DataViewReader abstracts a DataView object.
*/
shaka.util.DataViewReader = class {
/**
* @param {BufferSource} data
* @param {shaka.util.DataViewReader.Endianness} endianness The endianness.
*/
constructor(data, endianness) {}
/**
* @return {boolean} True if the reader has more data, false otherwise.
*/
hasMoreData() {}
/**
* Gets the current byte position.
* @return {number}
*/
getPosition() {}
/**
* Gets the byte length of the DataView.
* @return {number}
*/
getLength() {}
/**
* Reads an unsigned 8 bit integer, and advances the reader.
* @return {number} The integer.
*/
readUint8() {}
/**
* Reads an unsigned 16 bit integer, and advances the reader.
* @return {number} The integer.
*/
readUint16() {}
/**
* Reads an unsigned 32 bit integer, and advances the reader.
* @return {number} The integer.
*/
readUint32() {}
/**
* Reads a signed 32 bit integer, and advances the reader.
* @return {number} The integer.
*/
readInt32() {}
/**
* Reads an unsigned 64 bit integer, and advances the reader.
* @return {number} The integer.
*/
readUint64() {}
/**
* Reads the specified number of raw bytes.
* @param {number} bytes The number of bytes to read.
* @return {!Uint8Array}
*/
readBytes(bytes) {}
/**
* Skips the specified number of bytes.
* @param {number} bytes The number of bytes to skip.
*/
skip(bytes) {}
/**
* Rewinds the specified number of bytes.
* @param {number} bytes The number of bytes to rewind.
*/
rewind(bytes) {}
/**
* Seeks to a specified position.
* @param {number} position The desired byte position within the DataView.
*/
seek(position) {}
/**
* Keeps reading until it reaches a byte that equals to zero. The text is
* assumed to be UTF-8.
* @return {string}
*/
readTerminatedString() {}
};
/**
* Endianness.
* @enum {number}
*/
shaka.util.DataViewReader.Endianness = {
'BIG_ENDIAN': 0,
'LITTLE_ENDIAN': 1
};
/**
*/
shaka.util.Mp4Parser = class {
/** */
constructor() {}
/**
* Declare a box type as a Box.
* @param {string} type
* @param {!shaka.util.Mp4Parser.CallbackType} definition
* @return {!shaka.util.Mp4Parser}
*/
box(type, definition) {}
/**
* Declare a box type as a Full Box.
* @param {string} type
* @param {!shaka.util.Mp4Parser.CallbackType} definition
* @return {!shaka.util.Mp4Parser}
*/
fullBox(type, definition) {}
/**
* Stop parsing. Useful for extracting information from partial segments and
* avoiding an out-of-bounds error once you find what you are looking for.
*/
stop() {}
/**
* Parse the given data using the added callbacks.
* @param {!BufferSource} data
* @param {boolean=} partialOkay If true, allow reading partial payloads
* from some boxes. If the goal is a child box, we can sometimes find it
* without enough data to find all child boxes.
* @param {boolean=} stopOnPartial If true, stop reading if an incomplete
* box is detected.
*/
parse(data, partialOkay, stopOnPartial) {}
/**
* Parse the next box on the current level.
* @param {number} absStart The absolute start position in the original
* byte array.
* @param {!shaka.util.DataViewReader} reader
* @param {boolean=} partialOkay If true, allow reading partial payloads
* from some boxes. If the goal is a child box, we can sometimes find it
* without enough data to find all child boxes.
* @param {boolean=} stopOnPartial If true, stop reading if an incomplete
* box is detected.
*/
parseNext(absStart, reader, partialOkay, stopOnPartial) {}
/**
* A callback that tells the Mp4 parser to treat the body of a box as a series
* of boxes. The number of boxes is limited by the size of the parent box.
* @param {!shaka.extern.ParsedBox} box
*/
static children(box) {}
/**
* A callback that tells the Mp4 parser to treat the body of a box as a sample
* description. A sample description box has a fixed number of children. The
* number of children is represented by a 4 byte unsigned integer. Each child
* is a box.
* @param {!shaka.extern.ParsedBox} box
*/
static sampleDescription(box) {}
/**
* Create a callback that tells the Mp4 parser to treat the body of a box as a
* binary blob and to parse the body's contents using the provided callback.
* @param {function(!Uint8Array)} callback
* @return {!shaka.util.Mp4Parser.CallbackType}
*/
static allData(callback) {}
/**
* Convert an integer type from a box into an ascii string name.
* Useful for debugging.
* @param {number} type The type of the box, a uint32.
* @return {string}
*/
static typeToString(type) {}
/**
* Find the header size of the box.
* Useful for modifying boxes in place or finding the exact offset of a field.
* @param {shaka.extern.ParsedBox} box
* @return {number}
*/
static headerSize(box) {}
};
/**
* @typedef {function(!shaka.extern.ParsedBox)}
*/
shaka.util.Mp4Parser.CallbackType;
/**
* Creates an InitSegmentReference, which provides the location to an
* initialization segment.
*/
shaka.media.InitSegmentReference = class {
/**
* @param {function():!Array.<string>} uris A function that creates the URIs
* of the resource containing the segment.
* @param {number} startByte The offset from the start of the resource to the
* start of the segment.
* @param {?number} endByte The offset from the start of the resource to the
* end of the segment, inclusive. A value of null indicates that the
* segment extends to the end of the resource.
*/
constructor(uris, startByte, endByte) {}
/**
* Returns the offset from the start of the resource to the
* start of the segment.
* @return {number}
*/
getStartByte() {}
/**
* Returns the offset from the start of the resource to the end of the
* segment, inclusive. A value of null indicates that the segment extends
* to the end of the resource.
* @return {?number}
*/
getEndByte() {}
};
/**
* SegmentReference provides the start time, end time, and location to a media
* segment.
*/
shaka.media.SegmentReference = class {
/**
* @param {number} startTime The segment's start time in seconds.
* @param {number} endTime The segment's end time in seconds. The segment
* ends the instant before this time, so |endTime| must be strictly greater
* than |startTime|.
* @param {function():!Array.<string>} uris
* A function that creates the URIs of the resource containing the segment.
* @param {number} startByte The offset from the start of the resource to the
* start of the segment.
* @param {?number} endByte The offset from the start of the resource to the
* end of the segment, inclusive. A value of null indicates that the
* segment extends to the end of the resource.
* @param {shaka.media.InitSegmentReference} initSegmentReference
* The segment's initialization segment metadata, or null if the segments
* are self-initializing.
* @param {number} timestampOffset
* The amount of time, in seconds, that must be added to the segment's
* internal timestamps to align it to the presentation timeline.
* <br>
* For DASH, this value should equal the Period start time minus the first
* presentation timestamp of the first frame/sample in the Period. For
* example, for MP4 based streams, this value should equal Period start
* minus the first segment's tfdt box's 'baseMediaDecodeTime' field (after
* it has been converted to seconds).
* <br>
* For HLS, this value should be 0 to keep the presentation time at the most
* recent discontinuity minus the corresponding media time.
* @param {number} appendWindowStart
* The start of the append window for this reference, relative to the
* presentation. Any content from before this time will be removed by
* MediaSource.
* @param {number} appendWindowEnd
* The end of the append window for this reference, relative to the
* presentation. Any content from after this time will be removed by
* MediaSource.
* @param {!Array.<!shaka.media.SegmentReference>=} partialReferences
* A list of SegmentReferences for the partial segments.
* @param {?string=} tilesLayout
* The value is a grid-item-dimension consisting of two positive decimal
* integers in the format: column-x-row ('4x3'). It describes the
* arrangement of Images in a Grid. The minimum valid LAYOUT is '1x1'.
* @param {?number=} tileDuration
* The explicit duration of an individual tile within the tiles grid.
* If not provided, the duration should be automatically calculated based on
* the duration of the reference.
*/
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration) {}
/**
* Creates and returns the URIs of the resource containing the segment.
* @return {!Array.<string>}
*/
getUris() {}
/**
* Returns the segment's start time in seconds.
* @return {number}
*/
getStartTime() {}
/**
* Returns the segment's end time in seconds.
* @return {number}
*/
getEndTime() {}
/**
* Returns the offset from the start of the resource to the
* start of the segment.
* @return {number}
*/
getStartByte() {}
/**
* Returns the offset from the start of the resource to the end of the
* segment, inclusive. A value of null indicates that the segment extends to
* the end of the resource.
* @return {?number}
*/
getEndByte() {}
/**
* Returns the segment's tiles layout. Only defined in image segments.
* @return {?string}
*/
getTilesLayout() {}
/**
* Returns the segment's explicit tile duration.
* Only defined in image segments.
* @return {?number}
*/
getTileDuration() {}
};
/**
* PresentationTimeline.
*/
shaka.media.PresentationTimeline = class {
/**
* @param {?number} presentationStartTime The wall-clock time, in seconds,
* when the presentation started or will start. Only required for live.
* @param {number} presentationDelay The delay to give the presentation, in
* seconds. Only required for live.
* @param {boolean=} autoCorrectDrift Whether to account for drift when
* determining the availability window.
* @see {shaka.extern.Manifest}
* @see {@tutorial architecture}
*/
constructor(presentationStartTime, presentationDelay, autoCorrectDrift) {}
/**
* @return {number} The presentation's duration in seconds.
* Infinity indicates that the presentation continues indefinitely.
*/
getDuration() {}
/**
* @return {number} The presentation's max segment duration in seconds.
*/
getMaxSegmentDuration() {}
/**
* Sets the presentation's duration.
* @param {number} duration The presentation's duration in seconds.
* Infinity indicates that the presentation continues indefinitely.
*/
setDuration(duration) {}
/**
* @return {?number} The presentation's start time in seconds.
*/
getPresentationStartTime() {}
/**
* Sets the clock offset, which is the difference between the client's clock
* and the server's clock, in milliseconds (i.e., serverTime = Date.now() +
* clockOffset).
* @param {number} offset The clock offset, in ms.
*/
setClockOffset(offset) {}
/**
* Sets the presentation's static flag.
* @param {boolean} isStatic If true, the presentation is static, meaning all
* segments are available at once.
*/
setStatic(isStatic) {}
/**
* Sets the presentation's segment availability duration. The segment
* availability duration should only be set for live.
* @param {number} segmentAvailabilityDuration The presentation's new segment
* availability duration in seconds.
*/
setSegmentAvailabilityDuration(segmentAvailabilityDuration) {}
/**
* Sets the presentation delay in seconds.
* @param {number} delay
*/
setDelay(delay) {}
/**
* Gets the presentation delay in seconds.
* @return {number}
*/
getDelay() {}
/**
* Gives PresentationTimeline a Stream's segments so it can size and position
* the segment availability window, and account for missing segment
* information. This function should be called once for each Stream (no more,
* no less).
* @param {!Array.<!shaka.media.SegmentReference>} references
*/
notifySegments(references) {}
/**
* Gives PresentationTimeline a Stream's minimum segment start time.
* @param {number} startTime
*/
notifyMinSegmentStartTime(startTime) {}
/**
* Gives PresentationTimeline a Stream's maximum segment duration so it can
* size and position the segment availability window. This function should be
* called once for each Stream (no more, no less), but does not have to be
* called if notifySegments() is called instead for a particular stream.
* @param {number} maxSegmentDuration The maximum segment duration for a
* particular stream.
*/
notifyMaxSegmentDuration(maxSegmentDuration) {}
/**
* Offsets the segment times by the given amount.
* @param {number} offset The number of seconds to offset by. A positive
* number adjusts the segment times forward.
*/
offset(offset) {}
/**
* @return {boolean} True if the presentation is live; otherwise, return
* false.
*/
isLive() {}
/**
* @return {boolean} True if the presentation is in progress (meaning not
* live, but also not completely available); otherwise, return false.
*/
isInProgress() {}
/**
* Gets the presentation's current segment availability start time. Segments
* ending at or before this time should be assumed to be unavailable.
* @return {number} The current segment availability start time, in seconds,
* relative to the start of the presentation.
*/
getSegmentAvailabilityStart() {}
/**
* Sets the start time of the user-defined seek range. This is only used for
* VOD content.
* @param {number} time
*/
setUserSeekStart(time) {}
/**
* Gets the presentation's current segment availability end time. Segments
* starting after this ti