-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BADGERS-177 Use UTCTiming
for wall-clock time
#299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a comment on documentation, also can't help but note that the Promises in src/manifest/manifestloader.js
are very similar, could these be collapsed into a function to be more DRY?
I did think about that but was unsure whether to port our LoadUrlAsync wrapper to another place. But tbf I can introduce a simple wrapper in the manifestloader. TV module network rewrite when 😭 |
☝️@ShiningTrapez On this I looked over again and not worth collapsing IMO. A wrapper wouldn't help in terms of performance or readability because each function interacts with LoadUrl slightly differently. That variation would end up in the promise chain instead. |
* BADGERS-177 Use `UTCTiming` for wall-clock time (#299) * wip: commit to test upgrading jest * chore: upgrade jest to v29 * test: missing timing resource * fix: hls tests * feat: promisify manifest loader * chore: remove redundant placeholders * test: make MediaSources tests handle promisified manifest loader * feat: return promise from loadManifest * fix: triple load bug * fix: don't provide wallclock time on failover or refresh * feat: log error in dev client * feat: let DebugTool take error objects * feat: log manifest load failure * chore: remove unused vars * docs: reference source * fix: handle load failures with no cause given * feat: add warn method and fix error method * chore: add deprecation note to server date * doc: deprecate server date * fix: move jsdom to dev dependencies * refactor: async/await tests * docs: expand documentation * fix: boolean logic * fix: export mutable * fix: use absolute time to seek sliding window in a failover * chore: remove comment * BADGERS-177 Failover with MPD times in MSE strategy (#302) * style: make magic numbers in tests variables * refactor: optimise manifest regex * test: url with query param
📺 What
Get wall-clock time from the
<UTCTiming>
element present in dynamic DASH manifests.If
serverDate
is passed into bigscreen-player oninit
that timing will be used to derive times from the first manifest only. If a new manifest is fetched, or the current manifest is refreshed, then wall-clock time will be derived from<UTCTiming>
.Note:
badgers-177
, notmaster
. I've chunked the ticket into two PRs to make reviews easier.timeCorrectionSeconds
not being updated on failover/refresh (closure bug).🛠 How
Fetches and parses wall-clock time from the timing resource defined by the
<UTCTiming>
element on the manifest.Along the way:
mediasources
to fix tests. Fixed a bug that caused the manifest to be loaded and parsed twice if it failed over whenloadManifest
was called.DebugTool
so it formats errors correctlywarn
method toDebugTool
to log a deprecation notice.