Members
(constant) BUFFER_END_THRESHOLD
The copyright in this software is being made available under the BSD License,
included below. This software may be subject to other third party and contributor
rights, including patent rights, and no such rights are granted under this license.
Copyright (c) 2013, Dash Industry Forum.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution. - Neither the name of Dash Industry Forum nor the names of its
contributors may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
(constant) CmcdPropertyMap :Object.<string, PropertyMapping>
Property mappings for CMCD configuration
- Object.<string, PropertyMapping>
(constant) ISO_639_2_TO_1
ISO 639-2 (3-letter) to ISO 639-1 (2-letter) mappings for languages
commonly found in broadcast/streaming content (DASH, HLS, DVB).
Covers both 639-2/B (bibliographic) and 639-2/T (terminological) codes.
Methods
dedupeCertUrls(list) → {Array.<{url: string, certType: (string|null)}>}
Deduplicates an array of Certurl descriptor objects by URL + certType combination.
Keeps first occurrence order stable.
| Name | Type | Description |
|---|---|---|
list | Array.<{url: string, certType: (string|null)}> |
- Type:
- Array.<{url: string, certType: (string|null)}>
getContinuousBufferTime()
Returns the end of the buffered range that contains targetTime, i.e. the time until which the buffer is continuous.
Returns NaN if targetTime is not buffered.
normalizeCertUrls()
Utility functions for DASH Certurl normalization.
Shared by ContentProtection parsing and protData handling.
A Certurl entry may appear as:
- String: 'https://example.com/cert'
- Object parsed from XML: { __text: 'https://example.com/cert', '@certType': 'primary' }
- Pre-normalized object: { url: 'https://example.com/cert', certType: 'primary' }
- Array of any of the above
The normalization returns an array of objects: { url: string, certType: string|null }
Empty or invalid entries are filtered out. Whitespace is trimmed.
sanitizeProtectionDataCertUrls(protData) → {Object}
Iterates over a ProtectionDataSet object and normalizes & deduplicates any certUrls arrays in-place.
Returns the same object reference for convenience.
| Name | Type | Description |
|---|---|---|
protData | Object | keySystem -> config object |
protData
- Type:
- Object
Type Definitions
IntervalTreeNode
- Object
| Name | Type | Description |
|---|---|---|
start | number | Start time of the interval |
end | number | End time of the interval |
cue | TextTrackCue | The cue object |
maxEnd | number | Maximum end time in this subtree |
left | IntervalTreeNode | | Left child node |
right | IntervalTreeNode | | Right child node |
height | number | Height of this node in the tree |
MediaType
The media types
- 'video' |
'audio' | 'text' | 'image'
- Source
PropertyMapping
Declarative configuration for CMCD property mappings.
Maps logical property names to physical paths in different sources (manifest, settings)
with version awareness, priority-based fallback, and optional transformations.
This centralized configuration allows handling structure changes in CMCD settings
without modifying business logic across the codebase.
- Object
| Name | Type | Attributes | Description |
|---|---|---|---|
path | string | Dot-notation path to property (e.g., 'settings.streaming.cmcd.version') | |
priority | number | Order of precedence (1 = highest) | |
type | string | <optional> | Expected data type ('string', 'number', 'boolean', 'array', 'object') |
transform | function | <optional> | Optional transformation function |
default | * | <optional> | Default value if not found |
deprecated | boolean | <optional> | Mark as deprecated for backward compatibility |
version | Array.<number> | <optional> | CMCD versions this mapping applies to (omit for all versions) |
sources | Array.<PropertySource> | Ordered list of sources to check |
TrackCueData
- Object
| Name | Type | Description |
|---|---|---|
allCues | CueIntervalTree | All cues for this track, stored in an interval tree for efficient lookup |
lastCueWindowUpdate | number | Timestamp of last cue window update (for native rendering only) |
activeCues | Array | Currently active cues for this track (for manual rendering only) |