DASH segment download resiliency
Network issues may affect the timely retrieval of DASH stream segments. The CONNECT Player SDK for Browsers/ConnectedTV allows for adjustments in the resiliency of downloading of segments. A configurable timeout on segment download enables you to apply a multiplication factor to the rendered length of the segment. Segment downloads that fail to complete within this time will be retried.
Example code
As the segment length is likely to vary between Live and VOD streams, it may be desirable to use different settings on a stream by stream basis. The configuration can optionally be set on a per-stream basis by setting the flag(s) at the same time as passing the URL, MIME-type and token in the loaded callback.
The example below ensures that two-second long segments will be allowed 200% of their segment length (four seconds) to complete their download.
const playerInstance = otvplayer(
"videoPlayer",
{
plugins: {
otvtoolkit: {}
}
},
() => {
playerInstance.src({
src: "https://....",
type: "application/dash+xml",
token: "eyJra...",
vodSegmentTimeout: 2,
liveSegmentTimeout: 2
});
}
);
liveSegmentTimeout
or vodSegmentTimeout
values will default to 150% segment duration of Live streams and 500% of VOD streams respectively.