a2ff61a5 by David LaPalomento

Trim attribute list key-value pairs

It's not valid according to the spec, but bipbop has whitespace after the commas in its key-value pair lists. Strip leading and trailing whitespace before splitting the key and value when parsing now. Update one of the manifests to use the bad format. Add differentiated media playlists.
1 parent 50efd48c
......@@ -16,6 +16,8 @@
attr;
while (i--) {
attr = attrs[i].split('=');
attr[0] = attr[0].replace(/^\s+|\s+$/g, '');
attr[1] = attr[1].replace(/^\s+|\s+$/g, '');
result[attr[0]] = attr[1];
}
return result;
......
......@@ -16,7 +16,7 @@
"PROGRAM-ID": 1,
"BANDWIDTH": 40000
},
"uri": "media.m3u8"
"uri": "media1.m3u8"
}, {
"attributes": {
"PROGRAM-ID": 1,
......@@ -26,7 +26,7 @@
"height": 224
}
},
"uri": "media.m3u8"
"uri": "media2.m3u8"
}, {
"attributes": {
"PROGRAM-ID": 1,
......@@ -36,6 +36,6 @@
"height": 540
}
},
"uri": "media.m3u8"
"uri": "media3.m3u8"
}]
}
......
......@@ -2,9 +2,9 @@
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000,RESOLUTION=396x224
media.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=40000
media.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=40000
media1.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=440000,RESOLUTION=396x224
media.m3u8
media2.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1928000,RESOLUTION=960x540
media.m3u8
media3.m3u8
......
#EXTM3U
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:10
#EXTINF:10,
00001.ts
#EXTINF:10,
00002.ts
#EXTINF:10,
00003.ts
#EXTINF:10,
00004.ts
#ZEN-TOTAL-DURATION:57.9911
#EXT-X-ENDLIST
#EXTM3U
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:10
#EXTINF:10,
00001.ts
#EXTINF:10,
00002.ts
#EXTINF:10,
00003.ts
#EXTINF:10,
00004.ts
#ZEN-TOTAL-DURATION:57.9911
#EXT-X-ENDLIST