How to use the mpd-parser.parseUTCTiming function in mpd-parser

To help you get started, we’ve selected a few mpd-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github videojs / http-streaming / src / dash-playlist-loader.js View on Github external
syncClientServerClock_(done) {
    const utcTiming = parseUTCTiming(this.masterXml_);

    // No UTCTiming element found in the mpd. Use Date header from mpd request as the
    // server clock
    if (utcTiming === null) {
      this.clientOffset_ = this.masterLoaded_ - Date.now();
      return done();
    }

    if (utcTiming.method === 'DIRECT') {
      this.clientOffset_ = utcTiming.value - Date.now();
      return done();
    }

    this.request = this.hls_.xhr({
      uri: resolveUrl(this.srcUrl, utcTiming.value),
      method: utcTiming.method,

mpd-parser

mpd parser

Apache-2.0
Latest version published 5 months ago

Package Health Score

79 / 100
Full package analysis

Popular mpd-parser functions