diff --git a/src/dash.js b/src/dash.js
index 7d2ee4c5..10a4f2c1 100644
--- a/src/dash.js
+++ b/src/dash.js
@@ -160,15 +160,28 @@ function _getStreamRepresentation(stream)
.replace(/&/g, '/')
.replace(/=/g, '/');
- const segRange = `${stream.indexRange.start}-${stream.indexRange.end}`;
- const initRange = `${stream.initRange.start}-${stream.initRange.end}`;
+ repArr.push(
+ ` ${encodedURL}`
+ );
+
+ if(stream.indexRange) {
+ const segRange = `${stream.indexRange.start}-${stream.indexRange.end}`;
+ repArr.push(
+ ` `
+ );
+ if(stream.initRange) {
+ const initRange = `${stream.initRange.start}-${stream.initRange.end}`;
+ repArr.push(
+ ` `
+ );
+ }
+ repArr.push(
+ ` `
+ );
+ }
repArr.push(
- ` ${encodedURL}`,
- ` `,
- ` `,
- ` `,
- ` `,
+ ` `
);
return repArr.join('\n');