Q:

how to implement mpeg-dash live playlist?

i'm implementing mpeg-dash video server for live streams,
chunking stream and adding chunks to mpd - works, see example
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" type="Live" availabilityStartTime="2015-07-09T15:10:46.775640Z" minimumUpdatePeriod="PT10.0S" timeShiftBufferDepth="PT1.0M" maxSegmentDuration="PT20.0S" minBufferTime="PT1.0S" profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264,urn:hbbtv:dash:profile:isoff-live:2012">
<Period id="1" start="PT0S">
<AdaptationSet group="1" mimeType="video/mp4" segmentAlignment="true" maxWidth="640" maxHeight="480" startWithSAP="1">
<SegmentTemplate timescale="1000" media="$RepresentationID$/$Time$.m4v" initialization="$RepresentationID$/init.vmoov">
<SegmentTimeline>
<S t="625" d="11000"/>
<S t="11625" d="12000"/>
<S t="23625" d="7200"/>
<S t="30825" d="9800"/>
<S t="40625" d="10760"/>
<S t="51385" d="10520"/>
<S t="61905" d="11640"/>
<S t="73545" d="9160"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="ad/a" codecs="avc1.4D401E" width="640" height="480" frameRate="25" bandwidth="1000000"></Representation>
</AdaptationSet>
<AdaptationSet group="2" mimeType="audio/mp4" segmentAlignment="true">
<SegmentTemplate timescale="1000" media="$RepresentationID$/$Time$.m4a" initialization="$RepresentationID$/init.amoov">
<SegmentTimeline>
<S t="721" d="10922"/>
<S t="11643" d="11990"/>
<S t="23633" d="7210"/>
<S t="30843" d="9792"/>
<S t="40635" d="10752"/>
<S t="51387" d="10539"/>
<S t="61926" d="11627"/>
<S t="73553" d="9173"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="ad/a" codecs="mp4a.40.02" audioSamplingRate="48000" bandwidth="66750"></Representation>
</AdaptationSet>
</Period>
</MPD>

but when i try to implement sliding playlist
(e.g. there will be 5 chunks, new chunk will replace old one.
currently i just print updated SegmentTimeline without changing any other value.)
player stops playing after .mpd refresh.
segments times - are actual timeline of stream. (i.e. same as in .m4* files)
What attributes/elements i need to implement for live video with sliding playlist?

A:

Updating the timeline is fine, nothing else is necessary.
According the MPEG-DASH standard, the attribute "type" in the MPD element may only be set to "static" (i.e. VoD content) or "dynamic" (for live streams). 
Setting it to "Live" results in an invalid manifest file and players such as the Bitmovin player or dash.js will either use "static" (as it is the default value) or they won't recognize it at all.
The audio codec should not have leading zeros, i.e. instead of "mp4a.40.02" you should use "mp4a.40.2".
There are already DASH live stream servers available, e.g. using NGINX with nginx-rtmp-module, so you can check out what they are doing, too.

