Skip to content

Conversation

@cotid-qualabs
Copy link

This pull request implements and demonstrates the handling of MPD update events (specifically value 3) as defined by the DASH standard, allowing for in-band signaling to update the manifest. It introduces new events, enhances manifest loading and event processing, and adds a new sample and comprehensive unit tests for the feature.

Highlights

  • MPD Update Event Handling: This pull request introduces functionality to handle MPD update events signaled via in-band DASH events. Specifically, it implements the processing for events with schemeIdUri urn:mpeg:dash:event:2012 and value 3, which indicates a manifest update.
  • Manifest Parsing and Update Mechanism: A new MPD_EXPIRE_UPDATE event has been added to the core events. The ManifestLoader now listens for this event and re-parses the manifest XML provided within the event, effectively updating the current manifest. The MediaPlayer now passes the manifestModel to the ManifestLoader to facilitate this process.
  • Enhanced Event Controller Logic: The EventController has been updated to differentiate between various MPD_VALIDITY_EXPIRATION event values: 1 for reload, 2 for patch, and 3 for update. For value 3 events, it extracts the new manifest XML from the event's message data and triggers the MPD_EXPIRE_UPDATE event. A placeholder _patchManifest function is included for value 2 events, noting that patching is not yet supported. The MANIFEST_VALIDITY_CHANGED event now includes an inbandEvent flag.
  • Dynamic Manifest Refresh Control: The ManifestUpdater now incorporates logic to disable automatic manifest refreshing if an in-band event (specifically one with a minimumUpdatePeriod of 0) triggers a manifest validity change, preventing redundant or conflicting manifest updates.
  • Message Data Parsing and New Sample: The DashAdapter now parses messageData for non-ID3 events into a UTF-8 string, making the content accessible for manifest updates. New constants for MPD_VALIDITY_EXPIRATION values (RELOAD, PATCH, UPDATE) have been added. A new HTML sample (samples/mpd-event/mpd-update-event.html) has been added to demonstrate this feature, along with corresponding updates to samples/samples.json.
  • Unit Test Coverage: New unit tests have been added for ManifestLoader and EventController to ensure proper functioning of the new manifest update logic and event handling. DashAdapter tests were also updated to cover the parsing of parsedMessageData for non-ID3 events.

@dsilhavy dsilhavy added this to the 5.2.0 milestone Oct 10, 2025
@dsilhavy dsilhavy self-requested a review October 13, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants