-
Notifications
You must be signed in to change notification settings - Fork 6
PublishTime
The publishTime
element at the MPD level is often used as a version control of a
dynamic MPD. In particular, in some use cases, like
inband signaling of MPD updates
and MPD Patch
, a PublishTime values
are compared to discover a change of MPD change.
In a traditional origin server that continously generates an updated MPD every time a new segment is generated this is straight-forward to achieve.
In livesim2
there is no such continuous process, but all manifests and segments
are generated on the fly. There is also the possibility to change the relevant
time by adding the ?nowMS=....
parameter in any URL. For that reason, livesim2
calculates a publishTime on any MPD request based on when the last change
was done. For an MPD using SegmentTemplate with $Number$
this is typically
the availabilityStartTime
, or or the start of an added period.
The case of SegmentTimeline
is more complex. The algorithm used here is to
look at the availabilityTime of the last segment in the Manifest and use
that to define the publishTime. In case of a non-zero availabilityTimeOffset
value,
the publishTime is shifted with the same amount to signal that the last segment in
the MPD is available that same amount earlier than its end time.
The publishTime value is cropped to millisecond accuracy with trailing zeroes suppressed.