Skip to content

Master#1

Open
dstohr wants to merge 4217 commits into
dstohr:nikos_testfrom
Dash-Industry-Forum:master
Open

Master#1
dstohr wants to merge 4217 commits into
dstohr:nikos_testfrom
Dash-Industry-Forum:master

Conversation

@dstohr

@dstohr dstohr commented Jan 18, 2017

Copy link
Copy Markdown
Owner

No description provided.

dstohr pushed a commit that referenced this pull request Feb 1, 2017
Merge recent changes from Dash-Industry-Forum.
dstohr pushed a commit that referenced this pull request Feb 1, 2017
Merge dashjs latest into my dev fork
dsilhavy and others added 26 commits August 16, 2024 12:10
* Allow to use Representations from different AdaptationSets when calling setRepresentationForTypeById

* Minor changes to functional tests
* Starting webapp on LG works

* First working webOS test execution

* Add WebOS testapp files

* Working Samsung TV karma test execution

* Minor change to smoke tests

* Provide config parameters for Tizen runner via config json

* Reset command

* Remove selenium certs
…unning new checks when the configuration has not been tested before. (#4564)
* WiP: Avoid duplicate codec capability checks

* Optimize capabilities check by saving previously executed checks and avoid any duplicate checks

* Add additional unit tests

* Fix bug in Capabilities.js

* Remove line in package.json

* Add forced subtitle stream to reference client

* Skip MediaCapability tests on Linux Firefox

* Change CircleCI config to use medium+ resource class for the build

* Change CircleCI config to use large resource class for the execution
* WiP: Ignore Representations with unsupported key sessions

* Check if key is usable in ABR controller. Otherwise ignore the Representation

* Fix race condition when doing a non replacement track switch

* First working version of handling unsupported keys

* Fix unit tests

* Fix unit tests

* Working playback with key id hex conversion

* Fix unit tests

* Dispatch key status expired and do not show Representations and AdaptationSets with unusable key ids in the Controlbar

* Add windows local functional tests config

* Update content token

* Fix a bug that lead to playback stalling after changeType failed

* Add config for Windows functional tests

* Remove scheduled CircleCI workflow

* Do not terminate if _initializeSinkForMseBuffering fails

* First try DRM system for which we have protData

* Exclude preload test for livesim eccp

* Workaround to overcome stalls when key is unusubale

* Fix a bug when switching tracks. ScheduleController needs to be stopped immediately to avoid inconsistency with the ABR selection. Also reset BOLA utility values when a track is changed.

* Fix potential null pointer in AbrController.js

* Fix a bug when switching qualities that lead to SourceBuffer errors for multiperiod streams

* Add functional test for quality switch

* Only apply changeType when the codecs are not compatible

* Revert single.json

* Add DRM no livesim functional config

* Minor config changes

* Fix a race condition when switching tracks that lead to a media source error

* Check for dash.js errors in the functional tests and solve nullpointer exception in Stream.js

* Add new token for tests

* Only trigger a NEW_TRACK_SELECTED event when mediainfo is changed

* Use minified version in karma testsuite

* Remove streams for which we do not have a valid token

* Remove streams from reference client

* Remove comments

* Use debug bundles
* WiP

* For adding new query parameters to a URL remove the dependency to the native URL() class

* Add additional unit test for checking capitalization

* Fix typo

* Fix typo

* Fix unit tests

* Add missing JSDoc
* Webpack optimizations

* Reset BOLA rule parameters after stream switch

* Resetting additional classes

* WiP: Additional memory optimisations

* Add back adaptation to Representation

* Minor edits
Migrate CI/CD jobs from CircleCI to Github actions
dsilhavy and others added 30 commits March 2, 2026 14:28
* Drop CERT_URL_LOWER_CASE constant and use case-insensitive lookup instead

* Add Apple FairPlay Streaming (FPS) DRM support

* Sort ProtectionConstants.js

* Additional refactoring

* WiP: Rework certificate logic in ProtectionController.js and work with model classes CertificateRequest.js and CertificateResponse.js. Allow adding filters

* Further refactoring of the Fairplay flow

* Catch the error in case certificate was invalid

* Remove certificate URL for clearkey from reference UI

* Change smoke vector config

* Rework verify_pull_request.yml workflow

* Checkout outside of action.yml

* Expose certificate request and response filters

* Add example for certificate wrapping

* Add Fairplay example

* Add API to query protection data

* Add missing typescript definitions

* Add missing typescript definition for certificate request and response filters

---------

Co-authored-by: Torbjörn Einarsson <torbjorn@einarssons.se>
* Claude generated reference UI - First version

* Add light mode

* Fix DRM errors

* Fix controlbar issues

* Fix controlbar issues

* Fix controlbar issues

* Fix quality change

* Use settings from Settings.js

* Fix playback ended seek bug

* Add option to increase playback rate

* Add additional color schemes

* Enable fast switching

* WiP: Commit ID

* Make new Reference UI the default one

* Add external libraries

* Reformatting

* Remove unneccessary folder

* Sync ref options with settings

* Settings changes

* Add tooltips to reference UI

* Move controlbar to contrib directory

* Fix visualization of playback rate

* Add framerate to metrics panel

* Additional metrics and controlbar changes

* Remove outdated contributor entry

* Remove custom throughput rule from reference ui

* Only rename new ref ui before merge

* Add catchup options to referenceUI

* Update list of contributors

* Add option to set server certificate URLs

* Additional changes to controlbar

* Fix thumbnail rendering

* Add missing fields to be synced from the URL parameters

* Add additional unit tests

* Add Qualabs as a contributor

* Rename current reference UI to "old" and use the new one by default

* Reuse images and fix paths

* Add link to dashjs.org
* Refactor GitHub actions

* Add comments to explain how things are merged
* make track filtering more verbose

* add missing methods to JSDoc
…ion (-185 KB) (#4970)

* refactor: replace bcp-47-normalize with lightweight BCP-47 normalization

Remove the bcp-47-normalize dependency (~185 KB minified including
transitive deps) and replace it with a ~75-line internal utility that
covers the two features dash.js actually uses: RFC 5646 case
normalization and ISO 639-2 to 639-1 conversion.

Fixes #4969

* fix: add BSD license header, use null-prototype map, update lockfile

- Add standard dash.js BSD license header to BCP47Utils.js
- Use Object.create(null) for ISO_639_2_TO_1 to prevent prototype pollution
- Regenerate package-lock.json to remove bcp-47-normalize and transitive deps

* test: add unit tests for BCP47Utils normalization

Addresses reviewer feedback from #4969 (stschr, dsilhavy):
- Case normalization per RFC 5646 §2.1.1
- ISO 639-2 to 639-1 conversion (B and T variants)
- Numeric subtag preservation (es-419, de-DE-1996)
- Prototype pollution safety (Object.create(null) guard)
- Table integrity: 202 entries, 3-letter keys, 2-letter values
…ed" error (#4929)

Wrap the auto-creation logic in a browser environment check to allow
dash.js to be imported in SSR environments like Next.js without throwing
a "window is not defined" error.

The module-level code that accesses window APIs (addEventListener,
setInterval, etc.) is now only executed when running in a browser context.

Fixes #4728
#4982)

* fix(dvb): correct off-by-one in DVBSelector weighted BaseURL selection

Remove erroneous `- 1` in random number generation that shrank the
selection range, causing the last BaseURL in a weighted group to never
be selected. With 2 equal-weight CDNs, only the first was ever picked.

Also add stub.restore() to existing DVB A168 test to prevent sinon
stub leak, and add two unit tests for equal-weight selection (2 and 3
CDNs).

Fixes #4981

* style: address Copilot review feedback

- Clarify comment: random number range is [0, totalWeight) exclusive
- Rename test: "fair distribution" → "be able to select both" (we test
  reachability, not statistical distribution)

* fix(test): use valid Math.random() return value in DVB A168 test

Replace stub.returns(1) with stub.returns(0.99) since Math.random()
returns [0, 1) exclusive. The value 1.0 masked the off-by-one bug
because it produced the same result with both formulas.
When a TTML cue has no explicit end attribute, mediaTimeEvents[i+1]
is undefined on the last iteration. undefined + offsetTime = NaN,
and startTime < NaN is always false, so the cue is silently dropped.

Use endTimeSegment (already declared, documented in JSDoc, and passed
by TextSourceBuffer) as the fallback end time for the last cue.

Fixes #4985
* npm audit fix

* Small fixes in the unit tests
* docs: rewrite AGENTS.md — gotchas-only, DRY, verifiable

Rewrites AGENTS.md from 170 lines to ~50. Removes duplicated content
(ESLint rules, FactoryMaker examples, project tree, naming conventions)
that had already drifted out of sync. Fixes inaccuracies (npm run build
pipeline, entry point exports, webpack bundle counts). Keeps only
non-derivable gotchas and a "where to look" index.

Closes #4995

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: clarify error handling — playback errors are events, API misuse throws

Addresses Copilot review feedback: MediaPlayer methods throw synchronously
on misuse (calling before initialize/attachSource, bad arguments), while
playback/runtime errors are dispatched via EventBus.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…6 KB) (#4972)

* refactor: replace ua-parser-js with lightweight browser detection

Remove the ua-parser-js dependency (~26 KB minified) and replace it
with simple regex-based detection in Utils.parseUserAgent(). dash.js
only uses this to check for Safari and Edge browser names in two
call sites.

Fixes #4971

* fix: address review feedback on ua-parser-js removal

- Fix ua parameter being ignored when provided as string
- Exclude iOS browsers (CriOS, FxiOS) from Safari detection
- Add unit tests for parseUserAgent
- Move ua-parser-js to devDependencies for functional tests

* test: add comprehensive parseUserAgent coverage

Add 7 additional tests for browser detection edge cases:
- Safari on iOS (real Safari, not CriOS/FxiOS)
- Safari on iPadOS (desktop UA since iPadOS 13)
- Edge on Android (EdgA token)
- Opera exclusion (OPR token)
- Firefox desktop (no Safari/Edge token)
- Empty string input
- Explicit null parameter (navigator fallback)

* fix: extend parseUserAgent to detect all major browsers

Address review feedback from dsilhavy: Chrome and Firefox were returning
empty string instead of their browser name. Reorder detection cascade
(edge → opera → chrome → firefox → safari) so the most specific tokens
match first, removing the need for Safari exclusion regexes.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ing runtime (#4997)

* Dynamically read out request timeout in case settings are updated during runtime

* Add an additional test to validate timeouts are updated
* enable RegEx for Exceptions

* move local RegEx into Constants

* fixing regression issue with MapNode exceptions

* move code into sub-function

* rename some variables

* remove merge flag form MapNode

* enable RegEx for Exceptions

* move code into sub-function

* rename some variables

* remove merge flag form MapNode

* - reestablish new file lost
- remove duplicated code
while merging

* Revert changes to clean history

* add one unit test for an example of a DASH XML element that can be present only once

* rename variables to improve intelligibility of their semantics

* implement merging of attributes for non-array Nodes per DASH spec

* add type check prior to merging values
…5007)

ua-parser-js was replaced in src/ by a lightweight browser detection in
#4972 but the dependency itself was not removed. The only remaining
active usage was in test/functional/src/Utils.js, which now uses
CoreUtils.parseUserAgent() from src/core/Utils.js.

Also removes commented-out ua-parser-js imports in the Capabilities
unit test.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* npm audit fix

* npm audit fix
* abort retrieve manifest requests when tearing down

* Hold a function to clear the retrieveManifest loader on reset/finish

* Guard against retrieveManifest callback being missing

---------

Co-authored-by: Coel Aspey <68205939+terminal-overflow@users.noreply.github.com>
…ions (#4983)

* Add a setting blacklistExpiryTime to allow baseUrls to be returned to after a failure; refactor ContentSteering TTL to use blacklistController expiry

* Change blacklist controller to take enableExpiry flag, only enable it for BaseURL blacklist

* Amend comment on blacklistExpiryTime setting

* Make BlacklistController pull the ContentSteering ttl direct from the controller so it picks up a 429 response ttl

* Fix reading the retry-after header on the content steering 429 response

* Explicitly set enableExpiry to false for BlacklistController
* Feature MPD  update on validity expiration (#68)

* Revert "Feature MPD  update on validity expiration (#68)"

This reverts commit bf31094.

* feat: implement CMCD v2 functionality

* event mode with body transmission mode only

* remove url encode from body transmission mode

* add editable configs to cmcd sample page

* add src input to cmcd v2 sample page

* create provider for CMCDParameters lazy loading

* chore: CMCDv2 migration to CMCD Reporter (#159)

* cmcd reporter initialization

* request mode migration

* event mode migration

* cmcd model migration

* fix cmcd model unit tests

* fixes for cmcd parameters and cleanup -
protection controller fixes WIP

* cleanup and update unit tests

* refactor unit tests and fixes

* fix unit tests and remove batchTimer

* Cmcdv2: keys compliance check (#160)

* ab, lab and tab inner list and request mode

* ab, tab and lab inner list for v2

* bl inner list and event mode

* br inner list and event mode

* toInnerList helper

* bsd inner list

* mtp inner list and event mode

* nor inner list

* pb inner list and event mode

* tp inner list and event mode

* tpb inner list and event mode

* fix unit tests

* feat: update CML dependencies

* fix race condition on cmcd contrller for cmcd parameters

* Feature/cmcdv2 update (#162)

* chore: update CML dependencies

* fix: update common media request

* fix: update resourceTiming properties to use performance.now()

* fix: update cmcd data formatting

* fix: remove redundant rr values

* refactor: simplify cmcd reporting

* fix: test mock requests missing parameters

* chore: update cml cmcd version

* should not send report if events are undefined

* fix unit tests

---------

Co-authored-by: cotid-qualabs <constanzad@qualabs.com>

* feat/cmcd-v2-request-validation (#163)

* feat: add CMCD v2 Playwright E2E tests with spec validation

Adds comprehensive E2E tests using Playwright to validate CMCD v2 payloads
at the network level during real playback. Uses @svta/cml-cmcd validation
functions (validateCmcd, validateCmcdHeaders, validateCmcdEvent, validateCmcdKeys)
for spec-level compliance checks across query, header, and event modes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: replace Playwright E2E tests with Karma functional tests for CMCD v2

Replace the Playwright-based E2E test suite with Karma functional tests
that use XHR interceptors to validate CMCD v2 spec compliance. This
eliminates the @playwright/test dependency (~100MB) while maintaining
full test coverage across all three transmission modes (query, header,
event), key filtering, and version validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: remove double parsing from CMCD v2 tests

CmcdRequestCollector now stores raw CMCD strings instead of pre-parsed
objects, removing its dependency on @svta/cml-cmcd entirely. Tests use
validation function return values (result.data) for both spec validation
and data assertions in a single pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update cml packages

* fix: add logging to xhr collector

* refactor: use unified collector and validateCmcdRequest for CMCD v2 tests

Rewrite CmcdRequestCollector with a single requests array storing
httpRequest objects compatible with CML's validateCmcdRequest(). Replace
mode-specific validators (validateCmcd, validateCmcdHeaders) with the
unified validateCmcdRequest() and remove the invalid validateCmcdKeys
test that was passing a string to a function expecting a parsed object.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update CMCD version

* Dedicated sample section for CMCD

* Use headers transmission mode string from CML

* Align CMCD v2 config naming with CML spec

Rename targets->eventTargets, timeInterval->interval, includeOnRequests->
includeInRequests across settings, samples, and tests. Switch event
validation to validateCmcdEvents (batch). HTTPLoader now accepts empty
POST bodies so CMCD event endpoints don't trigger retries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: update cml versions

* Catch errors in recordResponseReceived

* Fix wrong URLs in CMCD demos

* Small refactoring in DashManifestModel.js

* Minor refactoring

* Cleanup all events in CmcdController.js when resetting

* Refactor CustomParametersModel.js

* Add CMCD version to reference UI

* Small refactoring in CmcdModel.js

* Add link to sample setion in reference UI

* Add missing CMCD fields to JSDoc in Settings.js

* Add include in requests CMCD field to reference UI

* Add a warning when catching an error in the CmcdController.js

* Add a simple express.js server that the local CMCD demos can report against

* Refactoring of CMCD demo and classes

* Additional CMCD refactoring

* fix: update CML dependencies to address missing CMCD nor values

* Check for CMCD enabled directly for each request

* Function renaming for CMCD

* Rework the CMCD samples

* Fix unit tests

* Adjust samples

* Fix linting issues

* Rename context to dataContext for clarity

* Fix wrong use of this instead of instance

* Reset _isSeeking and remove wrong payload for getGenericCmcdData

* Remove duplicate entries in HTTPRequest.js

* Do not execute CMCD tests when no init segment was identified

* Avoid error when representationController is not defined in _onDataUpdateCompleted

---------

Co-authored-by: Sebastian Piquerez <89274285+sebastianpiq@users.noreply.github.com>
Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Daniel Silhavy <daniel.silhavy@fokus.fraunhofer.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.