@@ -568,8 +568,11 @@ Mss.dependencies.MssParser = function() {
568568 var isLive = this . domParser . getAttributeValue ( smoothNode , 'IsLive' ) ;
569569 mpd . type = ( isLive !== null && isLive . toLowerCase ( ) === 'true' ) ? 'dynamic' : 'static' ;
570570 var canSeek = this . domParser . getAttributeValue ( smoothNode , 'CanSeek' ) ;
571- mpd . canSeek = ( canSeek !== null && canSeek . toLowerCase ( ) === 'true' ) ;
572- mpd . timeShiftBufferDepth = parseFloat ( this . domParser . getAttributeValue ( smoothNode , 'DVRWindowLength' ) ) / mpd . timescale ;
571+ //mpd.canSeek = (canSeek !== null && canSeek.toLowerCase() === 'true');
572+ var dvrWindowLength = parseFloat ( this . domParser . getAttributeValue ( smoothNode , 'DVRWindowLength' ) ) ;
573+ if ( dvrWindowLength === 0 && canSeek !== null && canSeek . toLowerCase ( ) === 'true' )
574+ dvrWindowLength = Infinity ;
575+ mpd . timeShiftBufferDepth = dvrWindowLength / mpd . timescale ;
573576 var duration = parseFloat ( this . domParser . getAttributeValue ( smoothNode , 'Duration' ) ) ;
574577
575578 // If live manifest with Duration, we consider it as a start-over manifest
@@ -587,7 +590,7 @@ Mss.dependencies.MssParser = function() {
587590 mpd . minBufferTime = MediaPlayer . dependencies . BufferExtensions . DEFAULT_MIN_BUFFER_TIME ;
588591
589592 // In case of live streams, set availabilityStartTime property according to DVRWindowLength
590- if ( mpd . type === "dynamic" ) {
593+ if ( mpd . type === "dynamic" && mpd . timeShiftBufferDepth < Infinity ) {
591594 mpd . availabilityStartTime = new Date ( manifestLoadedTime . getTime ( ) - ( mpd . timeShiftBufferDepth * 1000 ) ) ;
592595 }
593596
@@ -649,8 +652,12 @@ Mss.dependencies.MssParser = function() {
649652 }
650653
651654 if ( mpd . type === "dynamic" ) {
655+ // set availabilityStartTime for infinite DVR Window from segment timeline duration
656+ if ( mpd . timeShiftBufferDepth === Infinity )
657+ mpd . availabilityStartTime = new Date ( manifestLoadedTime . getTime ( ) - ( adaptations [ 1 ] . SegmentTemplate . SegmentTimeline . duration * 1000 ) ) ;
652658 // Match timeShiftBufferDepth to video segment timeline duration
653659 if ( mpd . timeShiftBufferDepth > 0 &&
660+ mpd . timeShiftBufferDepth !== Infinity &&
654661 adaptations [ i ] . contentType === 'video' &&
655662 mpd . timeShiftBufferDepth > adaptations [ i ] . SegmentTemplate . SegmentTimeline . duration ) {
656663 mpd . timeShiftBufferDepth = adaptations [ i ] . SegmentTemplate . SegmentTimeline . duration ;
0 commit comments