Dash-Industry-Forum / livesim2

DASH Live Source Simulator v2 in Go
Other
36 stars 6 forks source link

Parsing UTC timing response fails #147

Closed dsilhavy closed 8 months ago

dsilhavy commented 8 months ago

The UTCTiming element in the livesim2 streams currently points to this URL: https://time.akamai.com/?ms. It uses a schemeIdUri set to urn:mpeg:dash:utc:http-xsdate:2014.

This combination leads to parsing errors in dash.js and the Shaka player. I think the correct URL for the schmeIdUri defined above is this one: https://time.akamai.com/?iso&ms

Example MPD: https://livesim2.dashif.org/livesim2/testpic_2s/Manifest.mpd

tobbee commented 8 months ago

I thought the ISO in the URL meant that the format was iso format, so I have the table:

const (
    UtcTimingDirect       UTCTimingMethod = "direct"
    UtcTimingHead         UTCTimingMethod = "head"
    UtcTimingNtp          UTCTimingMethod = "ntp"
    UtcTimingSntp         UTCTimingMethod = "sntp"
    UtcTimingHttpXSDate   UTCTimingMethod = "httpxsdate"
    UtcTimingHttpXSDateMs UTCTimingMethod = "httpxsdatems"
    UtcTimingHttpISO      UTCTimingMethod = "httpiso"
    UtcTimingHttpISOMs    UTCTimingMethod = "httpisoms"
    UtcTimingNone         UTCTimingMethod = "none"
    UtcTimingKeep         UTCTimingMethod = "keep"
)

const (
    UtcTimingNtpServer          = "1.de.pool.ntp.org"
    UtcTimingSntpServer         = "time.kfki.hu"
    UtcTimingXSDateHttpServer   = "https://time.akamai.com"
    UtcTimingXSDateHttpServerMS = "https://time.akamai.com/?ms"
    UtcTimingISOHttpServer      = "https://time.akamai.com/?iso"
    UtcTimingISOHttpServerMS    = "https://time.akamai.com/?iso&ms"
    UtcTimingHeadAsset          = "/static/time.txt"
)

Should the xsdate and iso formats be swapped?

tobbee commented 8 months ago

Reading the specs, I cannot see that there is any real difference between the xsdate and iso formats, so I will make them both point to the ?iso URL variants.

tobbee commented 8 months ago

The fix in #148 has been merged into v1.1.1 and published on https://livesim2.dashif.org