DASH JS with live streaming support
A set of new features have been introduced.
URL templates for media segments
The segments’ address URLs can be signaled using a template scheme (see section 18.104.22.168.4 Template-based Segment URL construction in the standard), thus the client does not need to fetch a new MPD at regular intervals (e.g. in the segment name template seg_$Number%03$.m4s the identifier $Number%03 is substituted with the number of the corresponding segment, using three digits).
In a live stream the MPD specifies the availabilityStartTime of the media segments, i.e. the anchor for the computation of the earliest availability time (in UTC) for any segment in the media presentation
The live client identifies the number of the current segment (the first segment that must be requested to the server) computing the difference between the current time and the stream availabilityStartTime divided by the duration of a segment
New segment probing
In a live stream not all the media segments are present since the beginning, they are produced by the server at regular intervals, thus if the client does not find a segment at a given time it does not necessarily mean that the live stream is endend and it must probe again
An additional timeline is created in order to show the current playout position with respect to the live event start time and allow the user to seek to a previous time instant or to seek in the range of the already produced media segments
Interested readers can found additional details on the implementation on the (under construction) live DASH-JS description page.
Thanks to Giuseppe Longo for the initial development of the live support on DASH-JS LIVE.