/*! @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 = {};
/** @const */
shaka.util.CmcdManager = {};
/**
* @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
*/
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.textStrokeColor;
/**
* @override
*/
shaka.text.Cue.prototype.textStrokeWidth;
/**
* @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.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}
* @suppress {strictMissingProperties}
*/
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 data
field. System codes come
* from the browser and may or may not be documented. Here are some places
* where the errors may be documented:
*
* This defines the default ABR manager for the Player. An instance of this * class is used when no ABR manager is given. *
** 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. *
** 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}). *
* @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.mediaElement
,
* similar to calling attach
. When not provided, the player
* will remain detached.
* @param {function(shaka.Player)=} dependencyInjector Optional callback
* which is called to inject mocks into the Player. Used for testing.
*/
constructor(mediaElement, dependencyInjector) {}
/**
* After destruction, a Player object cannot be used again.
* @override
*/
destroy() {}
/**
* Registers a plugin callback that will be called with
* support()
. The callback will return the value that will be
* stored in the return value from support()
.
* @param {string} name
* @param {function():*} callback
*/
static registerSupportPlugin(name, callback) {}
/**
* Set a factory to create an ad manager during player construction time.
* This method needs to be called bafore instantiating the Player class.
* @param {!shaka.extern.IAdManager.Factory} factory
*/
static setAdManagerFactory(factory) {}
/**
* Return whether the browser provides basic support. If this returns false,
* Shaka Player cannot be used at all. In this case, do not construct a
* Player instance and do not use the library.
* @return {boolean}
*/
static isBrowserSupported() {}
/**
* Probes the browser to determine what features are supported. This makes a
* number of requests to EME/MSE/etc which may result in user prompts. This
* should only be used for diagnostics.
*
* NOTE: This may show a request to the user for permission.
* @see https://bit.ly/2ywccmH
* @param {boolean=} promptsOkay
* @return {!Promise.
* Calling
* Calls to
* Calls to
* Calls to
* Calls to
* First, this can be passed a single "plain" object. This object should
* follow the {@link shaka.extern.PlayerConfiguration} object. Not all fields
* need to be set; unset fields retain their old values.
*
* Second, this can be passed two arguments. The first is the name of the key
* to set. This should be a '.' separated path to the key. For example,
*
* The player does not support content that contain more than one type of
* variants (i.e. mixing audio-only, video-only, audio-video). Content will be
* filtered to only contain one type of variant.
* @return {boolean}
*/
isAudioOnly() {}
/**
* Get the range of time (in seconds) that seeking is allowed. If the player
* has not loaded content, this will return a range from 0 to 0.
* @return {{start: number, end: number}}
*/
seekRange() {}
/**
* Go to live in a live stream.
*/
goToLive() {}
/**
* Get the key system currently used by EME. If EME is not being used, this
* will return an empty string. If the player has not loaded content, this
* will return an empty string.
* @return {string}
*/
keySystem() {}
/**
* Get the drm info used to initialize EME. If EME is not being used, this
* will return
* If the player has not loaded content, this will return a playback rate of
* 0.
* @return {number}
*/
getPlaybackRate() {}
/**
* Enable trick play to skip through content without playing by repeatedly
* seeking. For example, a rate of 2.5 would result in 2.5 seconds of content
* being skipped every second. A negative rate will result in moving
* backwards.
*
* If the player has not loaded content or is still loading content this will
* be a no-op. Wait until
* Trick play will be canceled automatically if the playhead hits the
* beginning or end of the seekable range for the content.
* @param {number} rate
*/
trickPlay(rate) {}
/**
* Cancel trick-play. If the player has not loaded content or is still loading
* content this will be a no-op.
*/
cancelTrickPlay() {}
/**
* Return a list of variant tracks that can be switched to.
*
* If the player has not loaded content, this will return an empty list.
* @return {!Array.
* If the player has not loaded content, this will return an empty list.
* @return {!Array.
* Note that
* Changing variants will take effect once the currently buffered content has
* been played. To force the change to happen sooner, use
*
* Note that
* If the player has loaded content, and streaming has not seen an error, this
* will return
* If the player has loaded content, and streaming seen an error, but the
* could not resume streaming, this will return mediaElement
for all load
* requests until detach
or destroy
are called.
* attach
with initializedMediaSource=true
* will tell the player to take the initial load step and initialize media
* source.
* attach
will interrupt any in-progress calls to
* load
but cannot interrupt calls to attach
,
* detach
, or unload
.
* @param {!HTMLMediaElement} mediaElement
* @param {boolean=} initializeMediaSource
* @return {!Promise}
*/
attach(mediaElement, initializeMediaSource) {}
/**
* Tell the player to stop using its current media element. If the player is:
*
*
* detach
will interrupt any in-progress calls to
* load
but cannot interrupt calls to attach
,
* detach
, or unload
.
* @return {!Promise}
*/
detach() {}
/**
* Tell the player to either return to:
*
*
* initializedMediaSource=false
)
* initializedMediaSource=true
)
* unload
will interrupt any in-progress calls to
* load
but cannot interrupt calls to attach
,
* detach
, or unload
.
* @param {boolean=} initializeMediaSource
* @return {!Promise}
*/
unload(initializeMediaSource) {}
/**
* Provides a way to update the stream start position during the media loading
* process. Can for example be called from the manifestparsed
* event handler to update the start position based on information in the
* manifest.
* @param {number} startTime
*/
updateStartTime(startTime) {}
/**
* Tell the player to load the content at assetUri
and start
* playback at startTime
. Before calling load
,
* a call to attach
must have succeeded.
* load
will interrupt any in-progress calls to
* load
but cannot interrupt calls to attach
,
* detach
, or unload
.
* @param {string} assetUri
* @param {?number=} startTime
* When startTime
is null
or
* undefined
, playback will start at the default start time (0
* for VOD and liveEdge for LIVE).
* @param {string=} mimeType
* @return {!Promise}
*/
load(assetUri, startTime, mimeType) {}
/**
* Changes configuration settings on the Player. This checks the names of
* keys and the types of values to avoid coding errors. If there are errors,
* this logs them to the console and returns false. Correct fields are still
* applied even if there are other errors. You can pass an explicit
* undefined
value to restore the default value. This has two
* modes of operation:
* 'streaming.alwaysStreamText'
. The second argument is the
* value to set.
* @param {string|!Object} config This should either be a field name or an
* object.
* @param {*=} value In the second mode, this is the value to set.
* @return {boolean} True if the passed config object was valid, false if
* there were invalid entries.
*/
configure(config, value) {}
/**
* Return a copy of the current configuration. Modifications of the returned
* value will not affect the Player's active configuration. You must call
* player.configure()
to make changes.
* @return {shaka.extern.PlayerConfiguration}
*/
getConfiguration() {}
/**
* Returns the ratio of video length buffered compared to buffering Goal
* @return {number}
*/
getBufferFullness() {}
/**
* Reset configuration to default.
*/
resetConfiguration() {}
/**
* Get the current load mode.
* @return {shaka.Player.LoadMode}
*/
getLoadMode() {}
/**
* Get the media element that the player is currently using to play loaded
* content. If the player has not loaded content, this will return
* null
.
* @return {HTMLMediaElement}
*/
getMediaElement() {}
/**
* @return {shaka.net.NetworkingEngine} A reference to the Player's networking
* engine. Applications may use this to make requests through Shaka's
* networking plugins.
*/
getNetworkingEngine() {}
/**
* Get the uri to the asset that the player has loaded. If the player has not
* loaded content, this will return null
.
* @return {?string}
*/
getAssetUri() {}
/**
* Returns a shaka.ads.AdManager instance, responsible for Dynamic
* Ad Insertion functionality.
* @return {shaka.extern.IAdManager}
*/
getAdManager() {}
/**
* Get if the player is playing live content. If the player has not loaded
* content, this will return false
.
* @return {boolean}
*/
isLive() {}
/**
* Get if the player is playing in-progress content. If the player has not
* loaded content, this will return false
.
* @return {boolean}
*/
isInProgress() {}
/**
* Check if the manifest contains only audio-only content. If the player has
* not loaded content, this will return false
.
* null
. If the player is idle or has not initialized
* EME yet, this will return null
.
* @return {?shaka.extern.DrmInfo}
*/
drmInfo() {}
/**
* Get the next known expiration time for any EME session. If the session
* never expires, this will return Infinity
. If there are no EME
* sessions, this will return Infinity
. If the player has not
* loaded content, this will return Infinity
.
* @return {number}
*/
getExpiration() {}
/**
* Gets a map of EME key ID to the current key status.
* @return {!Objectfalse
.
* @return {boolean}
*/
isBuffering() {}
/**
* Get the playback rate of what is playing right now. If we are using trick
* play, this will return the trick play rate.
* If no content is playing, this will return 0.
* If content is buffering, this will return the expected playback rate once
* the video starts playing.
* load
has completed before calling.
* track
should come from a call to
* getTextTracks
. If the track is not found, this will be a
* no-op. If the player has not loaded content, this will be a no-op.
* AdaptationEvents
are not fired for manual track
* selections.
* @param {shaka.extern.Track} track
*/
selectTextTrack(track) {}
/**
* Select a specific variant track to play. track
should come
* from a call to getVariantTracks
. If track
cannot
* be found, this will be a no-op. If the player has not loaded content, this
* will be a no-op.
* clearBuffer
with safeMargin
. Setting
* clearBuffer
to true
will clear all buffered
* content after safeMargin
, allowing the new variant to start
* playing sooner.
* AdaptationEvents
are not fired for manual track
* selections.
* @param {shaka.extern.Track} track
* @param {boolean=} clearBuffer
* @param {number=} safeMargin Optional amount of buffer (in seconds) to
* retain when clearing the buffer. Useful for switching variant quickly
* without causing a buffering event. Defaults to 0 if not provided. Ignored
* if clearBuffer is false. Can cause hiccups on some browsers if chosen too
* small, e.g. The amount of two segments is a fair minimum to consider as
* safeMargin value.
*/
selectVariantTrack(track, clearBuffer, safeMargin) {}
/**
* Return a list of audio language-role combinations available. If the
* player has not loaded any content, this will return an empty list.
* @return {!Array.null
.
* @return {Date}
*/
getPlayheadTimeAsDate() {}
/**
* Get the presentation start time as a date. This should only be called when
* the player has loaded a live stream. If the player has not loaded a live
* stream, this will return null
.
* @return {Date}
*/
getPresentationStartTimeAsDate() {}
/**
* Get information about what the player has buffered. If the player has not
* loaded content or is currently loading content, the buffered content will
* be empty.
* @return {shaka.extern.BufferedInfo}
*/
getBufferedInfo() {}
/**
* Get statistics for the current playback session. If the player is not
* playing content, this will return an empty stats object.
* @return {shaka.extern.Stats}
*/
getStats() {}
/**
* Adds the given text track to the loaded manifest. load()
must
* resolve before calling. The presentation must have a duration.
* This returns the created track, which can immediately be selected by the
* application. The track will not be automatically selected.
* @param {string} uri
* @param {string} language
* @param {string} kind
* @param {string=} mimeType
* @param {string=} codec
* @param {string=} label
* @param {boolean=} forced
* @return {!Promise.load()
* must resolve before calling. The presentation must have a duration.
* This returns the created track.
* @param {string} uri
* @param {string} language
* @param {string=} mimeType
* @return {!Promise.shaka.cast.CastReceiver
* to enforce limitations of the Chromecast hardware.
* @param {number} width
* @param {number} height
*/
setMaxHardwareResolution(width, height) {}
/**
* Retry streaming after a streaming failure has occurred. When the player has
* not loaded content or is loading content, this will be a no-op and will
* return false
.
* false
.
* false
.
* @return {boolean}
*/
retryStreaming() {}
/**
* Get the manifest that the player has loaded. If the player has not loaded
* any content, this will return null
.
* NOTE: This structure is NOT covered by semantic versioning compatibility
* guarantees. It may change at any time!
* This is marked as deprecated to warn Closure Compiler users at compile-time
* to avoid using this method.
* @return {?shaka.extern.Manifest}
* @deprecated
*/
getManifest() {}
/**
* Get the type of manifest parser that the player is using. If the player has
* not loaded any content, this will return null
.
* @return {?shaka.extern.ManifestParser.Factory}
*/
getManifestParserFactory() {}
/**
* Set the videoContainer to construct UITextDisplayer.
* @param {HTMLElement} videoContainer
*/
setVideoContainer(videoContainer) {}
};
/**
* In order to know what method of loading the player used for some content, we
* have this enum. It lets us know if content has not been loaded, loaded with
* media source, or loaded with src equals.
* This enum has a low resolution, because it is only meant to express the
* outer limits of the various states that the player is in. For example, when
* someone calls a public method on player, it should not matter if they have
* initialized drm engine, it should only matter if they finished loading
* content.
* @enum {number}
*/
shaka.Player.LoadMode = {
'DESTROYED': 0,
'NOT_LOADED': 1,
'MEDIA_SOURCE': 2,
'SRC_EQUALS': 3
};
/**
* @define {string} A version number taken from git at compile time.
*/
shaka.Player.version;
/**
* @implements {shaka.extern.IAd}
*/
shaka.ads.ClientSideAd = class {
/**
* @param {!google.ima.Ad} imaAd
* @param {!google.ima.AdsManager} imaAdManager
* @param {HTMLMediaElement} video
*/
constructor(imaAd, imaAdManager, video) {}
/**
* @override
*/
getDuration() {}
/**
* @override
*/
getMinSuggestedDuration() {}
/**
* @override
*/
getRemainingTime() {}
/**
* @override
*/
isPaused() {}
/**
* @override
*/
isSkippable() {}
/**
* @override
*/
getTimeUntilSkippable() {}
/**
* @override
*/
canSkipNow() {}
/**
* @override
*/
skip() {}
/**
* @override
*/
pause() {}
/**
* @override
*/
play() {}
/**
* @override
*/
getVolume() {}
/**
* @override
*/
setVolume(volume) {}
/**
* @override
*/
isMuted() {}
/**
* @override
*/
isLinear() {}
/**
* @override
*/
resize(width, height) {}
/**
* @override
*/
setMuted(muted) {}
/**
* @override
*/
getSequenceLength() {}
/**
* @override
*/
getPositionInSequence() {}
/**
* @override
*/
release() {}
};
/**
* @implements {shaka.extern.IAd}
*/
shaka.ads.ServerSideAd = class {
/**
* @param {google.ima.dai.api.Ad} imaAd
* @param {HTMLMediaElement} video
*/
constructor(imaAd, video) {}
/**
* @override
*/
getDuration() {}
/**
* @override
*/
getMinSuggestedDuration() {}
/**
* @override
*/
getRemainingTime() {}
/**
* @override
*/
isPaused() {}
/**
* @override
*/
isSkippable() {}
/**
* @override
*/
getTimeUntilSkippable() {}
/**
* @override
*/
canSkipNow() {}
/**
* @override
*/
skip() {}
/**
* @override
*/
pause() {}
/**
* @override
*/
play() {}
/**
* @override
*/
getVolume() {}
/**
* @override
*/
setVolume(volume) {}
/**
* @override
*/
isMuted() {}
/**
* @override
*/
isLinear() {}
/**
* @override
*/
resize(width, height) {}
/**
* @override
*/
setMuted(muted) {}
/**
* @override
*/
getSequenceLength() {}
/**
* @override
*/
getPositionInSequence() {}
/**
* @override
*/
release() {}
};
/**
* A class responsible for ad-related interactions.
* @implements {shaka.extern.IAdManager}
* @implements {shaka.util.IReleasable}
*/
shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
/** */
constructor() {}
/**
* @override
*/
setLocale(locale) {}
/**
* @override
*/
initClientSide(adContainer, video) {}
/**
* @override
*/
release() {}
/**
* @override
*/
onAssetUnload() {}
/**
* @override
*/
requestClientSideAds(imaRequest) {}
/**
* @override
*/
initServerSide(adContainer, video) {}
/**
* @param {!google.ima.dai.api.StreamRequest} imaRequest
* @param {string=} backupUrl
* @return {!Promise.
* [4 bytes] initDataSize
* [initDataSize bytes] initData
* [4 bytes] contentIdSize
* [contentIdSize bytes] contentId
* [4 bytes] certSize
* [certSize bytes] cert
*
* @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) {}
/**
* SPC FairPlay request.
* @param {shaka.net.NetworkingEngine.RequestType} type
* @param {shaka.extern.Request} request
*/
static spcFairPlayRequest(type, request) {}
/**
* Common FairPlay response transform for some DRMs providers.
* @param {shaka.net.NetworkingEngine.RequestType} type
* @param {shaka.extern.Response} response
*/
static commonFairPlayResponse(type, response) {}
};