-
Notifications
You must be signed in to change notification settings - Fork 1.7k
UTCTiming Clock synchronization
During playback of dynamic presentations, a wall wall clock is used as the timing reference for DASH client decisions. This is a synchronized clock shared by the DASH client and service [1].
It is critical to synchronize the clocks of the DASH client and service when using a dynamic presentation because the MPD timeline of a dynamic presentation is mapped to wall clock time and many playback decisions are clock driven and assume a common understanding of time by the DASH client and service [1].
Clock synchronization mechanisms are described by UTCTiming elements in the MPD ([DASH] 5.8.4.11) [1].
For further information please check the References [1] and [2].
dash.js supports multiple schemeIdUri and value combinations for clock synchronization:
'urn:mpeg:dash:utc:http-head:2014': _httpHeadHandler,
'urn:mpeg:dash:utc:http-xsdate:2014': _httpHandler.bind(null, _xsdatetimeDecoder),
'urn:mpeg:dash:utc:http-iso:2014': _httpHandler.bind(null, _iso8601Decoder),
'urn:mpeg:dash:utc:direct:2014': _directHandler,
// some specs referencing early ISO23009-1 drafts incorrectly use
// 2012 in the URI, rather than 2014. support these for now.
'urn:mpeg:dash:utc:http-head:2012': _httpHeadHandler,
'urn:mpeg:dash:utc:http-xsdate:2012': _httpHandler.bind(null, _xsdatetimeDecoder),
'urn:mpeg:dash:utc:http-iso:2012': _httpHandler.bind(null, _iso8601Decoder),
'urn:mpeg:dash:utc:direct:2012': _directHandler,
The default timing source in dash.js uses the following schemeIdUri/value combination:
defaultTimingSource: {
scheme: 'urn:mpeg:dash:utc:http-xsdate:2014',
value: 'http://time.akamai.com/?iso&ms'
}
UTCTiming
elements in the MPD take precedence over the default timing source specified in the settings.
By default, dash.js performs a clock synchronization at playback start and after each MPD update.
At playback start an initial request to the timing server is issued. The offset between the client and the server clock is calculated as described in Section Offset calculation.
In addition, dash.js performs a predefined number of background requests to verify the initially calculated offset. The number of background attempts can be adjusted in the settings:
player.updateSettings({
streaming: {
utcSynchronization: {
backgroundAttempts: 2
}
}
})
For further details on background synchronization check the Section Background synchronization