Skip to main content
Skip table of contents

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.

Retries in this case are as if a 404 was received. The number of retries is limited and will apply the existing adaptive bitrate selection algorithm, which considers buffered levels and download speed history.

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.

JS
const playerInstance = otvplayer(
	"videoPlayer",
	{
		plugins: {
			otvtoolkit: {}
		}
	},
	() => {
		playerInstance.src({
			src: "https://....",
			type: "application/dash+xml",
			token: "eyJra...",
			vodSegmentTimeout: 2,
			liveSegmentTimeout: 2
		});
	}
);

Omitting the liveSegmentTimeout or vodSegmentTimeout values will default to 150% segment duration of Live streams and 500% of VOD streams respectively.



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.