Live content with period start != 0 doesn't play
Created by: TobbeMobiTV
As part of work towards multiple periods for live, I've extended my livesimulator server with an option to add a period that starts after the AST. The MPD is http://54.201.151.65/livesim/periods_0/testpic_2s/Manifest.mpd
It doesn't play in the refactoring branch, due to that the presentationTime is calculated with respect to periodStart, while the timing is wrt to AST.
Changing calcMSETimeOffset in TimelineConverter.js in the following way fixes the problem and makes the content playable.
calcMSETimeOffset = function (representation) {
+ // The MSEOffset is offset from AST for media. It is Period@start - presentationTimeOffset
var presentationOffset = representation.presentationTimeOffset;
-
- return (-presentationOffset);
+ var periodStart = representation.adaptation.period.start;
+ return (periodStart - presentationOffset);
},
The same patch applies to the development branch, and I believe it is a proper correction for VoD as well. Haven't tested that, though. I can make a pull request for this fix, if it is regarded good.