81c90a70 by Lee Whitaker

Use handelbars to make templates for the manifest files. Add tests for media_se…

…quence, playlist_type, and target_duration.
1 parent 975a1b5e
window.playlist_media_sequence_template = '#EXTM3U\n'+
'#EXT-X-PLAYLIST-TYPE:VOD\n'+
'{{#if mediaSequence}}#EXT-X-MEDIA-SEQUENCE:{{{mediaSequence}}}{{/if}}\n'+
'{{#if mediaSequence2}}#EXT-X-MEDIA-SEQUENCE:{{{mediaSequence2}}}{{/if}}\n'+
'#EXT-X-ALLOW-CACHE:YES\n'+
'#EXT-X-TARGETDURATION:8\n'+
'#EXTINF:6.640,{}\n'+
'/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts\n'+
'#EXTINF:6.080,{}\n'+
'/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts\n'+
'#EXTINF:6.600,{}\n'+
'/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts\n'+
'#EXTINF:5.000,{}\n'+
'/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts\n'+
'#EXT-X-ENDLIST'
window.playlist_target_duration_template = '#EXTM3U\n'+
'#EXT-X-PLAYLIST-TYPE:VOD\n'+
'#EXT-X-MEDIA-SEQUENCE:0\n'+
'#EXT-X-ALLOW-CACHE:YES\n'+
'{{#if targetDuration}}#EXT-X-TARGETDURATION:{{{targetDuration}}}{{/if}}\n'+
'#EXTINF:6.640,{}\n'+
'/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts\n'+
'#EXTINF:6.080,{}\n'+
'/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts\n'+
'#EXTINF:6.600,{}\n'+
'/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts\n'+
'#EXTINF:5.000,{}\n'+
'/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts\n'+
'#EXT-X-ENDLIST'
window.playlist_type_template = '#EXTM3U\n' +
'{{#if playlistType}}#EXT-X-PLAYLIST-TYPE:{{{playlistType}}}{{/if}}\n' +
'#EXT-X-TARGETDURATION:10\n' +
'#EXTINF:10,\n' +
'/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts\n' +
'#EXTINF:10,\n' +
'/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts\n' +
'#EXTINF:10,\n' +
'/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts\n' +
'#EXTINF:10,\n' +
'/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts\n' +
'#EXTINF:10,\n' +
'/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts\n' +
'#EXTINF:8,\n' +
'/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts\n' +
'#ZEN-TOTAL-DURATION:57.9911\n' +
'#EXT-X-ENDLIST';
......@@ -7,6 +7,9 @@
<link rel="stylesheet" href="../libs/qunit/qunit.css" media="screen">
<script src="../libs/qunit/qunit.js"></script>
<!-- handlebars.js -->
<script src="../libs/handlebars/handlebars-v1.1.2.js"></script>
<!-- video.js -->
<script src="../node_modules/video.js/video.dev.js"></script>
......@@ -26,6 +29,9 @@
<!-- M3U8 TEST DATA -->
<script src="manifest/playlistM3U8data.js"></script>
<script src="manifest/brightcove_playlist_m3u8.js"></script>
<script src="manifest/playlist_type_template.js"></script>
<script src="manifest/playlist_media_sequence_template.js"></script>
<script src="manifest/playlist_target_duration_template.js"></script>
<!-- M3U8 -->
<!-- SEGMENT -->
<script src="tsSegment-bc.js"></script>
......