videojs / mpd-parser

https://videojs.github.io/mpd-parser/
Other
79 stars 54 forks source link

feat: add EventStream support #170

Closed adrums86 closed 1 year ago

adrums86 commented 1 year ago

Feature Added

EventStream tag support

Timed metadata can be embedded in the DASH manifest with <EventStream> tags at the <Period> level. Each EventStream contains <Event> tags that represent each node of timed metadata. This pull request adds support for parsing EventStream and child Event tags and properties and returns a flattened collection of Event-like objects with the following properties:

{
  end: number,
  id: string,
  messageData: string,
  schemeIdUri: string,
  start: number,
  value: string,
  contentEncoding: string,
  presentationTimeOffset: number
}

This implementation is based off of https://dashif-documents.azurewebsites.net/Events/master/event.html#mpd-event-timing which is from the DASH spec ISO_IEC_23009 section 5.10.2.1.

codecov[bot] commented 1 year ago

Codecov Report

Merging #170 (bee48f1) into main (3fc0486) will increase coverage by 0.10%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #170      +/-   ##
==========================================
+ Coverage   94.46%   94.57%   +0.10%     
==========================================
  Files          19       19              
  Lines         795      811      +16     
  Branches      241      246       +5     
==========================================
+ Hits          751      767      +16     
  Misses         44       44              
Impacted Files Coverage Δ
src/index.js 85.71% <ø> (ø)
src/inheritAttributes.js 97.54% <100.00%> (+0.19%) :arrow_up:
src/parseAttributes.js 100.00% <100.00%> (ø)
src/toM3u8.js 98.78% <100.00%> (+0.01%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more