- Source:
Interfaces
- AbrManager
- EmeSessionStorageCell
- Error
- IAbortableOperation
- IAd
- IAdManager
- ICaptionDecoder
- ICeaParser
- IUIElement
- IUIPlayButton
- IUIRangeElement
- IUISeekBar
- IUISettingsMenu
- ManifestParser
- SegmentIndex
- StorageCell
- StorageMechanism
- TextDisplayer
- An interface for plugins that display text.
- TextParser
- Transmuxer
Type Definitions
AbrConfiguration
Type:
- {enabled: boolean, useNetworkInformation: boolean, defaultBandwidthEstimate: number, restrictions: shaka.extern.Restrictions, switchInterval: number, bandwidthUpgradeTarget: number, bandwidthDowngradeTarget: number, advanced: shaka.extern.AdvancedAbrConfiguration, restrictToElementSize: boolean, restrictToScreenSize: boolean, ignoreDevicePixelRatio: boolean, clearBufferSwitch: boolean, safeMarginSwitch: number, cacheLoadThreshold: number, minTimeToSwitch: number, preferNetworkInformationBandwidth: boolean}
Properties:
Name | Type | Description |
---|---|---|
enabled |
boolean | If true, enable adaptation by the current AbrManager.
Defaults to true . |
useNetworkInformation |
boolean | If true, use the Network Information API in the current AbrManager, if it
is available in the browser environment. If the Network Information API is
used, Shaka Player will ignore the defaultBandwidthEstimate config.
Defaults to true . |
defaultBandwidthEstimate |
number | The default bandwidth estimate to use if there is not enough data, in
bit/sec. Only used if useNetworkInformation is false, or if the Network
Information API is not available.
Defaults to 1e6 . |
restrictions |
shaka.extern.Restrictions | The restrictions to apply to ABR decisions. These are "soft" restrictions.
Any track that fails to meet these restrictions will not be selected
automatically, but will still appear in the track list and can still be
selected via selectVariantTrack() . If no tracks meet these
restrictions, AbrManager should not fail, but choose a low-res or
low-bandwidth variant instead. It is the responsibility of AbrManager
implementations to follow these rules and implement this behavior. |
switchInterval |
number | The minimum amount of time that must pass between switches, in
seconds. This keeps us from changing too often and annoying the user.
Defaults to 8 . |
bandwidthUpgradeTarget |
number | The fraction of the estimated bandwidth which we should try to use when
upgrading.
Defaults to 0.85 . |
bandwidthDowngradeTarget |
number | The largest fraction of the estimated bandwidth we should use. We should
downgrade to avoid this.
Defaults to 0.95 . |
advanced |
shaka.extern.AdvancedAbrConfiguration | Advanced ABR configuration |
restrictToElementSize |
boolean | If true, restrict the quality to media element size.
Note: The use of ResizeObserver is required for it to work properly. If
true without ResizeObserver, it behaves as false.
Defaults to false . |
restrictToScreenSize |
boolean | If true, restrict the quality to screen size.
Defaults to false . |
ignoreDevicePixelRatio |
boolean | If true,device pixel ratio is ignored when restricting the quality to
media element size or screen size.
Defaults to false . |
clearBufferSwitch |
boolean | If true, the buffer will be cleared during the switch.
The default automatic behavior is false to have a smoother transition.
On some device it's better to clear buffer.
Defaults to false . |
safeMarginSwitch |
number | Optional amount of buffer (in seconds) to
retain when clearing the buffer during the automatic switch.
Useful for switching variant quickly without causing a buffering event.
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.
Defaults to o . |
cacheLoadThreshold |
number | Indicates the value in milliseconds from which a request is not
considered cached.
Defaults to 20 . |
minTimeToSwitch |
number | Indicates the minimum time to change quality once the real bandwidth is
available, in seconds. This time is only used on the first load.
Defaults to 0 seconds except in Apple browsers whose default
value is 0.5 seconds. |
preferNetworkInformationBandwidth |
boolean | If true, use the Network Information API bandwidth estimation in the
current AbrManager, if it is available in the browser environment. This
way Shaka Player will never estimate the bandwidth and we will always
trust the information provided by the browser.
Defaults to false . |
- Source:
AdCuePoint
Type:
- {start: number, end: ?number}
Properties:
Name | Type | Description |
---|---|---|
start |
number | The start time of the range, in milliseconds. |
end |
number | The end time of the range, in milliseconds. |
- Source:
AdInterstitial
Type:
- {id: ?string, startTime: number, endTime: ?number, uri: string, mimeType: ?string, isSkippable: boolean, skipOffset: ?number, skipFor: ?number, canJump: boolean, resumeOffset: ?number, playoutLimit: ?number, once: boolean, pre: boolean, post: boolean, timelineRange: boolean}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
string |
<nullable> |
The id of the interstitial. |
startTime |
number | The start time of the interstitial. | |
endTime |
number |
<nullable> |
The end time of the interstitial. |
uri |
string | The uri of the interstitial, can be any type that ShakaPlayer supports (either in MSE or src=) | |
mimeType |
string |
<nullable> |
The mimeType of the interstitial if known. |
isSkippable |
boolean | Indicate if the interstitial is skippable. | |
skipOffset |
number |
<nullable> |
Time value that identifies when skip controls are made available to the end user. |
skipFor |
number |
<nullable> |
The amount of time in seconds a skip button should be displayed for. Note that this value should be >= 0. |
canJump |
boolean | Indicate if the interstitial is jumpable. | |
resumeOffset |
number |
<nullable> |
Indicates where the primary playback will resume after the interstitial plays. It is expressed as a time lag from when interstitial playback was scheduled on the primary player's timeline. For live ad replacement it must be null. |
playoutLimit |
number |
<nullable> |
Indicate a limit for the playout time of the entire interstitial. |
once |
boolean | Indicates that the interstitial should only be played once. | |
pre |
boolean | Indicates that an action is to be triggered before playback of the primary asset begins, regardless of where playback begins in the primary asset. | |
post |
boolean | Indicates that an action is to be triggered after the primary asset has been played to its end without error. | |
timelineRange |
boolean | Indicates whether the interstitial should be presented in a timeline UI as a single point or as a range. |
- Source:
AdsConfiguration
Type:
- {customPlayheadTracker: boolean, skipPlayDetection: boolean, supportsMultipleMediaElements: boolean, disableHLSInterstitial: boolean, disableDASHInterstitial: boolean}
Properties:
Name | Type | Description |
---|---|---|
customPlayheadTracker |
boolean | If this is true , we create a custom playhead tracker for
Client Side. This is useful because it allows you to implement the use of
IMA on platforms that do not support multiple video elements.
Defaults to false except on Tizen, WebOS, Chromecast,
Hisense, PlayStation 4, PlayStation5, Xbox whose default value is
true . |
skipPlayDetection |
boolean | If this is true, we will load Client Side ads without waiting for a play
event.
Defaults to false except on Tizen, WebOS, Chromecast,
Hisense, PlayStation 4, PlayStation5, Xbox whose default value is
true . |
supportsMultipleMediaElements |
boolean | If this is true, the browser supports multiple media elements.
Defaults to true except on Tizen, WebOS, Chromecast,
Hisense, PlayStation 4, PlayStation5, Xbox whose default value is
false . |
disableHLSInterstitial |
boolean | If this is true, we ignore HLS interstitial events.
Defaults to false . |
disableDASHInterstitial |
boolean | If this is true, we ignore DASH interstitial events.
Defaults to false . |
- Source:
AdsStats
Type:
- {loadTimes: !Array.<number>, averageLoadTime: number, started: number, playedCompletely: number, skipped: number, errors: number}
Properties:
Name | Type | Description |
---|---|---|
loadTimes |
number | The set of amounts of time it took to get the final manifest. |
averageLoadTime |
number | The average time it took to get the final manifest. |
started |
number | The number of ads started. |
playedCompletely |
number | The number of ads played completely. |
skipped |
number | The number of ads skipped. |
errors |
number | The number of ads with errors. |
- Source:
AdvancedAbrConfiguration
Type:
- {minTotalBytes: number, minBytes: number, fastHalfLife: number, slowHalfLife: number}
Properties:
Name | Type | Description |
---|---|---|
minTotalBytes |
number | Minimum number of bytes sampled before we trust the estimate. If we have
not sampled much data, our estimate may not be accurate enough to trust.
Defaults to 128e3 . |
minBytes |
number | Minimum number of bytes, under which samples are discarded. Our models
do not include latency information, so connection startup time (time to
first byte) is considered part of the download time. Because of this, we
should ignore very small downloads which would cause our estimate to be
too low.
Defaults to 16e3 . |
fastHalfLife |
number | The quantity of prior samples (by weight) used when creating a new
estimate, in seconds. Those prior samples make up half of the
new estimate.
Defaults to 2 . |
slowHalfLife |
number | The quantity of prior samples (by weight) used when creating a new
estimate, in seconds. Those prior samples make up half of the
new estimate.
Defaults to 5 . |
- Source:
AdvancedDrmConfiguration
Type:
- {distinctiveIdentifierRequired: boolean, persistentStateRequired: boolean, videoRobustness: string, audioRobustness: string, serverCertificate: Uint8Array, serverCertificateUri: string, individualizationServer: string, sessionType: string, headers: !Object.<string, string>}
Properties:
Name | Type | Description |
---|---|---|
distinctiveIdentifierRequired |
boolean | True if the application requires the key system to support distinctive
identifiers.
Defaults to false . |
persistentStateRequired |
boolean | True if the application requires the key system to support persistent
state, e.g., for persistent license storage.
Defaults to false . |
videoRobustness |
string | A key-system-specific string that specifies a required security level for
video.
Defaults to '' , i.e., no specific robustness required. |
audioRobustness |
string | A key-system-specific string that specifies a required security level for
audio.
Defaults to '' , i.e., no specific robustness required. |
serverCertificate |
Uint8Array | An empty certificate (byteLength==0 ) will be treated as
null . A certificate will be requested from the license server if required. A key-system-specific server certificate used to encrypt license requests. Its use is optional and is meant as an optimization to avoid a round-trip to request a certificate. Defaults to null . |
serverCertificateUri |
string | If given, will make a request to the given URI to get the server
certificate. This is ignored if serverCertificate is set.
Defaults to '' . |
individualizationServer |
string | The server that handles an 'individualiation-request' . If the
server isn't given, it will default to the license server.
Defaults to '' . |
sessionType |
string | The MediaKey session type to create streaming licenses with. This doesn't
affect offline storage.
Defaults to 'temporary' . |
headers |
Object.<string, string> | The headers to use in the license request.
Defaults to {} . |
- Source:
aesKey
Type:
- {bitsKey: number, blockCipherMode: string, cryptoKey: (webCrypto.CryptoKey|undefined), fetchKey: (shaka.extern.CreateSegmentIndexFunction|undefined), iv: (!Uint8Array|undefined), firstMediaSequenceNumber: number}
Properties:
Name | Type | Description |
---|---|---|
bitsKey |
number | The number of the bit key (eg: 128, 256). |
blockCipherMode |
string | The block cipher mode of operation. Possible values: 'CTR' or 'CBC'. |
cryptoKey |
webCrypto.CryptoKey | undefined | Web crypto key object of the AES key. If unset, the "fetchKey" property should be provided. |
fetchKey |
shaka.extern.FetchCryptoKeysFunction | undefined | A function that fetches the key. Should be provided if the "cryptoKey" property is unset. Should update this object in-place, to set "cryptoKey". |
iv |
Uint8Array | undefined | The IV in the manifest, if defined. For HLS see HLS RFC 8216 Section 5.2 for handling undefined IV. |
firstMediaSequenceNumber |
number | The starting Media Sequence Number of the playlist, used when IV is undefined. |
- Source:
BufferedInfo
Type:
- {total: !Array.<shaka.extern.BufferedRange>, audio: !Array.<shaka.extern.BufferedRange>, video: !Array.<shaka.extern.BufferedRange>, text: !Array.<shaka.extern.BufferedRange>}
Properties:
Name | Type | Description |
---|---|---|
total |
Array.<shaka.extern.BufferedRange> | The combined audio/video buffered ranges, reported by
video.buffered . |
audio |
Array.<shaka.extern.BufferedRange> | The buffered ranges for audio content. |
video |
Array.<shaka.extern.BufferedRange> | The buffered ranges for video content. |
text |
Array.<shaka.extern.BufferedRange> | The buffered ranges for text content. |
- Source:
BufferedRange
Type:
- {start: number, end: number}
Properties:
Name | Type | Description |
---|---|---|
start |
number | The start time of the range, in seconds. |
end |
number | The end time of the range, in seconds. |
- Source:
CaptionDecoderPlugin
Type:
- function():!shaka.extern.ICaptionDecoder
- Source:
Chapter
Type:
- {id: string, title: string, startTime: number, endTime: number}
Properties:
Name | Type | Description |
---|---|---|
id |
string | The id of the chapter. |
title |
string | The title of the chapter. |
startTime |
number | The time that describes the beginning of the range of the chapter. |
endTime |
number | The time that describes the end of the range of chapter. |
- Source:
CmcdConfiguration
Type:
- {enabled: boolean, useHeaders: boolean, sessionId: string, contentId: string, rtpSafetyFactor: number, includeKeys: !Array.<string>}
Properties:
Name | Type | Description |
---|---|---|
enabled |
boolean | If true , enable CMCD data to be sent with media requests.
Defaults to false . |
useHeaders |
boolean | If true , send CMCD data using the header transmission mode
instead of query args.
Defaults to false . |
sessionId |
string | A GUID identifying the current playback session. A playback session
typically ties together segments belonging to a single media asset.
Maximum length is 64 characters. It is RECOMMENDED to conform to the UUID
specification.
By default the sessionId is automatically generated on each load() call. |
contentId |
string | A unique string identifying the current content. Maximum length is 64
characters. This value is consistent across multiple different sessions and
devices and is defined and updated at the discretion of the service
provider.
Defaults to 'false' . |
rtpSafetyFactor |
number | RTP safety factor.
Defaults to 5 . |
includeKeys |
Array.<string> | An array of keys to include in the CMCD data. If not provided, all keys
will be included.
Defaults to [] . |
- Source:
CmsdConfiguration
Type:
- {enabled: boolean, applyMaximumSuggestedBitrate: boolean, estimatedThroughputWeightRatio: number}
Properties:
Name | Type | Description |
---|---|---|
enabled |
boolean | If true , enables reading CMSD data in media requests.
Defaults to true . |
applyMaximumSuggestedBitrate |
boolean | If true, we must apply the maximum suggested bitrate. If false, we ignore
this.
Defaults to true . |
estimatedThroughputWeightRatio |
number | How much the estimatedThroughput of the CMSD data should be weighted
against the default estimate, between 0 and 1.
Defaults to 0.5 . |
- Source:
CreateSegmentIndexFunction
Type:
- function(): !Promise
- Source:
DashManifestConfiguration
Type:
- {clockSyncUri: string, ignoreDrmInfo: boolean, disableXlinkProcessing: boolean, xlinkFailGracefully: boolean, ignoreMinBufferTime: boolean, autoCorrectDrift: boolean, initialSegmentLimit: number, ignoreSuggestedPresentationDelay: boolean, ignoreEmptyAdaptationSet: boolean, ignoreMaxSegmentDuration: boolean, keySystemsByURI: !Object.<string, string>, manifestPreprocessor: function(!Element), manifestPreprocessorTXml: function(!shaka.extern.xml.Node), sequenceMode: boolean, multiTypeVariantsAllowed: boolean, useStreamOnceInPeriodFlattening: boolean, updatePeriod: number, enableFastSwitching: boolean}
Properties:
Name | Type | Description |
---|---|---|
clockSyncUri |
string | A default clock sync URI to be used with live streams which do not
contain any clock sync information. The Date header from this
URI will be used to determine the current time.
Defaults to '' . |
ignoreDrmInfo |
boolean | If true will cause DASH parser to ignore DRM information specified
by the manifest and treat it as if it signaled no particular key
system and contained no init data.
Defaults to false . |
disableXlinkProcessing |
boolean | If true, xlink-related processing will be disabled.
Defaults to true . |
xlinkFailGracefully |
boolean | If true, xlink-related errors will result in a fallback to the tag's
existing contents. If false, xlink-related errors will be propagated
to the application and will result in a playback failure.
Defaults to false . |
ignoreMinBufferTime |
boolean | If true will cause DASH parser to ignore minBufferTime from
manifest. It allows player config to take precedence over manifest for
rebufferingGoal .
Defaults to false . |
autoCorrectDrift |
boolean | If true , ignore the availabilityStartTime in the
manifest and instead use the segments to determine the live edge. This
allows us to play streams that have a lot of drift. If false ,
we can't play content where the manifest specifies segments in the future.
Defaults to true . |
initialSegmentLimit |
number | The maximum number of initial segments to generate for
SegmentTemplate with fixed-duration segments. This is limited
to avoid excessive memory consumption with very large
timeShiftBufferDepth values.
Defaults to 1000 . |
ignoreSuggestedPresentationDelay |
boolean | If true will cause DASH parser to ignore
suggestedPresentationDelay from manifest.
Defaults to false . |
ignoreEmptyAdaptationSet |
boolean | If true will cause DASH parser to ignore
empty AdaptationSet from manifest.
Defaults to false . |
ignoreMaxSegmentDuration |
boolean | If true will cause DASH parser to ignore
maxSegmentDuration from manifest.
Defaults to false . |
keySystemsByURI |
Object.<string, string> | A map of scheme URI to key system name. Defaults to default key systems mapping handled by Shaka. |
manifestPreprocessor |
function | DEPRECATED: Use manifestPreprocessorTXml instead. Called immediately after the DASH manifest has been parsed into an XMLDocument. Provides a way for applications to perform efficient preprocessing of the manifest. |
manifestPreprocessorTXml |
function | Called immediately after the DASH manifest has been parsed into an XMLDocument. Provides a way for applications to perform efficient preprocessing of the manifest. |
sequenceMode |
boolean | If true, the media segments are appended to the SourceBuffer in
"sequence mode" (ignoring their internal timestamps).
Defaults to false . |
multiTypeVariantsAllowed |
boolean | If true, the manifest parser will create variants that have multiple
mimeTypes or codecs for video or for audio if there is no other choice.
Meant for content where some periods are only available in one mimeType or
codec, and other periods are only available in a different mimeType or
codec. For example, a stream with baked-in ads where the audio codec does
not match the main content.
Might result in undesirable behavior if mediaSource.codecSwitchingStrategy
is not set to SMOOTH.
Defaults to true if SMOOTH codec switching is supported, RELOAD overwise. |
useStreamOnceInPeriodFlattening |
boolean | If period combiner is used, this option ensures every stream is used
only once in period flattening. It speeds up underlying algorithm
but may raise issues if manifest does not have stream consistency
between periods.
Defaults to false . |
updatePeriod |
number | Override the minimumUpdatePeriod of the manifest. The value is in seconds.
If the value is greater than the minimumUpdatePeriod, it will update the
manifest less frequently. If you update the value during for a dynamic
manifest, it will directly trigger a new download of the manifest.
Defaults to -1 . |
enableFastSwitching |
boolean | If false, disables fast switching track recognition.
Defaults to true . |
- Source:
DrmConfiguration
Type:
- {retryParameters: shaka.extern.RetryParameters, servers: !Object.<string, string>, clearKeys: !Object.<string, string>, delayLicenseRequestUntilPlayed: boolean, persistentSessionOnlinePlayback: boolean, persistentSessionsMetadata: !Array.<shaka.extern.PersistentSessionMetadata>, advanced: Object.<string, shaka.extern.AdvancedDrmConfiguration>, initDataTransform: (shaka.extern.InitDataTransform|undefined), logLicenseExchange: boolean, updateExpirationTime: number, preferredKeySystems: !Array.<string>, keySystemsMapping: !Object.<string, string>, parseInbandPsshEnabled: boolean, minHdcpVersion: string, ignoreDuplicateInitData: boolean}
Properties:
Name | Type | Description |
---|---|---|
retryParameters |
shaka.extern.RetryParameters | Retry parameters for license requests. |
servers |
Object.<string, string> | Required for all but the clear key CDM. A dictionary which maps key system IDs to their license servers. For example, {'com.widevine.alpha': 'https://example.com/drm'} .
Defaults to {} . |
clearKeys |
Object.<string, string> | Forces the use of the Clear Key CDM.
A map of key IDs (hex or base64) to keys (hex or base64).
Defaults to {} . |
delayLicenseRequestUntilPlayed |
boolean | True to configure drm to delay sending a license request until a user
actually starts playing content.
Defaults to false . |
persistentSessionOnlinePlayback |
boolean | True to configure drm to try playback with given persistent session ids
before requesting a license. Also prevents the session removal at playback
stop, as-to be able to re-use it later.
Defaults to false . |
persistentSessionsMetadata |
Array.<PersistentSessionMetadata> | Persistent sessions metadata to load before starting playback.
Defaults to [] . |
advanced |
Object.<string, shaka.extern.AdvancedDrmConfiguration> | Optional. A dictionary which maps key system IDs to advanced DRM configuration for those key systems. Defaults to [] . |
initDataTransform |
shaka.extern.InitDataTransform | undefined | Optional. If given, this function is called with the init data from the manifest/media and should return the (possibly transformed) init data to pass to the browser. |
logLicenseExchange |
boolean | Optional. If set to true , prints logs containing the license exchange.
This includes the init data, request, and response data, printed as base64
strings. Don't use in production, for debugging only; has no affect in
release builds as logging is removed.
Defaults to false . |
updateExpirationTime |
number | The frequency in seconds with which to check the expiration of a session.
Defaults to 1 . |
preferredKeySystems |
Array.<string> | Specifies the priorties of available DRM key systems.
Defaults ['com.microsoft.playready'] on Xbox One and
PlayStation 4, and [] for all other browsers. |
keySystemsMapping |
Object.<string, string> | A map of key system name to key system name.
Defaults to {} . |
parseInbandPsshEnabled |
boolean | When true parse DRM init data from pssh boxes in media and init segments
and ignore 'encrypted' events.
This is required when using in-band key rotation on Xbox One.
Defaults to true on Xbox One, and false for all
other browsers. |
minHdcpVersion |
string | Indicates the minimum version of HDCP to start the playback of encrypted
streams. May be ignored if not supported by the device.
Defaults to '' , do not check the HDCP version. |
ignoreDuplicateInitData |
boolean | When true indicate that the player doesn't ignore duplicate init data.
Note: Tizen 2015 and 2016 models will send multiple webkitneedkey events
with the same init data. If the duplicates are supressed, playback
will stall without errors.
Defaults to false on Tizen 2, and true for all
other browsers. |
- Source:
DrmInfo
Type:
- {keySystem: string, encryptionScheme: string, keySystemUris: (Set.<string>|undefined), licenseServerUri: string, distinctiveIdentifierRequired: boolean, persistentStateRequired: boolean, audioRobustness: string, videoRobustness: string, serverCertificate: Uint8Array, serverCertificateUri: string, sessionType: string, initData: Array.<!shaka.extern.InitDataOverride>, keyIds: Set.<string>}
Properties:
Name | Type | Description |
---|---|---|
keySystem |
string | Required. The key system, e.g., "com.widevine.alpha". |
encryptionScheme |
string | Required. The encryption scheme, e.g., "cenc", "cbcs", "cbcs-1-9". |
keySystemUris |
Set.<string> | undefined | Optional. The key system uri, e.g., "skd://" for fairplay. |
licenseServerUri |
string | Filled in by DRM config if missing. The license server URI. |
distinctiveIdentifierRequired |
boolean | Defaults to false. Can be filled in by advanced DRM config. True if the application requires the key system to support distinctive identifiers. |
persistentStateRequired |
boolean | Defaults to false. Can be filled in by advanced DRM config. True if the application requires the key system to support persistent state, e.g., for persistent license storage. |
sessionType |
string | Defaults to 'temporary' if Shaka wasn't initiated for storage.
Can be filled in by advanced DRM config sessionType parameter. |
audioRobustness |
string | Defaults to '', e.g., no specific robustness required. Can be filled in
by advanced DRM config. A key-system-specific string that specifies a required security level. |
videoRobustness |
string | Defaults to '', e.g., no specific robustness required. Can be filled in
by advanced DRM config. A key-system-specific string that specifies a required security level. |
serverCertificate |
Uint8Array | Defaults to null, e.g., certificate will be requested from the license
server if required. Can be filled in by advanced DRM config. A key-system-specific server certificate used to encrypt license requests. Its use is optional and is meant as an optimization to avoid a round-trip to request a certificate. |
serverCertificateUri |
string | Defaults to '', e.g., server certificate will be requested from the given URI if serverCertificate is not provided. Can be filled in by advanced DRM config. |
initData |
Array.<!shaka.extern.InitDataOverride> | Defaults to [], e.g., no override. A list of initialization data which override any initialization data found in the content. See also shaka.extern.InitDataOverride. |
keyIds |
Set.<string> | Defaults to the empty Set If not empty, contains the default key IDs for this key system, as lowercase hex strings. |
- Source:
DrmSessionMetadata
Type:
- {sessionId: string, sessionType: string, initData: ?Uint8Array, initDataType: ?string}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
sessionId |
string | Session id | |
sessionType |
string | Session type | |
initData |
Uint8Array |
<nullable> |
Initialization data in the format indicated by initDataType. |
initDataType |
string | A string to indicate what format initData is in. |
- Source:
DrmSupportType
Type:
- {persistentState: boolean, encryptionSchemes: !Array.<(string|null)>, videoRobustnessLevels: !Array.<string>, audioRobustnessLevels: !Array.<string>}
Properties:
Name | Type | Description |
---|---|---|
persistentState |
boolean | Whether this key system supports persistent state. |
encryptionSchemes |
Array.<(string|null)> | An array of encryption schemes that are reported to work, through either EME or MCap APIs. An empty array indicates that encryptionScheme queries are not supported. This should not happen if our polyfills are installed. |
videoRobustnessLevels |
Array.<string> | An array of video robustness levels that are reported to work. An empty array indicates that none were tested. Not all key systems have a list of known robustness levels built into probeSupport(). |
audioRobustnessLevels |
Array.<string> | An array of audio robustness levels that are reported to work. An empty array indicates that none were tested. Not all key systems have a list of known robustness levels built into probeSupport(). |
- Source:
DynamicTargetLatencyConfiguration
Type:
- {enabled: boolean, stabilityThreshold: number, rebufferIncrement: number, maxAttempts: number, maxLatency: number, minLatency: number}
Properties:
Name | Type | Description |
---|---|---|
enabled |
boolean | If true , dynamic latency for live sync is enabled. When
enabled, the target latency will be adjusted closer to the min latency
when playback is stable (see stabilityThreshold ). If
there are rebuffering events, then the target latency will move towards
the max latency value in increments of rebufferIncrement .
Defaults to false |
rebufferIncrement |
number | The value, in seconds, to increment the target latency towards
maxLatency after a rebuffering event.
Defaults to 0.5 |
stabilityThreshold |
number | Number of seconds after a rebuffering before we are considered stable and
will move the target latency towards minLatency
value.
Defaults to 60 . |
maxAttempts |
number | Number of times that dynamic target latency will back off to
maxLatency and attempt to adjust it closer to
minLatency .
Defaults to 10 . |
maxLatency |
number | The latency to use when a rebuffering event causes us to back off from
the live edge.
Defaults to 4 . |
minLatency |
number | The latency to work towards when the network is stable and we want to get
closer to the live edge.
Defaults to 1 . |
- Source:
EmeSessionDB
Type:
- {sessionId: string, keySystem: string, licenseUri: string, serverCertificate: Uint8Array, audioCapabilities: !Array.<MediaKeySystemMediaCapability>, videoCapabilities: !Array.<MediaKeySystemMediaCapability>}
Properties:
Name | Type | Description |
---|---|---|
sessionId |
string | The EME session ID. |
keySystem |
string | The EME key system string the session belongs to. |
licenseUri |
string | The URI for the license server. |
serverCertificate |
Uint8Array | A key-system-specific server certificate used to encrypt license requests. Its use is optional and is meant as an optimization to avoid a round-trip to request a certificate. |
audioCapabilities |
Array.<MediaKeySystemMediacapability> | The EME audio capabilities used to create the session. |
videoCapabilities |
Array.<MediaKeySystemMediacapability> | The EME video capabilities used to create the session. |
- Source:
EmsgInfo
Type:
- {schemeIdUri: string, value: string, startTime: number, endTime: number, timescale: number, presentationTimeDelta: number, eventDuration: number, id: number, messageData: Uint8Array}
Properties:
Name | Type | Description |
---|---|---|
schemeIdUri |
string | Identifies the message scheme. |
value |
string | Specifies the value for the event. |
startTime |
number | The time that the event starts (in presentation time). |
endTime |
number | The time that the event ends (in presentation time). |
timescale |
number | Provides the timescale, in ticks per second. |
presentationTimeDelta |
number | The offset that the event starts, relative to the start of the segment this is contained in (in units of timescale). |
eventDuration |
number | The duration of the event (in units of timescale). |
id |
number | A field identifying this instance of the message. |
messageData |
Uint8Array | Body of the message. |
- Source:
ExtraText
Type:
- {uri: string, language: string, kind: string, mime: string, codecs: (string|undefined)}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
uri |
string | The URI of the text. | |
language |
string | The language of the text (e.g. 'en'). | |
kind |
string | The kind of text (e.g. 'subtitles'). | |
mime |
string |
<nullable> |
The MIME type of the text (e.g. 'text/vtt') |
codecs |
string |
<nullable> |
The codecs string, if needed to refine the MIME type. |
- Source:
FetchCryptoKeysFunction
Type:
- function(): !Promise
- Source:
HeadersReceived
Type:
- function(!Object.<string, string>)
- Source:
HLSInterstitial
Type:
- {startTime: number, endTime: ?number, values: !Array.<shaka.extern.MetadataFrame>}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
startTime |
number | ||
endTime |
number |
<nullable> |
|
values |
Array.<shaka.extern.MetadataFrame> |
- Source:
HlsManifestConfiguration
Type:
- {ignoreTextStreamFailures: boolean, ignoreImageStreamFailures: boolean, defaultAudioCodec: string, defaultVideoCodec: string, ignoreManifestProgramDateTime: boolean, ignoreManifestProgramDateTimeForTypes: !Array.<string>, mediaPlaylistFullMimeType: string, liveSegmentsDelay: number, sequenceMode: boolean, ignoreManifestTimestampsInSegmentsMode: boolean, disableCodecGuessing: boolean, disableClosedCaptionsDetection: boolean, allowLowLatencyByteRangeOptimization: boolean, updatePeriod: number}
Properties:
Name | Type | Description |
---|---|---|
ignoreTextStreamFailures |
boolean | If true , ignore any errors in a text stream and filter out
those streams.
Defaults to false . |
ignoreImageStreamFailures |
boolean | If true , ignore any errors in a image stream and filter out
those streams.
Defaults to false . |
defaultAudioCodec |
string | The default audio codec if it is not specified in the HLS playlist.
Defaults to 'mp4a.40.2' . |
defaultVideoCodec |
string | The default video codec if it is not specified in the HLS playlist.
Defaults to 'avc1.42E01E' . |
ignoreManifestProgramDateTime |
boolean | If true , the HLS parser will ignore the
EXT-X-PROGRAM-DATE-TIME tags in the manifest and use media
sequence numbers instead. It also causes EXT-X-DATERANGE tags to be
ignored. Meant for streams where EXT-X-PROGRAM-DATE-TIME is
incorrect or malformed.
Defaults to false . |
ignoreManifestProgramDateTimeForTypes |
Array.<string> | An array of strings representing types for which
EXT-X-PROGRAM-DATE-TIME should be ignored. Only used if the
the main ignoreManifestProgramDateTime is set to false.
For example, setting this to ['text', 'video'] will cause the PDT values
text and video streams to be ignored, while still using the PDT values for
audio.
Defaults to [] . |
mediaPlaylistFullMimeType |
string | A string containing a full mime type, including both the basic mime type
and also the codecs. Used when the HLS parser parses a media playlist
directly, required since all of the mime type and codecs information is
contained within the master playlist.
You can use the shaka.util.MimeUtils.getFullType() utility to
format this value.
Defaults to 'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"' . |
liveSegmentsDelay |
number | The default presentation delay will be calculated as a number of segments.
This is the number of segments for this calculation.
Defaults to 3 . |
sequenceMode |
boolean | If true, the media segments are appended to the SourceBuffer in
"sequence mode" (ignoring their internal timestamps).
Defaults to true except on WebOS 3, Tizen 2,
Tizen 3 and PlayStation 4 whose default value is false . |
ignoreManifestTimestampsInSegmentsMode |
boolean | If true, don't adjust the timestamp offset to account for manifest
segment durations being out of sync with segment durations. In other
words, assume that there are no gaps in the segments when appending
to the SourceBuffer, even if the manifest and segment times disagree.
Only applies when sequenceMode is false .
Defaults to false . |
disableCodecGuessing |
boolean | If set to true, the HLS parser won't automatically guess or assume default
codec for playlists with no "CODECS" attribute. Instead, it will attempt to
extract the missing information from the media segment.
As a consequence, lazy-loading media playlists won't be possible for this
use case, which may result in longer video startup times.
Defaults to false . |
disableClosedCaptionsDetection |
boolean | If true, disables the automatic detection of closed captions.
Otherwise, in the absence of a EXT-X-MEDIA tag with TYPE="CLOSED-CAPTIONS",
Shaka Player will attempt to detect captions based on the media data.
Defaults to false . |
allowLowLatencyByteRangeOptimization |
boolean | If set to true, the HLS parser will optimize operation with LL and partial
byte range segments. More info in
https://www.akamai.com/blog/performance/-using-ll-hls-with-byte-range-addressing-to-achieve-interoperabi
Defaults to true . |
updatePeriod |
number | Override the update period of the playlist. The value is in seconds.
If the value is less than 0, the period will be determined based on the
segment length. If the value is greater than 0, it will update the target
duration. If you update the value during the live, it will directly
trigger a new download of the manifest.
Defaults to -1 . |
- Source:
ID3Metadata
Type:
- {cueTime: ?number, data: !Uint8Array, frames: !Array.<shaka.extern.MetadataFrame>, dts: ?number, pts: ?number}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
cueTime |
number |
<nullable> |
|
data |
Uint8Array | ||
frames |
Array.<shaka.extern.MetadataFrame> | ||
dts |
number |
<nullable> |
|
pts |
number |
<nullable> |
- Source:
InitDataOverride
Type:
- {initData: !Uint8Array, initDataType: string, keyId: ?string}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
initData |
Uint8Array | Initialization data in the format indicated by initDataType. | |
initDataType |
string | A string to indicate what format initData is in. | |
keyId |
string |
<nullable> |
The key Id that corresponds to this initData. |
- Source:
InitDataTransform
Type:
- function(!Uint8Array, string, ?shaka.extern.DrmInfo):!Uint8Array
- Source:
LanguageRole
Type:
- {language: string, role: string, label: ?string}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
language |
string | The language code for the stream. | |
role |
string | The role name for the stream. If the stream has no role, role
will be '' . |
|
label |
string |
<nullable> |
The label of the audio stream, if it has one. |
- Source:
LcevcConfiguration
Type:
- {enabled: boolean, dynamicPerformanceScaling: boolean, logLevel: number, drawLogo: boolean}
Properties:
Name | Type | Description |
---|---|---|
enabled |
boolean | If true , enable LCEVC.
Defaults to false . |
dynamicPerformanceScaling |
boolean | If true , LCEVC Dynamic Performance Scaling or dps is enabled
to be triggered, when the system is not able to decode frames within a
specific tolerance of the fps of the video and disables LCEVC decoding
for some time. The base video will be shown upscaled to target resolution.
If it is triggered again within a short period of time, the disabled
time will be higher and if it is triggered three times in a row the LCEVC
decoding will be disabled for that playback session.
If dynamicPerformanceScaling is false, LCEVC decode will be forced
and will drop frames appropriately if performance is sub optimal.
Defaults to true . |
logLevel |
number | Loglevel 0-5 for logging.
NONE = 0
ERROR = 1
WARNING = 2
INFO = 3
DEBUG = 4
VERBOSE = 5
Defaults to 0 . |
drawLogo |
boolean | If true , LCEVC Logo is placed on the top left hand corner
which only appears when the LCEVC enhanced frames are being rendered.
Defaults to true for the lib but is forced to false in this integration
unless explicitly set to true through config.
Defaults to false . |
- Source:
LiveSyncConfiguration
Type:
- {enabled: boolean, targetLatency: number, targetLatencyTolerance: number, maxPlaybackRate: number, minPlaybackRate: number, panicMode: boolean, panicThreshold: number, dynamicTargetLatency: shaka.extern.DynamicTargetLatencyConfiguration}
Properties:
Name | Type | Description |
---|---|---|
enabled |
boolean | Enable the live stream sync against the live edge by changing the playback
rate.
Note: on some SmartTVs, if this is activated, it may not work or the sound
may be lost when activated.
Defaults to false . |
targetLatency |
number | Preferred latency, in seconds. Effective only if liveSync is true.
Defaults to 0.5 . |
targetLatencyTolerance |
number | Latency tolerance for target latency, in seconds. Effective only if
liveSync is enabled.
Defaults to 0.5 . |
maxPlaybackRate |
number | Max playback rate used for latency chasing. It is recommended to use a
value between 1 and 2. Effective only if liveSync is enabled.
Defaults to 1.1 . |
minPlaybackRate |
number | Minimum playback rate used for latency chasing. It is recommended to use a
value between 0 and 1. Effective only if liveSync is enabled.
Defaults to 0.95 . |
panicMode |
boolean | If true , panic mode for live sync is enabled. When enabled,
will set the playback rate to the minPlaybackRate
until playback has continued past a rebuffering for longer than the
panicThreshold .
Defaults to false . |
panicThreshold |
number | Number of seconds that playback stays in panic mode after a rebuffering.
Defaults to 60 . |
dynamicTargetLatency |
shaka.extern.DynamicTargetLatencyConfiguration | The dynamic target latency config for dynamically adjusting the target latency to be closer to edge when network conditions are good and to back off when network conditions are bad. |
- Source:
Manifest
A Manifest object describes a collection of streams (segmented audio, video, or text data) that share a common timeline. We call the collection of streams "the presentation" and their timeline "the presentation timeline". A Manifest describes one of two types of presentations: live and video-on-demand.
A live presentation begins at some point in time and either continues indefinitely or ends when the presentation stops broadcasting. For a live presentation, wall-clock time maps onto the presentation timeline, and the current wall-clock time maps to the live-edge (AKA "the current presentation time"). In contrast, a video-on-demand presentation exists entirely independent of wall-clock time.
A variant is a combination of an audio and a video streams that can be played together.
A stream has the same logical content as another stream if the only difference between the two is their quality. For example, an SD video stream and an HD video stream that depict the same scene have the same logical content; whereas an English audio stream and a French audio stream have different logical contents. The player can automatically switch between streams which have the same logical content to adapt to network conditions.
Type:
- {presentationTimeline: !shaka.media.PresentationTimeline, variants: !Array.<shaka.extern.Variant>, textStreams: !Array.<shaka.extern.Stream>, imageStreams: !Array.<shaka.extern.Stream>, offlineSessionIds: !Array.<string>, minBufferTime: number, sequenceMode: boolean, ignoreManifestTimestampsInSegmentsMode: boolean, type: string, serviceDescription: ?shaka.extern.ServiceDescription, nextUrl: ?string, periodCount: number, gapCount: number, isLowLatency: boolean, startTime: ?number}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
presentationTimeline |
shaka.media.PresentationTimeline | Required. The presentation timeline. |
|
variants |
Array.<shaka.extern.Variant> | Required. The presentation's Variants. There must be at least one Variant. |
|
textStreams |
Array.<shaka.extern.Stream> | Required. The presentation's text streams. |
|
imageStreams |
Array.<shaka.extern.Stream> | Required. The presentation's image streams |
|
offlineSessionIds |
Array.<string> | Defaults to []. An array of EME sessions to load for offline playback. |
|
minBufferTime |
number | Defaults to 0. The minimum number of seconds of content that must be buffered before playback can begin. Can be overridden by a higher value from the Player configuration. |
|
sequenceMode |
boolean | If true, we will append the media segments using sequence mode; that is to say, ignoring any timestamps inside the media files. | |
ignoreManifestTimestampsInSegmentsMode |
boolean | If true, don't adjust the timestamp offset to account for manifest
segment durations being out of sync with segment durations. In other
words, assume that there are no gaps in the segments when appending
to the SourceBuffer, even if the manifest and segment times disagree.
Only applies when sequenceMode is false , and only for HLS
streams.
Defaults to false . |
|
type |
string | Indicates the type of the manifest. It can be 'HLS' or
'DASH' . |
|
serviceDescription |
shaka.extern.ServiceDescription |
<nullable> |
The service description for the manifest. Used to adapt playbackRate to decrease latency. |
nextUrl |
string |
<nullable> |
The next url to play. |
periodCount |
number | Number of periods found in a manifest. For DASH, it represents number of
Period elements in a manifest. If streaming protocol does not implement
period-like structure, it should be set to 1.
Defaults to 1 . |
|
gapCount |
number | The amount of gaps found in a manifest. For DASH, it represents number of discontinuities found between periods. For HLS, it is a number of EXT-X-GAP and GAP=YES occurrences. For MSS, it is always set to 0. If in src= mode or nothing is loaded, NaN. | |
isLowLatency |
bolean | If true, the manifest is Low Latency. | |
startTime |
number |
<nullable> |
Indicate the startTime of the playback, when startTime is
null , playback will start at the default start time.
Note: It only overrides the load startTime when it is not defined. |
- Source:
ManifestConfiguration
Type:
- {retryParameters: shaka.extern.RetryParameters, availabilityWindowOverride: number, disableAudio: boolean, disableVideo: boolean, disableText: boolean, disableThumbnails: boolean, disableIFrames: boolean, defaultPresentationDelay: number, segmentRelativeVttTiming: boolean, dash: shaka.extern.DashManifestConfiguration, hls: shaka.extern.HlsManifestConfiguration, mss: shaka.extern.MssManifestConfiguration, raiseFatalErrorOnManifestUpdateRequestFailure: boolean, continueLoadingWhenPaused: boolean}
Properties:
Name | Type | Description |
---|---|---|
retryParameters |
shaka.extern.RetryParameters | Retry parameters for manifest requests. |
availabilityWindowOverride |
number | A number, in seconds, that overrides the availability window in the
manifest, or NaN if the default value should be used. This is
enforced by the manifest parser, so custom manifest parsers should take
care to honor this parameter.
Defaults to NaN . |
disableAudio |
boolean | If true , the audio tracks are ignored.
Defaults to false . |
disableVideo |
boolean | If true , the video tracks are ignored.
Defaults to false . |
disableText |
boolean | If true , the text tracks are ignored.
Defaults to false . |
disableThumbnails |
boolean | If true , the image tracks are ignored.
Defaults to false . |
disableIFrames |
boolean | If true , the I-Frames tracks are ignored.
Defaults to false . |
defaultPresentationDelay |
number | For DASH, it's a default presentationDelay value if
suggestedPresentationDelay is missing in the MPEG DASH
manifest. The default value is 1.5 * minBufferTime if not
configured or set as 0.
For HLS, the default value is 3 segments duration if not configured or
set as 0.
Defaults to 0 . |
segmentRelativeVttTiming |
boolean | Option to calculate VTT text timings relative to the segment start
instead of relative to the period start (which is the default).
Defaults to false . |
dash |
shaka.extern.DashManifestConfiguration | Advanced parameters used by the DASH manifest parser. |
hls |
shaka.extern.HlsManifestConfiguration | Advanced parameters used by the HLS manifest parser. |
mss |
shaka.extern.MssManifestConfiguration | Advanced parameters used by the MSS manifest parser. |
raiseFatalErrorOnManifestUpdateRequestFailure |
boolean | If true, manifest update request failures will cause a fatal error.
Defaults to false . |
continueLoadingWhenPaused |
boolean | If true, live manifest will be updated with the regular intervals even if
the video is paused.
Defaults to true . |
- Source:
ManifestDB
Type:
- {creationTime: number, originalManifestUri: string, duration: number, size: number, expiration: number, streams: !Array.<shaka.extern.StreamDB>, sessionIds: !Array.<string>, drmInfo: ?shaka.extern.DrmInfo, appMetadata: Object, isIncomplete: (boolean|undefined), sequenceMode: (boolean|undefined), type: (string|undefined)}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
creationTime |
number | The date time when the asset was created. | |
originalManifestUri |
string | The URI that the manifest was originally loaded from. | |
duration |
number | The total duration of the media, in seconds. | |
size |
number | The total size of all stored segments, in bytes. | |
expiration |
number | The license expiration, in milliseconds; or Infinity if not applicable. Note that upon JSON serialization, Infinity becomes null, and must be converted back upon loading from storage. | |
streams |
Array.<shaka.extern.StreamDB> | The Streams that are stored. | |
sessionIds |
Array.<string> | The DRM offline session IDs for the media. | |
drmInfo |
shaka.extern.DrmInfo |
<nullable> |
The DRM info used to initialize EME. |
appMetadata |
Object | A metadata object passed from the application. | |
isIncomplete |
boolean | undefined | If true, the content is still downloading. | |
sequenceMode |
boolean | undefined | If true, we will append the media segments using sequence mode; that is to say, ignoring any timestamps inside the media files. | |
type |
string | undefined | Indicates the type of the manifest. It can be 'HLS' or
'DASH' . |
- Source:
ManifestDBV1
Type:
- {key: number, originalManifestUri: string, duration: number, size: number, expiration: number, periods: !Array.<shaka.extern.PeriodDBV1>, sessionIds: !Array.<string>, drmInfo: ?shaka.extern.DrmInfo, appMetadata: Object}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
key |
number | A unique key to identify this item. | |
originalManifestUri |
string | The URI that the manifest was originally loaded from. | |
duration |
number | The total duration of the media, in seconds. | |
size |
number | The total size of all stored segments, in bytes. | |
expiration |
number | The license expiration, in milliseconds; or Infinity if not applicable. Note that upon JSON serialization, Infinity becomes null, and must be converted back upon loading from storage. | |
periods |
Array.<shaka.extern.PeriodDBV1> | The Periods that are stored. | |
sessionIds |
Array.<string> | The DRM offline session IDs for the media. | |
drmInfo |
shaka.extern.DrmInfo |
<nullable> |
The DRM info used to initialize EME. |
appMetadata |
Object | A metadata object passed from the application. |
ManifestDBV2
Type:
- {originalManifestUri: string, duration: number, size: number, expiration: number, periods: !Array.<shaka.extern.PeriodDBV2>, sessionIds: !Array.<string>, drmInfo: ?shaka.extern.DrmInfo, appMetadata: Object}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
originalManifestUri |
string | The URI that the manifest was originally loaded from. | |
duration |
number | The total duration of the media, in seconds. | |
size |
number | The total size of all stored segments, in bytes. | |
expiration |
number | The license expiration, in milliseconds; or Infinity if not applicable. Note that upon JSON serialization, Infinity becomes null, and must be converted back upon loading from storage. | |
periods |
Array.<shaka.extern.PeriodDBV2> | The Periods that are stored. | |
sessionIds |
Array.<string> | The DRM offline session IDs for the media. | |
drmInfo |
shaka.extern.DrmInfo |
<nullable> |
The DRM info used to initialize EME. |
appMetadata |
Object | A metadata object passed from the application. |
MediaQualityInfo
Type:
- {audioSamplingRate: ?number, bandwidth: number, codecs: string, contentType: string, frameRate: ?number, height: ?number, mimeType: ?string, label: ?string, roles: ?Array.<string>, language: ?string, channelsCount: ?number, pixelAspectRatio: ?string, width: ?number}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
audioSamplingRate |
number |
<nullable> |
Specifies the maximum sampling rate of the content. |
bandwidth |
number | The bandwidth in bits per second. | |
codecs |
string | The Stream's codecs, e.g., 'avc1.4d4015' or 'vp9', which must be compatible with the Stream's MIME type. | |
contentType |
string | The type of content, which may be "video" or "audio". | |
frameRate |
number |
<nullable> |
The video frame rate. |
height |
number |
<nullable> |
The video height in pixels. |
mimeType |
string | The MIME type. | |
label |
string |
<nullable> |
The stream's label, when available. |
roles |
Array.<string> |
<nullable> |
The stream's role, when available. |
language |
string |
<nullable> |
The stream's language, when available. |
channelsCount |
number |
<nullable> |
The number of audio channels, or null if unknown. |
pixelAspectRatio |
string |
<nullable> |
The pixel aspect ratio value; e.g. "1:1". |
width |
number |
<nullable> |
The video width in pixels. |
- Source:
MediaSourceConfiguration
Type:
- {codecSwitchingStrategy: shaka.config.CodecSwitchingStrategy, addExtraFeaturesToSourceBuffer: function(string): string, forceTransmux: boolean, insertFakeEncryptionInInit: boolean, modifyCueCallback: shaka.extern.TextParser.ModifyCueCallback, dispatchAllEmsgBoxes: boolean}
Properties:
Name | Type | Description |
---|---|---|
codecSwitchingStrategy |
shaka.config.CodecSwitchingStrategy | Allow codec switching strategy. SMOOTH loading uses
SourceBuffer.changeType. RELOAD uses cycling of MediaSource.
Defaults to SMOOTH if SMOOTH codec switching is supported, RELOAD overwise. |
addExtraFeaturesToSourceBuffer |
function | Callback to generate extra features string based on used MIME type. Some platforms may need to pass features when initializing the sourceBuffer. This string is ultimately appended to a MIME type in addSourceBuffer() & changeType(). |
forceTransmux |
boolean | If this is true , we will transmux AAC and TS content even if
not strictly necessary for the assets to be played.
Defaults to false . |
insertFakeEncryptionInInit |
boolean | If true, will apply a work-around for non-encrypted init segments on
encrypted content for some platforms.
See https://github.com/shaka-project/shaka-player/issues/2759. If you know you don't need this, you canset this value to false to gain a few milliseconds on loading time and seek
time.
Defaults to true . |
modifyCueCallback |
shaka.extern.TextParser.ModifyCueCallback | A callback called for each cue after it is parsed, but right before it is appended to the presentation. Gives a chance for client-side editing of cue text, cue timing, etc. |
dispatchAllEmsgBoxes |
boolean | If true, all emsg boxes are parsed and dispatched.
Defaults to false . |
- Source:
MetadataFrame
Type:
- {key: string, data: (ArrayBuffer|string|number), description: string, mimeType: ?string, pictureType: ?number}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
key |
string | ||
data |
ArrayBuffer | string | number | ||
description |
string | ||
mimeType |
string |
<nullable> |
|
pictureType |
number |
<nullable> |
- Source:
MetadataRawFrame
Type:
- {type: string, size: number, data: Uint8Array}
Properties:
Name | Type | Description |
---|---|---|
type |
string | |
size |
number | |
data |
Uint8Array |
- Source:
MPEG_PES
MPEG_PES.
Type:
- {data: !Uint8Array, packetLength: number, pts: ?number, dts: ?number, nalus: !Array.<!shaka.extern.VideoNalu>}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Uint8Array | ||
packetLength |
number | ||
pts |
number |
<nullable> |
|
dts |
number |
<nullable> |
|
nalus |
Array.<!shaka.extern.VideoNalu> |
- Source:
MssManifestConfiguration
Type:
- {manifestPreprocessor: function(!Element), manifestPreprocessorTXml: function(!shaka.extern.xml.Node), sequenceMode: boolean, keySystemsBySystemId: !Object.<string, string>}
Properties:
Name | Type | Description |
---|---|---|
manifestPreprocessor |
function | DEPRECATED: Use manifestPreprocessorTXml instead. Called immediately after the MSS manifest has been parsed into an XMLDocument. Provides a way for applications to perform efficient preprocessing of the manifest. |
manifestPreprocessorTXml |
function | Called immediately after the MSS manifest has been parsed into an XMLDocument. Provides a way for applications to perform efficient preprocessing of the manifest. |
sequenceMode |
boolean | If true, the media segments are appended to the SourceBuffer in
"sequence mode" (ignoring their internal timestamps).
Defaults to false . |
keySystemsBySystemId |
Object.<string, string> | A map of system id to key system name. Defaults to default key systems mapping handled by Shaka. |
- Source:
MssPrivateData
Type:
- {duration: number, timescale: number, codecPrivateData: ?string}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
duration |
number | Required. MSS Stream duration. |
|
timescale |
number | Required. MSS timescale. |
|
codecPrivateData |
string |
<nullable> |
MSS codecPrivateData. |
- Source:
OfflineConfiguration
Type:
- {trackSelectionCallback: function(shaka.extern.TrackList): !Promise.<shaka.extern.TrackList>, downloadSizeCallback: function(number): !Promise.<boolean>, progressCallback: function(shaka.extern.StoredContent, number), usePersistentLicense: boolean, numberOfParallelDownloads: number}
Properties:
Name | Type | Description |
---|---|---|
trackSelectionCallback |
function | Called inside store() to determine which tracks to save from a
manifest. It is passed an array of Tracks from the manifest and it should
return an array of the tracks to store. |
downloadSizeCallback |
function | Called inside store() to determine if the content can be
downloaded due to its estimated size. The estimated size of the download is
passed and it must return if the download is allowed or not. |
progressCallback |
function | Called inside store() to give progress info back to the app.
It is given the current manifest being stored and the progress of it being
stored. |
usePersistentLicense |
boolean | If true , store protected content with a persistent license so
that no network is required to view.
If false , store protected content without a persistent
license. A network will be required to retrieve a temporary license to
view.
Defaults to true . |
numberOfParallelDownloads |
number | Number of parallel downloads. If the value is 0, downloads will be
sequential for each stream.
Note: normally browsers limit to 5 request in parallel, so putting a
number higher than this will not help it download faster.
Defaults to 5 . |
- Source:
OfflineSupport
Type:
- {basic: boolean, encrypted: !Object.<string, boolean>}
Properties:
Name | Type | Description |
---|---|---|
basic |
boolean | True if offline is usable at all. |
encrypted |
Object.<string, boolean> | A map of key system name to whether it supports offline playback. |
- Source:
ParsedBox
Type:
- {name: string, parser: !shaka.util.Mp4Parser, partialOkay: boolean, start: number, size: number, version: ?number, flags: ?number, reader: !shaka.util.DataViewReader, has64BitSize: boolean}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | The box name, a 4-character string (fourcc). | |
parser |
shaka.util.Mp4Parser | The parser that parsed this box. The parser can be used to parse child boxes where the configuration of the current parser is needed to parsed other boxes. | |
partialOkay |
boolean | If true, allows 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. This property allows the partialOkay flag from parse() to be propagated through methods like children(). | |
start |
number | The start of this box (before the header) in the original buffer. This start position is the absolute position. | |
size |
number | The size of this box (including the header). | |
version |
number |
<nullable> |
The version for a full box, null for basic boxes. |
flags |
number |
<nullable> |
The flags for a full box, null for basic boxes. |
reader |
shaka.util.DataViewReader | The reader for this box is only for this box. Reading or not reading to the end will have no affect on the parser reading other sibling boxes. | |
has64BitSize |
boolean | If true, the box header had a 64-bit size field. This affects the offsets of other fields. |
- Source:
Period
Type:
- {id: string, audioStreams: !Array.<shaka.extern.Stream>, videoStreams: !Array.<shaka.extern.Stream>, textStreams: !Array.<shaka.extern.Stream>, imageStreams: !Array.<shaka.extern.Stream>}
Properties:
Name | Type | Description |
---|---|---|
id |
string | The Period ID. |
audioStreams |
Array.<shaka.extern.Stream> | The audio streams from one Period. |
videoStreams |
Array.<shaka.extern.Stream> | The video streams from one Period. |
textStreams |
Array.<shaka.extern.Stream> | The text streams from one Period. |
imageStreams |
Array.<shaka.extern.Stream> | The image streams from one Period. |
- Source:
PeriodDBV1
Type:
- {startTime: number, streams: !Array.<shaka.extern.StreamDBV1>}
Properties:
Name | Type | Description |
---|---|---|
startTime |
number | The start time of the period, in seconds. |
streams |
Array.<shaka.extern.StreamDBV1> | The streams that define the Period. |
PeriodDBV2
Type:
- {startTime: number, streams: !Array.<shaka.extern.StreamDBV2>}
Properties:
Name | Type | Description |
---|---|---|
startTime |
number | The start time of the period, in seconds. |
streams |
Array.<shaka.extern.StreamDBV2> | The streams that define the Period. |
PersistentSessionMetadata
Type:
- {sessionId: string, initData: ?Uint8Array, initDataType: ?string}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
sessionId |
string | Session id | |
initData |
Uint8Array |
<nullable> |
Initialization data in the format indicated by initDataType. |
initDataType |
string |
<nullable> |
A string to indicate what format initData is in. |
- Source:
PlaybackInfo
Type:
- {video: ?shaka.extern.PlaybackStreamInfo, audio: ?shaka.extern.PlaybackStreamInfo, text: ?shaka.extern.PlaybackStreamInfo}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
video |
shaka.extern.PlaybackStreamInfo |
<nullable> |
|
audio |
shaka.extern.PlaybackStreamInfo |
<nullable> |
|
text |
shaka.extern.PlaybackStreamInfo |
<nullable> |
- Source:
PlaybackStreamInfo
Type:
- {codecs: string, mimeType: string, bandwidth: number, width: ?number, height: ?number}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
codecs |
string | ||
mimeType |
string | ||
bandwidth |
number | ||
width |
number |
<nullable> |
|
height |
number |
<nullable> |
- Source:
PlayerConfiguration
Type:
- {ads: shaka.extern.AdsConfiguration, autoShowText: shaka.config.AutoShowText, drm: shaka.extern.DrmConfiguration, manifest: shaka.extern.ManifestConfiguration, streaming: shaka.extern.StreamingConfiguration, mediaSource: shaka.extern.MediaSourceConfiguration, abrFactory: shaka.extern.AbrManager.Factory, abr: shaka.extern.AbrConfiguration, cmcd: shaka.extern.CmcdConfiguration, cmsd: shaka.extern.CmsdConfiguration, lcevc: shaka.extern.LcevcConfiguration, offline: shaka.extern.OfflineConfiguration, ignoreHardwareResolution: boolean, preferredAudioLanguage: string, preferredAudioLabel: string, preferredTextLanguage: string, preferredVariantRole: string, preferredTextRole: string, preferredVideoCodecs: !Array.<string>, preferredAudioCodecs: !Array.<string>, preferredTextFormats: !Array.<string>, preferredAudioChannelCount: number, preferredVideoHdrLevel: string, preferredVideoLayout: string, preferredVideoLabel: string, preferredDecodingAttributes: !Array.<string>, preferForcedSubs: boolean, preferSpatialAudio: boolean, restrictions: shaka.extern.Restrictions, playRangeStart: number, playRangeEnd: number, textDisplayer: shaka.extern.TextDisplayerConfiguration, textDisplayFactory: shaka.extern.TextDisplayer.Factory}
Properties:
Name | Type | Description |
---|---|---|
ads |
shaka.extern.AdsConfiguration | Ads configuration and settings. |
autoShowText |
shaka.config.AutoShowText | Controls behavior of auto-showing text tracks on load().
Defaults to shaka.config.AutoShowText#IF_SUBTITLES_MAY_BE_NEEDED. |
drm |
shaka.extern.DrmConfiguration | DRM configuration and settings. |
manifest |
shaka.extern.ManifestConfiguration | Manifest configuration and settings. |
streaming |
shaka.extern.StreamingConfiguration | Streaming configuration and settings. |
mediaSource |
shaka.extern.MediaSourceConfiguration | Media source configuration and settings. |
abrFactory |
shaka.extern.AbrManager.Factory | A factory to construct an abr manager. |
abr |
shaka.extern.AbrConfiguration | ABR configuration and settings. |
cmcd |
shaka.extern.CmcdConfiguration | CMCD configuration and settings. (Common Media Client Data) |
cmsd |
shaka.extern.CmsdConfiguration | CMSD configuration and settings. (Common Media Server Data) |
lcevc |
shaka.extern.LcevcConfiguration | MPEG-5 LCEVC configuration and settings. (Low Complexity Enhancement Video Codec) |
offline |
shaka.extern.OfflineConfiguration | Offline configuration and settings. |
ignoreHardwareResolution |
boolean | Do not detect the hardware resolution. For some niche cases where content is only available at resolutions beyond the device's native resolution, and you are confident it can be decoded and downscaled, this flag can allow playback when it would otherwise fail. |
preferredAudioLanguage |
string | The preferred language to use for audio tracks. If not given it will use
the 'main' track.
Changing this during playback will not affect the current playback.
Defaults to '' . |
preferredAudioLabel |
string | The preferred label to use for audio tracks.
Defaults to '' . |
preferredVideoLabel |
string | The preferred label to use for video tracks.
Defaults to '' . |
preferredTextLanguage |
string | The preferred language to use for text tracks. If a matching text track
is found, and the selected audio and text tracks have different languages,
the text track will be shown.
Changing this during playback will not affect the current playback.
Defaults to '' . |
preferredVariantRole |
string | The preferred role to use for variants.
Defaults to '' . |
preferredTextRole |
string | The preferred role to use for text tracks.
Defaults to '' . |
preferredVideoCodecs |
Array.<string> | The list of preferred video codecs, in order of highest to lowest priority.
Defaults to [] . |
preferredAudioCodecs |
Array.<string> | The list of preferred audio codecs, in order of highest to lowest priority.
Defaults to [] . |
preferredTextFormats |
Array.<string> | The list of preferred text formats, in order of highest to lowest priority.
Defaults to [] . |
preferredAudioChannelCount |
number | The preferred number of audio channels.
Defaults to 2 . |
preferredVideoHdrLevel |
string | The preferred HDR level of the video. If possible, this will cause the
player to filter to assets that either have that HDR level, or no HDR level
at all.
Can be 'SDR', 'PQ', 'HLG', 'AUTO' for auto-detect, or '' for no preference.
Note that one some platforms, such as Chrome, attempting to play PQ content
may cause problems.
Defaults to 'AUTO' . |
preferredVideoLayout |
string | The preferred video layout of the video.
Can be 'CH-STEREO', 'CH-MONO', or '' for no preference.
If the content is predominantly stereoscopic you should use 'CH-STEREO'.
If the content is predominantly monoscopic you should use 'CH-MONO'.
Defaults to '' . |
preferredDecodingAttributes |
Array.<string> | The list of preferred attributes of decodingInfo, in the order of their
priorities.
Defaults to [] . |
preferForcedSubs |
boolean | If true, a forced text track is preferred.
If the content has no forced captions and the value is true,
no text track is chosen.
Changing this during playback will not affect the current playback.
Defaults to false . |
preferSpatialAudio |
boolean | If true, a spatial audio track is preferred.
Defaults to false . |
restrictions |
shaka.extern.Restrictions | The application restrictions to apply to the tracks. These are "hard" restrictions. Any track that fails to meet these restrictions will not appear in the track list. If no tracks meet these restrictions, playback will fail. |
playRangeStart |
number | Optional playback and seek start time in seconds. Defaults to 0 if
not provided.
Defaults to 0 . |
playRangeEnd |
number | Optional playback and seek end time in seconds. Defaults to the end of
the presentation if not provided.
Defaults to Infinity . |
textDisplayer |
shaka.extern.TextDisplayerConfiguration | Text displayer configuration and settings. |
textDisplayFactory |
shaka.extern.TextDisplayer.Factory | A factory to construct a text displayer. Note that, if this is changed during playback, it will cause the text tracks to be reloaded. |
- Source:
ProducerReferenceTime
Type:
- {wallClockTime: number, programStartDate: Date}
Properties:
Name | Type | Description |
---|---|---|
wallClockTime |
number | A UTC timestamp corresponding to decoding time in milliseconds. |
programStartDate |
Date | The derived start date of the program. |
- Source:
ProgressUpdated
Type:
- function(number, number, number)
- Source:
Request
Type:
- {uris: !Array.<string>, method: string, body: ?BufferSource, headers: !Object.<string, string>, allowCrossSiteCredentials: boolean, retryParameters: !shaka.extern.RetryParameters, licenseRequestType: ?string, sessionId: ?string, drmInfo: ?shaka.extern.DrmInfo, initData: ?Uint8Array, initDataType: ?string, streamDataCallback: ?function(BufferSource): !Promise, requestStartTime: (?number|undefined), timeToFirstByte: (?number|undefined), packetNumber: (?number|undefined), contentType: (?string|undefined)}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
uris |
Array.<string> | An array of URIs to attempt. They will be tried in the order they are given. | |
method |
string | The HTTP method to use for the request. | |
body |
BufferSource |
<nullable> |
The body of the request. |
headers |
Object.<string, string> | A mapping of headers for the request. e.g.: {'HEADER': 'VALUE'} | |
allowCrossSiteCredentials |
boolean | Make requests with credentials. This will allow cookies in cross-site requests. See https://bit.ly/CorsCred. | |
retryParameters |
shaka.extern.RetryParameters | An object used to define how often to make retries. | |
licenseRequestType |
string |
<nullable> |
If this is a LICENSE request, this field contains the type of license request it is (not the type of license). This is the |messageType| field of the EME message. For example, this could be 'license-request' or 'license-renewal'. |
sessionId |
string |
<nullable> |
If this is a LICENSE request, this field contains the session ID of the EME session that made the request. |
drmInfo |
shaka.extern.DrmInfo |
<nullable> |
If this is a LICENSE request, this field contains the DRM info used to initialize EME. |
initData |
Uint8Array |
<nullable> |
If this is a LICENSE request, this field contains the initData info used to initialize EME. |
initDataType |
string |
<nullable> |
If this is a LICENSE request, this field contains the initDataType info used to initialize EME. |
streamDataCallback |
function |
<nullable> |
A callback function to handle the chunked data of the ReadableStream. |
requestStartTime |
number | undefined | The time that the request started. | |
timeToFirstByte |
number | undefined | The time taken to the first byte. | |
packetNumber |
number | undefined | A number representing the order the packet within the request. | |
contentType |
string | undefined | Content type (e.g. 'video', 'audio' or 'text', 'image') |
- Source:
RequestContext
Type:
- {type: (shaka.net.NetworkingEngine.AdvancedRequestType|undefined), stream: (shaka.extern.Stream|undefined), segment: (shaka.media.SegmentReference|undefined), isPreload: (boolean|undefined)}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
type |
shaka.net.NetworkingEngine.AdvancedRequestType |
<optional> |
The advanced type |
stream |
shaka.extern.Stream |
<optional> |
The duration of the segment in seconds |
segment |
shaka.media.SegmentReference |
<optional> |
The request's segment reference |
isPreload |
boolean |
<optional> |
Whether the request came from a preload or a normal load. |
- Source:
RequestFilter
Type:
- !function(shaka.net.NetworkingEngine.RequestType, shaka.extern.Request, shaka.extern.RequestContext=): (Promise|undefined)
- Source:
Resolution
Type:
- {width: number, height: number}
Properties:
Name | Type | Description |
---|---|---|
width |
number | Width in pixels. |
height |
number | Height in pixels. |
- Source:
Response
Type:
- {uri: string, originalUri: string, data: BufferSource, status: (number|undefined), headers: !Object.<string, string>, timeMs: (number|undefined), fromCache: (boolean|undefined)}
Properties:
Name | Type | Description |
---|---|---|
uri |
string | The URI which was loaded. Request filters and server redirects can cause this to be different from the original request URIs. |
originalUri |
string | The original URI passed to the browser for networking. This is before any redirects, but after request filters are executed. |
data |
BufferSource | The body of the response. |
status |
number | undefined | The response HTTP status code. |
headers |
Object.<string, string> | A map of response headers, if supported by the underlying protocol. All keys should be lowercased. For HTTP/HTTPS, may not be available cross-origin. |
timeMs |
number | undefined | Optional. The time it took to get the response, in milliseconds. If not given, NetworkingEngine will calculate it using Date.now. |
fromCache |
boolean | undefined | Optional. If true, this response was from a cache and should be ignored for bandwidth estimation. |
- Source:
ResponseFilter
Type:
- !function(shaka.net.NetworkingEngine.RequestType, shaka.extern.Response, shaka.extern.RequestContext=): (Promise|undefined)
- Source:
RestrictionInfo
Type:
- {hasAppRestrictions: boolean, missingKeys: !Array.<string>, restrictedKeyStatuses: !Array.<string>}
Properties:
Name | Type | Description |
---|---|---|
hasAppRestrictions |
boolean | Whether there are streams that are restricted due to app-provided restrictions. |
missingKeys |
Array.<string> | The key IDs that were missing. |
restrictedKeyStatuses |
Array.<string> | The restricted EME key statuses that the streams had. For example, 'output-restricted' would mean streams couldn't play due to restrictions on the output device (e.g. HDCP). |
- Source:
Restrictions
Type:
- {minWidth: number, maxWidth: number, minHeight: number, maxHeight: number, minPixels: number, maxPixels: number, minFrameRate: number, maxFrameRate: number, minBandwidth: number, maxBandwidth: number, minChannelsCount: number, maxChannelsCount: number}
Properties:
Name | Type | Description |
---|---|---|
minWidth |
number | The minimum width of a video track, in pixels.
Defaults to 0 . |
maxWidth |
number | The maximum width of a video track, in pixels.
Defaults to Infinity . |
minHeight |
number | The minimum height of a video track, in pixels.
Defaults to 0 . |
maxHeight |
number | The maximum height of a video track, in pixels.
Defaults to Infinity . |
minPixels |
number | The minimum number of total pixels in a video track (i.e.
width * height ).
Defaults to 0 . |
maxPixels |
number | The maximum number of total pixels in a video track (i.e.
width * height ).
Defaults to Infinity . |
minFrameRate |
number | The minimum framerate of a variant track.
Defaults to 0 . |
maxFrameRate |
number | The maximum framerate of a variant track.
Defaults to Infinity . |
minBandwidth |
number | The minimum bandwidth of a variant track, in bit/sec.
Defaults to 0 . |
maxBandwidth |
number | The maximum bandwidth of a variant track, in bit/sec.
Defaults to Infinity . |
minChannelsCount |
number | The minimum channels count of a variant track.
Defaults to 0 . |
maxChannelsCount |
number | The maximum channels count of a variant track.
Defaults to Infinity . |
RetryParameters
Type:
- {maxAttempts: number, baseDelay: number, backoffFactor: number, fuzzFactor: number, timeout: number, stallTimeout: number, connectionTimeout: number}
Properties:
Name | Type | Description |
---|---|---|
maxAttempts |
number | The maximum number of times the request should be attempted. The minimum supported value is 1 (only one request without retries). |
baseDelay |
number | The delay before the first retry, in milliseconds. |
backoffFactor |
number | The multiplier for successive retry delays. |
fuzzFactor |
number | The maximum amount of fuzz to apply to each retry delay. For example, 0.5 means "between 50% below and 50% above the retry delay." |
timeout |
number | The request timeout, in milliseconds. Zero means "unlimited". Defaults to 30000 milliseconds. |
stallTimeout |
number | The request stall timeout, in milliseconds. Zero means "unlimited". Defaults to 5000 milliseconds. |
connectionTimeout |
number | The request connection timeout, in milliseconds. Zero means "unlimited". Defaults to 10000 milliseconds. |
- Source:
- Tutorials:
SchemePlugin
Type:
- !function(string, shaka.extern.Request, shaka.net.NetworkingEngine.RequestType, shaka.extern.ProgressUpdated, shaka.extern.HeadersReceived, shaka.extern.SchemePluginConfig): !shaka.extern.IAbortableOperation.<shaka.extern.Response>
- Source:
SchemePluginConfig
Type:
- {minBytesForProgressEvents: (number|undefined)}
Properties:
Name | Type | Description |
---|---|---|
minBytesForProgressEvents |
number | undefined | Defines minimum number of bytes that should be use to emit progress event, if possible. |
- Source:
SegmentDataDB
Type:
- {data: !ArrayBuffer}
Properties:
Name | Type | Description |
---|---|---|
data |
ArrayBuffer | The data contents of the segment. |
- Source:
SegmentDataDBV1
Type:
- {key: number, data: !ArrayBuffer}
Properties:
Name | Type | Description |
---|---|---|
key |
number | A unique key to identify this item. |
data |
ArrayBuffer | The data contents of the segment. |
SegmentDataDBV2
Type:
- {data: !ArrayBuffer}
Properties:
Name | Type | Description |
---|---|---|
data |
ArrayBuffer | The data contents of the segment. |
SegmentDB
Type:
- {initSegmentKey: ?number, startTime: number, endTime: number, appendWindowStart: number, appendWindowEnd: number, timestampOffset: number, tilesLayout: ?string, pendingSegmentRefId: (string|undefined), pendingInitSegmentRefId: (string|undefined), dataKey: number, mimeType: ?string, codecs: ?string, thumbnailSprite: ?shaka.extern.ThumbnailSprite}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
initSegmentKey |
number |
<nullable> |
The storage key where the init segment is found; null if no init segment. |
startTime |
number | The start time of the segment in the presentation timeline. | |
endTime |
number | The end time of the segment in the presentation timeline. | |
appendWindowStart |
number | A start timestamp before which media samples will be truncated. | |
appendWindowEnd |
number | An end timestamp beyond which media samples will be truncated. | |
timestampOffset |
number | An offset which MediaSource will add to the segment's media timestamps during ingestion, to align to the presentation timeline. | |
tilesLayout |
string |
<nullable> |
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'. |
pendingSegmentRefId |
string | undefined | Contains an id that identifies what the segment was, originally. Used to coordinate where segments are stored, during the downloading process. If this field is non-null, it's assumed that the segment is not fully downloaded. | |
pendingInitSegmentRefId |
string | undefined | Contains an id that identifies what the init segment was, originally. Used to coordinate where init segments are stored, during the downloading process. If this field is non-null, it's assumed that the init segment is not fully downloaded. | |
dataKey |
number | The key to the data in storage. | |
mimeType |
string |
<nullable> |
The mimeType of the segment. |
codecs |
string |
<nullable> |
The codecs of the segment. |
thumbnailSprite |
shaka.extern.ThumbnailSprite |
<nullable> |
The segment's thumbnail sprite. |
- Source:
SegmentDBV1
Type:
- {startTime: number, endTime: number, uri: string}
Properties:
Name | Type | Description |
---|---|---|
startTime |
number | The start time of the segment, in seconds from the start of the Period. |
endTime |
number | The end time of the segment, in seconds from the start of the Period. |
uri |
string | The offline URI of the segment. |
SegmentDBV2
Type:
- {startTime: number, endTime: number, dataKey: number}
Properties:
Name | Type | Description |
---|---|---|
startTime |
number | The start time of the segment, in seconds from the start of the Period. |
endTime |
number | The end time of the segment, in seconds from the start of the Period. |
dataKey |
number | The key to the data in storage. |
ServiceDescription
Type:
- {targetLatency: ?number, maxLatency: ?number, maxPlaybackRate: ?number, minLatency: ?number, minPlaybackRate: ?number}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
targetLatency |
number |
<nullable> |
The target latency to aim for. |
maxLatency |
number |
<nullable> |
Maximum latency in seconds. |
maxPlaybackRate |
number |
<nullable> |
Maximum playback rate. |
minLatency |
number |
<nullable> |
Minimum latency in seconds. |
minPlaybackRate |
number |
<nullable> |
Minimum playback rate. |
- Source:
SpatialVideoInfo
VideoNalu.
Type:
- {projection: ?string, hfov: ?number}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
projection |
string |
<nullable> |
|
hfov |
number |
<nullable> |
- Source:
StateChange
Type:
- {timestamp: number, state: string, duration: number}
Properties:
Name | Type | Description |
---|---|---|
timestamp |
number | The timestamp the state was entered, in seconds since 1970
(i.e. Date.now() / 1000 ). |
state |
string | The state the player entered. This could be 'buffering' ,
'playing' , 'paused' , or 'ended' . |
duration |
number | The number of seconds the player was in this state. If this is the last entry in the list, the player is still in this state, so the duration will continue to increase. |
- Source:
Stats
load()
is called
again.
Type:
- {width: number, height: number, streamBandwidth: number, decodedFrames: number, droppedFrames: number, corruptedFrames: number, estimatedBandwidth: number, completionPercent: number, loadLatency: number, manifestTimeSeconds: number, drmTimeSeconds: number, playTime: number, pauseTime: number, bufferingTime: number, licenseTime: number, liveLatency: number, maxSegmentDuration: number, gapsJumped: number, stallsDetected: number, manifestSizeBytes: number, bytesDownloaded: number, nonFatalErrorCount: number, manifestPeriodCount: number, manifestGapCount: number, switchHistory: !Array.<shaka.extern.TrackChoice>, stateHistory: !Array.<shaka.extern.StateChange>}
Properties:
Name | Type | Description |
---|---|---|
width |
number | The width of the current video track. If nothing is loaded or the content is audio-only, NaN. |
height |
number | The height of the current video track. If nothing is loaded or the content is audio-only, NaN. |
streamBandwidth |
number | The bandwidth required for the current streams (total, in bit/sec). It takes into account the playbackrate. If nothing is loaded, NaN. |
decodedFrames |
number | The total number of frames decoded by the Player. If not reported by the browser, NaN. |
droppedFrames |
number | The total number of frames dropped by the Player. If not reported by the browser, NaN. |
corruptedFrames |
number | The total number of corrupted frames dropped by the browser. If not reported by the browser, NaN. |
estimatedBandwidth |
number | The current estimated network bandwidth (in bit/sec). If no estimate available, NaN. |
gapsJumped |
number | The total number of playback gaps jumped by the GapJumpingController. If nothing is loaded, NaN. |
stallsDetected |
number | The total number of playback stalls detected by the StallDetector. If nothing is loaded, NaN. |
completionPercent |
number | This is the greatest completion percent that the user has experienced in playback. Also known as the "high water mark". If nothing is loaded, or the stream is live (and therefore indefinite), NaN. |
loadLatency |
number | This is the number of seconds it took for the video element to have enough
data to begin playback. This is measured from the time load() is called to
the time the 'loadeddata' event is fired by the media element.
If nothing is loaded, NaN. |
manifestTimeSeconds |
number | The amount of time it took to download and parse the manifest. If nothing is loaded, NaN. |
drmTimeSeconds |
number | The amount of time it took to download the first drm key, and load that key into the drm system. If nothing is loaded or DRM is not in use, NaN. |
playTime |
number | The total time spent in a playing state in seconds. If nothing is loaded, NaN. |
pauseTime |
number | The total time spent in a paused state in seconds. If nothing is loaded, NaN. |
bufferingTime |
number | The total time spent in a buffering state in seconds. If nothing is loaded, NaN. |
licenseTime |
number | The time spent on license requests during this session in seconds. If DRM is not in use, NaN. |
liveLatency |
number | The time between the capturing of a frame and the end user having it displayed on their screen. If nothing is loaded or the content is VOD, NaN. |
maxSegmentDuration |
number | The presentation's max segment duration in seconds. If nothing is loaded, NaN. |
manifestSizeBytes |
number | Size of the manifest payload. For DASH & MSS it will match the latest downloaded manifest. For HLS, it will match the lastly downloaded playlist. If nothing is loaded or in src= mode, NaN. |
bytesDownloaded |
number | The bytes downloaded during the playback. If nothing is loaded, NaN. |
nonFatalErrorCount |
number | The amount of non fatal errors that occurred. If nothing is loaded, NaN. |
manifestPeriodCount |
number | The amount of periods occurred in the manifest. For DASH it represents number of Period elements in a manifest. For HLS & MSS it is always 1. In src= mode or if nothing is loaded, NaN. |
manifestGapCount |
number | The amount of gaps found in a manifest. For DASH, it represents number of discontinuities found between periods. For HLS, it is a number of EXT-X-GAP and GAP=YES occurrences. For MSS, it is always set to 0. If in src= mode or nothing is loaded, NaN. |
switchHistory |
Array.<shaka.extern.TrackChoice> | A history of the stream changes. |
stateHistory |
Array.<shaka.extern.StateChange> | A history of the state changes. |
- Source:
StoredContent
Type:
- {offlineUri: ?string, originalManifestUri: string, duration: number, size: number, expiration: number, tracks: !Array.<shaka.extern.Track>, appMetadata: Object, isIncomplete: boolean}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
offlineUri |
string |
<nullable> |
An offline URI to access the content. This can be passed directly to Player. If the uri is null, it means that the content has not finished downloading and is not ready to play. |
originalManifestUri |
string | The original manifest URI of the content stored. | |
duration |
number | The duration of the content, in seconds. | |
size |
number | The size of the content, in bytes. | |
expiration |
number | The time that the encrypted license expires, in milliseconds. If the media is clear or the license never expires, this will equal Infinity. | |
tracks |
Array.<shaka.extern.Track> | The tracks that are stored. | |
appMetadata |
Object | The metadata passed to store(). | |
isIncomplete |
boolean | If true, the content is still downloading. Manifests with this set cannot be played yet. |
- Source:
Stream
Type:
- {id: number, originalId: ?string, groupId: ?string, createSegmentIndex: shaka.extern.CreateSegmentIndexFunction, closeSegmentIndex: (function()|undefined), segmentIndex: shaka.media.SegmentIndex, mimeType: string, codecs: string, frameRate: (number|undefined), pixelAspectRatio: (string|undefined), hdr: (string|undefined), colorGamut: (string|undefined), videoLayout: (string|undefined), bandwidth: (number|undefined), width: (number|undefined), height: (number|undefined), kind: (string|undefined), encrypted: boolean, drmInfos: !Array.<shaka.extern.DrmInfo>, keyIds: !Set.<string>, language: string, originalLanguage: ?string, label: ?string, type: string, primary: boolean, trickModeVideo: ?shaka.extern.Stream, emsgSchemeIdUris: ?Array.<string>, roles: !Array.<string>, accessibilityPurpose: ?shaka.media.ManifestParser.AccessibilityPurpose, forced: boolean, channelsCount: ?number, audioSamplingRate: ?number, spatialAudio: boolean, closedCaptions: Map.<string, string>, tilesLayout: (string|undefined), matchedStreams: (!Array.<shaka.extern.Stream>|!Array.<shaka.extern.StreamDB>|undefined), mssPrivateData: (shaka.extern.MssPrivateData|undefined), external: boolean, fastSwitching: boolean, fullMimeTypes: !Set.<string>, isAudioMuxedInVideo: boolean}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | Required. A unique ID among all Stream objects within the same Manifest. |
|
originalId |
string |
<nullable> |
Optional. The original ID, if any, that appeared in the manifest. For example, in DASH, this is the "id" attribute of the Representation element. In HLS, this is the "NAME" attribute. |
groupId |
string |
<nullable> |
Optional. The ID of the stream's parent element. In DASH, this will be a unique ID that represents the representation's parent adaptation element |
createSegmentIndex |
shaka.extern.CreateSegmentIndexFunction | Required. Creates the Stream's segmentIndex (asynchronously). |
|
closeSegmentIndex |
function | undefined | Optional. Closes the Stream's segmentIndex. |
|
segmentIndex |
shaka.media.SegmentIndex | Required. May be null until createSegmentIndex() is complete. |
|
mimeType |
string | Required. The Stream's MIME type, e.g., 'audio/mp4', 'video/webm', or 'text/vtt'. In the case of a stream that adapts between different periods with different MIME types, this represents only the first period. |
|
codecs |
string | Defaults to '' (i.e., unknown / not needed). The Stream's codecs, e.g., 'avc1.4d4015' or 'vp9', which must be compatible with the Stream's MIME type. In the case of a stream that adapts between different periods with different codecs, this represents only the first period. See https://tools.ietf.org/html/rfc6381 |
|
frameRate |
number | undefined | Video streams only. The Stream's framerate in frames per second |
|
pixelAspectRatio |
string | undefined | Video streams only. The Stream's pixel aspect ratio |
|
hdr |
string | undefined | Video streams only. The Stream's HDR info |
|
colorGamut |
string | undefined | Video streams only. The Stream's color gamut info |
|
videoLayout |
string | undefined | Video streams only. The Stream's video layout info. |
|
bandwidth |
number | undefined | Audio and video streams only. The stream's required bandwidth in bits per second. |
|
width |
number | undefined | Video streams only. The stream's width in pixels. |
|
height |
number | undefined | Video streams only. The stream's height in pixels. |
|
kind |
string | undefined | Text streams only. The kind of text stream. For example, 'caption' or 'subtitle'. |
|
encrypted |
boolean | Defaults to false. True if the stream is encrypted. |
|
drmInfos |
Array.<!shaka.extern.DrmInfo> | Defaults to [] (i.e., no DRM). An array of DrmInfo objects which describe DRM schemes are compatible with the content. |
|
keyIds |
Set.<string> | Defaults to empty (i.e., unencrypted or key ID unknown). The stream's key IDs as lowercase hex strings. These key IDs identify the encryption keys that the browser (key system) can use to decrypt the stream. |
|
language |
string | The Stream's language, specified as a language code. Audio stream's language must be identical to the language of the containing Variant. |
|
originalLanguage |
string |
<nullable> |
Optional. The original language, if any, that appeared in the manifest. |
label |
string |
<nullable> |
The Stream's label, unique text that should describe the audio/text track. |
type |
string | Required. Content type (e.g. 'video', 'audio' or 'text', 'image') |
|
primary |
boolean | Defaults to false. True indicates that the player should use this Stream over others if user preferences cannot be met. The player may still use another Variant to meet user preferences. |
|
trickModeVideo |
shaka.extern.Stream |
<nullable> |
Video streams only. An alternate video stream to use for trick mode playback. |
emsgSchemeIdUris |
Array.<string> |
<nullable> |
Defaults to empty. Array of registered emsg box scheme_id_uri that should result in Player events. |
roles |
Array.<string> | The roles of the stream as they appear on the manifest, e.g. 'main', 'caption', or 'commentary'. | |
accessibilityPurpose |
shaka.media.ManifestParser.AccessibilityPurpose |
<nullable> |
The DASH accessibility descriptor, if one was provided for this stream. |
forced |
boolean | Defaults to false. Whether the stream set was forced |
|
channelsCount |
number |
<nullable> |
The channel count information for the audio stream. |
audioSamplingRate |
number |
<nullable> |
Specifies the maximum sampling rate of the content. |
spatialAudio |
boolean | Defaults to false. Whether the stream set has spatial audio |
|
closedCaptions |
Map.<string, string> | A map containing the description of closed captions, with the caption channel number (CC1 | CC2 | CC3 | CC4) as the key and the language code as the value. If the channel number is not provided by the description, we'll set a 0-based index as the key. If the language code is not provided by the description we'll set the same value as channel number. Example: {'CC1': 'eng'; 'CC3': 'swe'}, or {'1', 'eng'; '2': 'swe'}, etc. | |
tilesLayout |
string | undefined | Image streams only. 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'. |
|
matchedStreams |
!Array.<shaka.extern.Stream> | !Array.<shaka.extern.StreamDB> | undefined | The streams in all periods which match the stream. Used for Dash. | |
mssPrivateData |
shaka.extern.MssPrivateData | undefined | Microsoft Smooth Streaming only. Private MSS data that is necessary to be able to do transmuxing. |
|
external |
boolean | Indicate if the stream was added externally. Eg: external text tracks. | |
fastSwitching |
boolean | Indicate if the stream should be used for fast switching. | |
fullMimeTypes |
Set.<string> | A set of full MIME types (e.g. MIME types plus codecs information), that represents the types used in each period of the original manifest. Meant for being used by compatibility checking, such as with MediaSource.isTypeSupported. | |
isAudioMuxedInVideo |
boolean | Indicate if the audio of this stream is muxed in the video of other stream. |
- Source:
- See:
StreamDB
Type:
- {id: number, originalId: ?string, groupId: ?string, primary: boolean, type: string, mimeType: string, codecs: string, frameRate: (number|undefined), pixelAspectRatio: (string|undefined), hdr: (string|undefined), colorGamut: (string|undefined), videoLayout: (string|undefined), kind: (string|undefined), language: string, originalLanguage: (?string|undefined), label: ?string, width: ?number, height: ?number, encrypted: boolean, keyIds: !Set.<string>, segments: !Array.<shaka.extern.SegmentDB>, variantIds: !Array.<number>, roles: !Array.<string>, forced: boolean, channelsCount: ?number, audioSamplingRate: ?number, spatialAudio: boolean, closedCaptions: Map.<string, string>, tilesLayout: (string|undefined), external: boolean, fastSwitching: boolean, isAudioMuxedInVideo: boolean}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | The unique id of the stream. | |
originalId |
string |
<nullable> |
The original ID, if any, that appeared in the manifest. For example, in DASH, this is the "id" attribute of the Representation element. |
groupId |
string |
<nullable> |
The ID of the stream's parent element. In DASH, this will be a unique ID that represents the representation's parent adaptation element |
primary |
boolean | Whether the stream set was primary. | |
type |
string | The type of the stream, 'audio', 'text', or 'video'. | |
mimeType |
string | The MIME type of the stream. | |
codecs |
string | The codecs of the stream. | |
frameRate |
number | undefined | The Stream's framerate in frames per second. | |
pixelAspectRatio |
string | undefined | The Stream's pixel aspect ratio | |
hdr |
string | undefined | The Stream's HDR info | |
colorGamut |
string | undefined | The Stream's color gamut info | |
videoLayout |
string | undefined | The Stream's video layout info. | |
kind |
string | undefined | The kind of text stream; undefined for audio/video. | |
language |
string | The language of the stream; '' for video. | |
originalLanguage |
string | undefined | The original language, if any, that appeared in the manifest. | |
label |
string |
<nullable> |
The label of the stream; '' for video. |
width |
number |
<nullable> |
The width of the stream; null for audio/text. |
height |
number |
<nullable> |
The height of the stream; null for audio/text. |
encrypted |
boolean | Whether this stream is encrypted. | |
keyIds |
Set.<string> | The key IDs this stream is encrypted with. | |
segments |
Array.<shaka.extern.SegmentDB> | An array of segments that make up the stream. | |
variantIds |
Array.<number> | An array of ids of variants the stream is a part of. | |
roles |
Array.<string> | The roles of the stream as they appear on the manifest, e.g. 'main', 'caption', or 'commentary'. | |
forced |
boolean | Whether the stream set was forced. | |
channelsCount |
number |
<nullable> |
The channel count information for the audio stream. |
audioSamplingRate |
number |
<nullable> |
Specifies the maximum sampling rate of the content. |
spatialAudio |
boolean | Whether the stream set has spatial audio. | |
closedCaptions |
Map.<string, string> | A map containing the description of closed captions, with the caption channel number (CC1 | CC2 | CC3 | CC4) as the key and the language code as the value. If the channel number is not provided by the description, we'll set a 0-based index as the key. If the language code is not provided by the description we'll set the same value as channel number. Example: {'CC1': 'eng'; 'CC3': 'swe'}, or {'1', 'eng'; '2': 'swe'}, etc. | |
tilesLayout |
string | undefined | 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'. | |
external |
boolean | Indicate if the stream was added externally. Eg: external text tracks. | |
fastSwitching |
boolean | Indicate if the stream should be used for fast switching. | |
isAudioMuxedInVideo |
boolean | Indicate if the audio of this stream is muxed in the video of other stream. |
- Source:
StreamDBV1
Type:
- {id: number, primary: boolean, presentationTimeOffset: number, contentType: string, mimeType: string, codecs: string, frameRate: (number|undefined), kind: (string|undefined), language: string, label: ?string, width: ?number, height: ?number, initSegmentUri: ?string, encrypted: boolean, keyId: ?string, segments: !Array.<shaka.extern.SegmentDBV1>, variantIds: !Array.<number>}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | The unique id of the stream. | |
primary |
boolean | Whether the stream set was primary. | |
presentationTimeOffset |
number | The presentation time offset of the stream, in seconds. Note that this is the inverse of the timestampOffset as defined in the manifest types. | |
contentType |
string | The type of the stream, 'audio', 'text', or 'video'. | |
mimeType |
string | The MIME type of the stream. | |
codecs |
string | The codecs of the stream. | |
frameRate |
number | undefined | The Stream's framerate in frames per second. | |
kind |
string | undefined | The kind of text stream; undefined for audio/video. | |
language |
string | The language of the stream; '' for video. | |
label |
string |
<nullable> |
The label of the stream; '' for video. |
width |
number |
<nullable> |
The width of the stream; null for audio/text. |
height |
number |
<nullable> |
The height of the stream; null for audio/text. |
initSegmentUri |
number |
<nullable> |
The offline URI where the init segment is found; null if no init segment. |
encrypted |
boolean | Whether this stream is encrypted. | |
keyId |
string |
<nullable> |
The key ID this stream is encrypted with. |
segments |
Array.<shaka.extern.SegmentDBV1> | An array of segments that make up the stream. | |
variantIds |
Array.<number> | An array of ids of variants the stream is a part of. |
StreamDBV2
Type:
- {id: number, originalId: ?string, primary: boolean, presentationTimeOffset: number, contentType: string, mimeType: string, codecs: string, frameRate: (number|undefined), pixelAspectRatio: (string|undefined), kind: (string|undefined), language: string, label: ?string, width: ?number, height: ?number, initSegmentKey: ?number, encrypted: boolean, keyId: ?string, segments: !Array.<shaka.extern.SegmentDBV2>, variantIds: !Array.<number>}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | The unique id of the stream. | |
originalId |
string |
<nullable> |
The original ID, if any, that appeared in the manifest. For example, in DASH, this is the "id" attribute of the Representation element. |
primary |
boolean | Whether the stream set was primary. | |
presentationTimeOffset |
number | The presentation time offset of the stream, in seconds. Note that this is the inverse of the timestampOffset as defined in the manifest types. | |
contentType |
string | The type of the stream, 'audio', 'text', or 'video'. | |
mimeType |
string | The MIME type of the stream. | |
codecs |
string | The codecs of the stream. | |
frameRate |
number | undefined | The Stream's framerate in frames per second. | |
pixelAspectRatio |
string | undefined | The Stream's pixel aspect ratio | |
kind |
string | undefined | The kind of text stream; undefined for audio/video. | |
language |
string | The language of the stream; '' for video. | |
label |
string |
<nullable> |
The label of the stream; '' for video. |
width |
number |
<nullable> |
The width of the stream; null for audio/text. |
height |
number |
<nullable> |
The height of the stream; null for audio/text. |
initSegmentKey |
number |
<nullable> |
The storage key where the init segment is found; null if no init segment. |
encrypted |
boolean | Whether this stream is encrypted. | |
keyId |
string |
<nullable> |
The key ID this stream is encrypted with. |
segments |
Array.<shaka.extern.SegmentDBV2> | An array of segments that make up the stream. | |
variantIds |
Array.<number> | An array of ids of variants the stream is a part of. |
StreamingConfiguration
Type:
- {retryParameters: shaka.extern.RetryParameters, failureCallback: function(!shaka.util.Error), rebufferingGoal: number, bufferingGoal: number, bufferBehind: number, evictionGoal: number, ignoreTextStreamFailures: boolean, alwaysStreamText: boolean, startAtSegmentBoundary: boolean, gapDetectionThreshold: number, gapPadding: number, gapJumpTimerTime: number, durationBackoff: number, safeSeekOffset: number, safeSeekEndOffset: number, stallEnabled: boolean, stallThreshold: number, stallSkip: number, useNativeHlsForFairPlay: boolean, inaccurateManifestTolerance: number, lowLatencyMode: boolean, autoLowLatencyMode: boolean, forceHTTP: boolean, forceHTTPS: boolean, minBytesForProgressEvents: number, preferNativeHls: boolean, updateIntervalSeconds: number, observeQualityChanges: boolean, maxDisabledTime: number, segmentPrefetchLimit: number, prefetchAudioLanguages: !Array.<string>, disableAudioPrefetch: boolean, disableTextPrefetch: boolean, disableVideoPrefetch: boolean, liveSync: shaka.extern.LiveSyncConfiguration, allowMediaSourceRecoveries: boolean, minTimeBetweenRecoveries: number, vodDynamicPlaybackRate: boolean, vodDynamicPlaybackRateLowBufferRate: number, vodDynamicPlaybackRateBufferRatio: number, infiniteLiveStreamDuration: boolean, preloadNextUrlWindow: number, loadTimeout: number, clearDecodingCache: boolean, dontChooseCodecs: boolean, shouldFixTimestampOffset: boolean}
Properties:
Name | Type | Description |
---|---|---|
retryParameters |
shaka.extern.RetryParameters | Retry parameters for segment requests. |
failureCallback |
function | A callback to decide what to do on a streaming failure. Default behavior is to retry on live streams and not on VOD. |
rebufferingGoal |
number | The minimum number of seconds of content that the StreamingEngine must
buffer before it can begin playback or can continue playback after it has
entered into a buffering state (i.e., after it has depleted one more
more of its buffers).
Defaults to 2 . |
bufferingGoal |
number | The number of seconds of content that the StreamingEngine will attempt to
buffer ahead of the playhead. This value must be greater than or equal to
the rebuffering goal.
Defaults to 10 . |
bufferBehind |
number | The maximum number of seconds of content that the StreamingEngine will keep
in buffer behind the playhead when it appends a new media segment.
The StreamingEngine will evict content to meet this limit.
Defaults to 30 . |
evictionGoal |
number | The minimum duration in seconds of buffer overflow the StreamingEngine
requires to start removing content from the buffer.
Values less than 1.0 are not recommended.
Defaults to 1.0 . |
ignoreTextStreamFailures |
boolean | If true , the player will ignore text stream failures and
continue playing other streams.
Defaults to false . |
alwaysStreamText |
boolean | If true , always stream text tracks, regardless of whether or
not they are shown. This is necessary when using the browser's built-in
controls, which are not capable of signaling display state changes back to
Shaka Player.
Defaults to false . |
startAtSegmentBoundary |
boolean | If true , adjust the start time backwards so it is at the start
of a segment. This affects both explicit start times and calculated start
time for live streams. This can put us further from the live edge.
Defaults to false . |
gapDetectionThreshold |
number | The maximum distance (in seconds) before a gap when we'll automatically
jump.
Defaults to 0.5 . |
gapPadding |
number | Padding added only for Xbox, Legacy Edge and Tizen.
Based on our research (specific to Tizen), the gapPadding value must be
greater than your GOP length.
It’s crucial to verify this value according to your actual stream.
Defaults to 0.01 for Xbox and Legacy Edge, Tizen at 2. |
gapJumpTimerTime |
number | The polling time in seconds to check for gaps in the media.
Defaults to 0.25 . |
durationBackoff |
number | By default, we will not allow seeking to exactly the duration of a
presentation. This field is the number of seconds before duration we will
seek to when the user tries to seek to or start playback at the duration.
To disable this behavior, the config can be set to 0. We recommend using
the default value unless you have a good reason not to.
Defaults to 1 . |
safeSeekOffset |
number | The amount of seconds that should be added when repositioning the playhead
after falling out of the availability window or seek. This gives the player
more time to buffer before falling outside again, but increases the forward
jump in the stream skipping more content. This is helpful for lower
bandwidth scenarios.
Defaults to 5 . |
safeSeekEndOffset |
number | The amount of seconds that should be added when repositioning the playhead
after falling out of the seakable end range. This is helpful for live
stream with a lot of GAP. This will reposition the playback in the past
and avoid to be block at the edge and buffer at the next GAP
Defaults to 0 . |
stallEnabled |
boolean | When set to true , the stall detector logic will run. If the
playhead stops moving for stallThreshold seconds, the player
will either seek or pause/play to resolve the stall, depending on the value
of stallSkip .
Defaults to true . |
stallThreshold |
number | The maximum number of seconds that may elapse without the playhead moving
(when playback is expected) before it will be labeled as a stall.
Defaults to 1 . |
stallSkip |
number | The number of seconds that the player will skip forward when a stall has
been detected. If 0, the player will pause and immediately play instead of
seeking. A value of 0 is recommended and provided as default on TV
platforms (WebOS, Tizen, Chromecast, etc).
Defaults to 0.1 except on Tizen, WebOS, Chromecast,
Hisense whose default value is 0 . |
useNativeHlsForFairPlay |
boolean | Desktop Safari has both MediaSource and their native HLS implementation.
Depending on the application's needs, it may prefer one over the other.
Warning when disabled: Where single-key DRM streams work fine, multi-keys
streams is showing unexpected behaviours (stall, audio playing with video
freezes, ...). Use with care.
Defaults to true . |
inaccurateManifestTolerance |
number | The maximum difference, in seconds, between the times in the manifest and
the times in the segments. Larger values allow us to compensate for more
drift (up to one segment duration). Smaller values reduce the incidence of
extra segment requests necessary to compensate for drift.
Defaults to 2 . |
lowLatencyMode |
boolean | If true , low latency streaming mode is enabled. If
lowLatencyMode is set to true, it changes the default config values for
other things, see: docs/tutorials/config.md
Defaults to false . |
autoLowLatencyMode |
boolean | If the stream is low latency and the user has not configured the
lowLatencyMode, but if it has been configured to activate the
lowLatencyMode if a stream of this type is detected, we automatically
activate the lowLatencyMode.
Defaults to false . |
forceHTTP |
boolean | If true, if the protocol is HTTPs change it to HTTP.
If both forceHTTP and forceHTTPS are set, forceHTTPS wins.
Defaults to false . |
forceHTTPS |
boolean | If true, if the protocol is HTTP change it to HTTPs.
If both forceHTTP and forceHTTPS are set, forceHTTPS wins.
Defaults to false . |
minBytesForProgressEvents |
number | Defines minimum number of bytes that should be used to emit progress event, if possible. To avoid issues around feeding ABR with request history, this value should be greater than or equal to `abr.advanced.minBytes`. By default equals 16e3 (the same value as `abr.advanced.minBytes`). |
preferNativeHls |
boolean | If true, prefer native HLS playback when possible, regardless of platform.
Defaults to false . |
updateIntervalSeconds |
number | The minimum number of seconds to see if the manifest has changes.
Defaults to 1 . |
observeQualityChanges |
boolean | If true, monitor media quality changes and emit
shaka.Player.MediaQualityChangedEvent .
Defaults to false . |
maxDisabledTime |
number | The maximum time a variant can be disabled when NETWORK HTTP_ERROR
is reached, in seconds.
If all variants are disabled this way, NETWORK HTTP_ERROR will be thrown.
Defaults to 30 . |
segmentPrefetchLimit |
number | The maximum number of segments for each active stream to be prefetched
ahead of playhead in parallel.
If 0 , the segments will be fetched sequentially.
Defaults to 0 . |
prefetchAudioLanguages |
Array.<string> | The audio languages to prefetch.
Defaults to [] . |
disableAudioPrefetch |
boolean | If set and prefetch limit is defined, it will prevent from prefetching data
for audio.
Defaults to false . |
disableTextPrefetch |
boolean | If set and prefetch limit is defined, it will prevent from prefetching data
for text.
Defaults to false . |
disableVideoPrefetch |
boolean | If set and prefetch limit is defined, it will prevent from prefetching data
for video.
Defaults to false . |
liveSync |
shaka.extern.LiveSyncConfiguration | The live sync configuration for keeping near the live edge. |
allowMediaSourceRecoveries |
boolean | Indicate if we should recover from VIDEO_ERROR resetting Media Source.
Defaults to true . |
minTimeBetweenRecoveries |
number | The minimum time between recoveries when VIDEO_ERROR is reached, in
seconds.
Defaults to 5 . |
vodDynamicPlaybackRate |
boolean | Adapt the playback rate of the player to keep the buffer full.
Defaults to false . |
vodDynamicPlaybackRateLowBufferRate |
number | Playback rate to use if the buffer is too small.
Defaults to 0.95 . |
vodDynamicPlaybackRateBufferRatio |
number | Ratio of the bufferingGoal as the low threshold for
setting the playback rate to
vodDynamicPlaybackRateLowBufferRate .
Defaults to 0.5 . |
infiniteLiveStreamDuration |
boolean | If true , the media source live duration
set as aInfinity
Defaults to false . |
preloadNextUrlWindow |
number | The window of time at the end of the presentation to begin preloading the
next URL, such as one specified by a urn:mpeg:dash:chaining:2016 element
in DASH. Measured in seconds. If the value is 0, the next URL will not
be preloaded at all.
Defaults to 30 . |
loadTimeout |
number | The maximum timeout to reject the load when using src= in case the content
does not work correctly. Measured in seconds.
Defaults to 30 . |
clearDecodingCache |
boolean | Clears decodingInfo and MediaKeySystemAccess cache during player unload
as these objects may become corrupt and cause issues during subsequent
playbacks on some platforms.
Defaults to true on PlayStation devices and to
false on other devices. |
dontChooseCodecs |
boolean | If true, we don't choose codecs in the player, and keep all the variants.
Defaults to false . |
shouldFixTimestampOffset |
boolean | If true, we will try to fix problems when the timestampOffset is less than
the baseMediaDecodeTime. This only works when the manifest is DASH with
MP4 segments.
Defaults to false except on Tizen, WebOS whose default value
is true . |
- Source:
SupportType
Type:
- {manifest: !Object.<string, boolean>, media: !Object.<string, boolean>, drm: !Object.<string, ?shaka.extern.DrmSupportType>, hardwareResolution: shaka.extern.Resolution}
Properties:
Name | Type | Description |
---|---|---|
manifest |
Object.<string, boolean> | A map of supported manifest types. The keys are manifest MIME types and file extensions. |
media |
Object.<string, boolean> | A map of supported media types. The keys are media MIME types. |
drm |
Object.<string, ?shaka.extern.DrmSupportType> | A map of supported key systems.
The keys are the key system names. The value is null if it is
not supported. Key systems not probed will not be in this dictionary. |
hardwareResolution |
shaka.extern.Resolution | The maximum detected hardware resolution, which may have height==width==Infinity for devices without a maximum resolution or without a way to detect the maximum. |
- Source:
TextDisplayerConfiguration
Type:
- {captionsUpdatePeriod: number}
Properties:
Name | Type | Description |
---|---|---|
captionsUpdatePeriod |
number | The number of seconds to see if the captions should be updated.
Defaults to 0.25 . |
- Source:
Thumbnail
Type:
- {segment: shaka.media.SegmentReference, imageHeight: number, imageWidth: number, height: number, positionX: number, positionY: number, startTime: number, duration: number, uris: !Array.<string>, width: number, sprite: boolean}
Properties:
Name | Type | Description |
---|---|---|
segment |
shaka.media.SegmentReference | The segment of this thumbnail. |
imageHeight |
number | The image height in px. The image height could be different to height if the layout is different to 1x1. |
imageWidth |
number | The image width in px. The image width could be different to width if the layout is different to 1x1. |
height |
number | The thumbnail height in px. |
positionX |
number | The thumbnail left position in px. |
positionY |
number | The thumbnail top position in px. |
startTime |
number | The start time of the thumbnail in the presentation timeline, in seconds. |
duration |
number | The duration of the thumbnail, in seconds. |
uris |
Array.<string> | An array of URIs to attempt. They will be tried in the order they are given. |
width |
number | The thumbnail width in px. |
sprite |
boolean | Indicate if the thumbnail is a sprite. |
- Source:
ThumbnailSprite
Type:
- {height: number, positionX: number, positionY: number, width: number}
Properties:
Name | Type | Description |
---|---|---|
height |
number | The thumbnail height in px. |
positionX |
number | The thumbnail left position in px. |
positionY |
number | The thumbnail top position in px. |
width |
number | The thumbnail width in px. |
- Source:
TimelineRegionInfo
Type:
- {schemeIdUri: string, value: string, startTime: number, endTime: number, id: string, eventElement: Element, eventNode: ?shaka.extern.xml.Node}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
schemeIdUri |
string | Identifies the message scheme. | |
value |
string | Specifies the value for the region. | |
startTime |
number | The presentation time (in seconds) that the region should start. | |
endTime |
number | The presentation time (in seconds) that the region should end. | |
id |
string | Specifies an identifier for this instance of the region. | |
eventElement |
Element | DEPRECATED: Use eventNode instead. The XML element that defines the Event. | |
eventNode |
shaka.extern.xml.Node |
<nullable> |
The XML element that defines the Event. |
- Source:
Track
Type:
- {id: number, active: boolean, type: string, bandwidth: number, language: string, label: ?string, kind: ?string, width: ?number, height: ?number, frameRate: ?number, pixelAspectRatio: ?string, hdr: ?string, colorGamut: ?string, videoLayout: ?string, mimeType: ?string, audioMimeType: ?string, videoMimeType: ?string, codecs: ?string, audioCodec: ?string, videoCodec: ?string, primary: boolean, roles: !Array.<string>, audioRoles: Array.<string>, accessibilityPurpose: ?shaka.media.ManifestParser.AccessibilityPurpose, forced: boolean, videoId: ?number, audioId: ?number, channelsCount: ?number, audioSamplingRate: ?number, tilesLayout: ?string, audioBandwidth: ?number, videoBandwidth: ?number, spatialAudio: boolean, originalVideoId: ?string, originalAudioId: ?string, originalTextId: ?string, originalImageId: ?string, originalLanguage: ?string}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | The unique ID of the track. | |
active |
boolean | If true, this is the track being streamed (another track may be visible/audible in the buffer). | |
type |
string | The type of track, either 'variant' or 'text'
or 'image' . |
|
bandwidth |
number | The bandwidth required to play the track, in bits/sec. | |
language |
string | The language of the track, or 'und' if not given. This value
is normalized as follows - language part is always lowercase and translated
to ISO-639-1 when possible, locale part is always uppercase,
i.e. 'en-US' . |
|
label |
string |
<nullable> |
The track label, which is unique text that should describe the track. |
kind |
string |
<nullable> |
(only for text tracks) The kind of text track, either
'caption' or 'subtitle' . |
width |
number |
<nullable> |
The video width provided in the manifest, if present. |
height |
number |
<nullable> |
The video height provided in the manifest, if present. |
frameRate |
number |
<nullable> |
The video framerate provided in the manifest, if present. |
pixelAspectRatio |
string |
<nullable> |
The video pixel aspect ratio provided in the manifest, if present. |
hdr |
string |
<nullable> |
The video HDR provided in the manifest, if present. |
colorGamut |
string |
<nullable> |
The video color gamut provided in the manifest, if present. |
videoLayout |
string |
<nullable> |
The video layout provided in the manifest, if present. |
mimeType |
string |
<nullable> |
The MIME type of the content provided in the manifest. |
audioMimeType |
string |
<nullable> |
The audio MIME type of the content provided in the manifest. |
videoMimeType |
string |
<nullable> |
The video MIME type of the content provided in the manifest. |
codecs |
string |
<nullable> |
The audio/video codecs string provided in the manifest, if present. |
audioCodec |
string |
<nullable> |
The audio codecs string provided in the manifest, if present. |
videoCodec |
string |
<nullable> |
The video codecs string provided in the manifest, if present. |
primary |
boolean | True indicates that this in the primary language for the content. This flag is based on signals from the manifest. This can be a useful hint about which language should be the default, and indicates which track Shaka will use when the user's language preference cannot be satisfied. | |
roles |
Array.<string> | The roles of the track, e.g. 'main' , 'caption' ,
or 'commentary' . |
|
audioRoles |
Array.<string> | The roles of the audio in the track, e.g. 'main' or
'commentary' . Will be null for text tracks or variant tracks
without audio. |
|
accessibilityPurpose |
shaka.media.ManifestParser.AccessibilityPurpose |
<nullable> |
The DASH accessibility descriptor, if one was provided for this track. For text tracks, this describes the text; otherwise, this is for the audio. |
forced |
boolean | True indicates that this in the forced text language for the content. This flag is based on signals from the manifest. | |
videoId |
number |
<nullable> |
(only for variant tracks) The video stream id. |
audioId |
number |
<nullable> |
(only for variant tracks) The audio stream id. |
channelsCount |
number |
<nullable> |
The count of the audio track channels. |
audioSamplingRate |
number |
<nullable> |
Specifies the maximum sampling rate of the content. |
tilesLayout |
string |
<nullable> |
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'. |
spatialAudio |
boolean | True indicates that the content has spatial audio. This flag is based on signals from the manifest. | |
audioBandwidth |
number |
<nullable> |
(only for variant tracks) The audio stream's bandwidth if known. |
videoBandwidth |
number |
<nullable> |
(only for variant tracks) The video stream's bandwidth if known. |
originalVideoId |
string |
<nullable> |
(variant tracks only) The original ID of the video part of the track, if any, as it appeared in the original manifest. |
originalAudioId |
string |
<nullable> |
(variant tracks only) The original ID of the audio part of the track, if any, as it appeared in the original manifest. |
originalTextId |
string |
<nullable> |
(text tracks only) The original ID of the text track, if any, as it appeared in the original manifest. |
originalImageId |
string |
<nullable> |
(image tracks only) The original ID of the image track, if any, as it appeared in the original manifest. |
originalLanguage |
string |
<nullable> |
The original language of the track, if any, as it appeared in the original
manifest. This is the exact value provided in the manifest; for normalized
value use language property. |
- Source:
TrackChoice
Type:
- {timestamp: number, id: number, type: string, fromAdaptation: boolean, bandwidth: ?number}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
timestamp |
number | The timestamp the choice was made, in seconds since 1970
(i.e. Date.now() / 1000 ). |
|
id |
number | The id of the track that was chosen. | |
type |
string | The type of track chosen ('variant' or 'text' ). |
|
fromAdaptation |
boolean | true if the choice was made by AbrManager for adaptation;
false if it was made by the application through
selectTrack . |
|
bandwidth |
number |
<nullable> |
The bandwidth of the chosen track (null for text). |
- Source:
TransmuxerPlugin
Type:
- function():!shaka.extern.Transmuxer
- Source:
UIConfiguration
Type:
- {controlPanelElements: !Array.<string>, overflowMenuButtons: !Array.<string>, contextMenuElements: !Array.<string>, statisticsList: !Array.<string>, adStatisticsList: !Array.<string>, playbackRates: !Array.<number>, fastForwardRates: !Array.<number>, rewindRates: !Array.<number>, addSeekBar: boolean, addBigPlayButton: boolean, customContextMenu: boolean, castReceiverAppId: string, castAndroidReceiverCompatible: boolean, clearBufferOnQualityChange: boolean, showUnbufferedStart: boolean, seekBarColors: shaka.extern.UISeekBarColors, volumeBarColors: shaka.extern.UIVolumeBarColors, trackLabelFormat: shaka.ui.Overlay.TrackLabelFormat, textTrackLabelFormat: shaka.ui.Overlay.TrackLabelFormat, fadeDelay: number, doubleClickForFullscreen: boolean, singleClickForPlayAndPause: boolean, enableKeyboardPlaybackControls: boolean, enableFullscreenOnRotation: boolean, forceLandscapeOnFullscreen: boolean, enableTooltips: boolean, keyboardSeekDistance: number, keyboardLargeSeekDistance: number, fullScreenElement: HTMLElement, preferDocumentPictureInPicture: boolean, showAudioChannelCountVariants: boolean, seekOnTaps: boolean, tapSeekDistance: number, refreshTickInSeconds: number, displayInVrMode: boolean, defaultVrProjectionMode: string, setupMediaSession: boolean, preferVideoFullScreenInVisionOS: boolean}
Properties:
Name | Type | Description |
---|---|---|
controlPanelElements |
Array.<string> | The ordered list of control panel elements of the UI. |
overflowMenuButtons |
Array.<string> | The ordered list of the overflow menu buttons. |
contextMenuElements |
Array.<string> | The ordered list of buttons in the context menu. |
statisticsList |
Array.<string> | The ordered list of statistics present in the statistics container. |
adStatisticsList |
Array.<string> | The ordered list of ad statistics present in the ad statistics container. |
playbackRates |
Array.<number> | The ordered list of rates for playback selection. |
fastForwardRates |
Array.<number> | The ordered list of rates for fast forward selection. |
rewindRates |
Array.<number> | The ordered list of rates for rewind selection. |
addSeekBar |
boolean | Whether or not a seek bar should be part of the UI. |
addBigPlayButton |
boolean | Whether or not a big play button in the center of the video should be part of the UI. |
customContextMenu |
boolean | Whether or not a custom context menu replaces the default. |
castReceiverAppId |
string | Receiver app id to use for the Chromecast support. |
castAndroidReceiverCompatible |
boolean | Indicates if the app is compatible with an Android Cast Receiver. |
clearBufferOnQualityChange |
boolean | Only applicable if the resolution selection is part of the UI. Whether buffer should be cleared when changing resolution via UI. Clearing buffer would result in immidiate change of quality, but playback may flicker/stall for a sec as the content in new resolution is being buffered. Not clearing the buffer will mean we play the content in the previously selected resolution that we already have buffered before switching to the new resolution. |
showUnbufferedStart |
boolean | If true, color any unbuffered region at the start of the seek bar as
unbuffered (using the "base" color). If false, color any unbuffered region
at the start of the seek bar as played (using the "played" color).
A value of false matches the default behavior of Chrome's native controls and Shaka Player v3.0+. A value of true matches the default behavior of Shaka Player v2.5. Defaults to false. |
seekBarColors |
shaka.extern.UISeekBarColors | The CSS colors applied to the seek bar. This allows you to override the colors used in the linear gradient constructed in JavaScript, since you cannot easily do this in pure CSS. |
volumeBarColors |
shaka.extern.UIVolumeBarColors | The CSS colors applied to the volume bar. This allows you to override the colors used in the linear gradient constructed in JavaScript, since you cannot do this in pure CSS. |
trackLabelFormat |
shaka.ui.Overlay.TrackLabelFormat | An enum that determines what is shown in the labels for audio variant selection. LANGUAGE means that only the language of the item is shown. ROLE means that only the role of the item is shown. LANGUAGE_ROLE means both language and role are shown, or just language if there is no role. LABEL means the non-standard DASH "label" attribute or the standard DASH "Label" element or the HLS "NAME" attribute are shown. Defaults to LANGUAGE. |
textTrackLabelFormat |
shaka.ui.Overlay.TrackLabelFormat | An enum that determines what is shown in the labels for text track selection. LANGUAGE means that only the language of the item is shown. ROLE means that only the role of the item is shown. LANGUAGE_ROLE means both language and role are shown, or just language if there is no role. LABEL means the non-standard DASH "label" attribute or the standard DASH "Label" element or the HLS "NAME" attribute are shown. Defaults to LANGUAGE. |
fadeDelay |
number | The delay (in seconds) before fading out the controls once the user stops interacting with them. We recommend setting this to 3 on your cast receiver UI. Defaults to 0. |
doubleClickForFullscreen |
boolean | Whether or not double-clicking on the UI should cause it to enter fullscreen. Defaults to true. |
singleClickForPlayAndPause |
boolean | Whether or not clicking on the video should cause it to play or pause. It does not work in VR mode. Defaults to true. |
enableKeyboardPlaybackControls |
boolean | Whether or not playback controls via keyboard is enabled, such as seek forward, seek backward, jump to the beginning/end of the video. Defaults to true. |
enableFullscreenOnRotation |
boolean | Whether or not to enter/exit fullscreen mode when the screen is rotated. Defaults to true. |
forceLandscapeOnFullscreen |
boolean | Whether or not the device should rotate to landscape mode when the video enters fullscreen. Note that this behavior is based on an experimental browser API, and may not work on all platforms. Defaults to true. |
enableTooltips |
boolean | Whether or not buttons in the control panel display tooltips that contain information about their function. Defaults to false. |
keyboardSeekDistance |
number | The time interval, in seconds, to seek when the user presses the left or right keyboard keys when the video is selected. If less than or equal to 0, no seeking will occur. Defaults to 5 seconds. |
keyboardLargeSeekDistance |
number | The time interval, in seconds, to seek when the user presses the page up or page down keyboard keys when the video is selected. If less than or equal to 0, no seeking will occur. Defaults to 60 seconds. |
fullScreenElement |
HTMLElement | DOM element on which fullscreen will be done. Defaults to Shaka Player Container. |
preferDocumentPictureInPicture |
boolean | Indicates whether the Document Picture in Picture API is preferred or the Video Element Picture in Picture API is preferred. Changing this property in mid-playback may produce undesired behavior if you are already in PiP. Defaults to true. |
showAudioChannelCountVariants |
boolean | Indicates whether the combination of language and channel count should be displayed or if, on the contrary, only the language should be displayed regardless of the channel count. Defaults to true. |
seekOnTaps |
boolean | Indicates whether or not a fast-forward and rewind tap button that seeks
video some seconds.
Defaults to true if the browser navigator.maxTouchPoints > 0
is true. |
tapSeekDistance |
number | The time interval, in seconds, to seek when the user presses the left or right part of the video. If less than or equal to 0, no seeking will occur. Defaults to 10 seconds. |
refreshTickInSeconds |
number | The time interval, in seconds, to update the seek bar. Defaults to 0.125 seconds. |
displayInVrMode |
boolean | If true, the content will be treated as VR. If false, it will only be treated as VR if we automatically detect it as such. (See the Enabling VR section in docs/tutorials/ui.md) Defaults to false. |
defaultVrProjectionMode |
string | Indicate the default VR projection mode.
Possible values: 'equirectangular' or 'cubemap' .
Defaults to 'equirectangular' . |
setupMediaSession |
boolean | If true, MediaSession controls will be managed by the UI. It will also use the ID3 APIC and TIT2 as image and title in Media Session, and ID3 APIC will also be used to change video poster. Defaults to true. |
preferVideoFullScreenInVisionOS |
boolean | If true, we will use the fullscreen API of the video element itself if it is available in Vision OS. This is useful to be able to access 3D experiences that are only allowed with the fullscreen of the video element itself. Defaults to false. |
- Source:
UISeekBarColors
Type:
- {base: string, buffered: string, played: string, adBreaks: string}
Properties:
Name | Type | Description |
---|---|---|
base |
string | The CSS background color applied to the base of the seek bar, on top of which the buffer level and playback position are shown. |
buffered |
string | The CSS background color applied to the portion of the seek bar showing what has been buffered ahead of the playback position. |
played |
string | The CSS background color applied to the portion of the seek bar showing what has been played already. |
adBreaks |
string | The CSS background color applied to the portion of the seek bar showing when the ad breaks are scheduled to occur on the timeline. |
- Source:
UIVolumeBarColors
Type:
- {base: string, level: string}
Properties:
Name | Type | Description |
---|---|---|
base |
string | The CSS background color applied to the base of the volume bar, on top of which the volume level is shown. |
level |
string | The CSS background color applied to the portion of the volume bar showing the volume level. |
- Source:
Variant
Type:
- {id: number, language: string, disabledUntilTime: number, primary: boolean, audio: ?shaka.extern.Stream, video: ?shaka.extern.Stream, bandwidth: number, allowedByApplication: boolean, allowedByKeySystem: boolean, decodingInfos: !Array.<MediaCapabilitiesDecodingInfo>}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | Required. A unique ID among all Variant objects within the same Manifest. |
|
language |
string | Defaults to '' (i.e., unknown). The Variant's language, specified as a language code. See https://tools.ietf.org/html/rfc5646 See http://www.iso.org/iso/home/standards/language_codes.htm |
|
disabledUntilTime |
number | Defaults to 0. 0 means the variant is enabled. The Player will set this value to "(Date.now() / 1000) + config.streaming.maxDisabledTime" and once this maxDisabledTime has passed Player will set the value to 0 in order to reenable the variant. |
|
primary |
boolean | Defaults to false. True indicates that the player should use this Variant over others if user preferences cannot be met. The player may still use another Variant to meet user preferences. |
|
audio |
shaka.extern.Stream |
<nullable> |
The audio stream of the variant. |
video |
shaka.extern.Stream |
<nullable> |
The video stream of the variant. |
bandwidth |
number | The variant's required bandwidth in bits per second. | |
allowedByApplication |
boolean | Defaults to true. Set by the Player to indicate whether the variant is allowed to be played by the application. |
|
allowedByKeySystem |
boolean | Defaults to true. Set by the Player to indicate whether the variant is allowed to be played by the key system. |
|
decodingInfos |
Array.<MediaCapabilitiesDecodingInfo> | Defaults to []. Set by StreamUtils to indicate the results from MediaCapabilities decodingInfo. |
- Source:
VideoNalu
VideoNalu.
Type:
- {data: !Uint8Array, fullData: !Uint8Array, type: number, time: ?number}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Uint8Array | ||
fullData |
Uint8Array | ||
type |
number | ||
time |
number |
<nullable> |
- Source: