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
1 window.playlist_media_sequence_template = '#EXTM3U\n'+
2 '#EXT-X-PLAYLIST-TYPE:VOD\n'+
3 '{{#if mediaSequence}}#EXT-X-MEDIA-SEQUENCE:{{{mediaSequence}}}{{/if}}\n'+
4 '{{#if mediaSequence2}}#EXT-X-MEDIA-SEQUENCE:{{{mediaSequence2}}}{{/if}}\n'+
5 '#EXT-X-ALLOW-CACHE:YES\n'+
6 '#EXT-X-TARGETDURATION:8\n'+
7 '#EXTINF:6.640,{}\n'+
8 '/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts\n'+
9 '#EXTINF:6.080,{}\n'+
10 '/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts\n'+
11 '#EXTINF:6.600,{}\n'+
12 '/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts\n'+
13 '#EXTINF:5.000,{}\n'+
14 '/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts\n'+
15 '#EXT-X-ENDLIST'
1 window.playlist_target_duration_template = '#EXTM3U\n'+
2 '#EXT-X-PLAYLIST-TYPE:VOD\n'+
3 '#EXT-X-MEDIA-SEQUENCE:0\n'+
4 '#EXT-X-ALLOW-CACHE:YES\n'+
5 '{{#if targetDuration}}#EXT-X-TARGETDURATION:{{{targetDuration}}}{{/if}}\n'+
6 '#EXTINF:6.640,{}\n'+
7 '/test/ts-files/tvy7/8a5e2822668b5370f4eb1438b2564fb7ab12ffe1-hi720.ts\n'+
8 '#EXTINF:6.080,{}\n'+
9 '/test/ts-files/tvy7/56be1cef869a1c0cc8e38864ad1add17d187f051-hi720.ts\n'+
10 '#EXTINF:6.600,{}\n'+
11 '/test/ts-files/tvy7/549c8c77f55f049741a06596e5c1e01dacaa46d0-hi720.ts\n'+
12 '#EXTINF:5.000,{}\n'+
13 '/test/ts-files/tvy7/6cfa378684ffeb1c455a64dae6c103290a1f53d4-hi720.ts\n'+
14 '#EXT-X-ENDLIST'
1 window.playlist_type_template = '#EXTM3U\n' +
2 '{{#if playlistType}}#EXT-X-PLAYLIST-TYPE:{{{playlistType}}}{{/if}}\n' +
3 '#EXT-X-TARGETDURATION:10\n' +
4 '#EXTINF:10,\n' +
5 '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00001.ts\n' +
6 '#EXTINF:10,\n' +
7 '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00002.ts\n' +
8 '#EXTINF:10,\n' +
9 '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00003.ts\n' +
10 '#EXTINF:10,\n' +
11 '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00004.ts\n' +
12 '#EXTINF:10,\n' +
13 '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts\n' +
14 '#EXTINF:8,\n' +
15 '/test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts\n' +
16 '#ZEN-TOTAL-DURATION:57.9911\n' +
17 '#EXT-X-ENDLIST';
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
7 <link rel="stylesheet" href="../libs/qunit/qunit.css" media="screen"> 7 <link rel="stylesheet" href="../libs/qunit/qunit.css" media="screen">
8 <script src="../libs/qunit/qunit.js"></script> 8 <script src="../libs/qunit/qunit.js"></script>
9 9
10 <!-- handlebars.js -->
11 <script src="../libs/handlebars/handlebars-v1.1.2.js"></script>
12
10 <!-- video.js --> 13 <!-- video.js -->
11 <script src="../node_modules/video.js/video.dev.js"></script> 14 <script src="../node_modules/video.js/video.dev.js"></script>
12 15
...@@ -26,6 +29,9 @@ ...@@ -26,6 +29,9 @@
26 <!-- M3U8 TEST DATA --> 29 <!-- M3U8 TEST DATA -->
27 <script src="manifest/playlistM3U8data.js"></script> 30 <script src="manifest/playlistM3U8data.js"></script>
28 <script src="manifest/brightcove_playlist_m3u8.js"></script> 31 <script src="manifest/brightcove_playlist_m3u8.js"></script>
32 <script src="manifest/playlist_type_template.js"></script>
33 <script src="manifest/playlist_media_sequence_template.js"></script>
34 <script src="manifest/playlist_target_duration_template.js"></script>
29 <!-- M3U8 --> 35 <!-- M3U8 -->
30 <!-- SEGMENT --> 36 <!-- SEGMENT -->
31 <script src="tsSegment-bc.js"></script> 37 <script src="tsSegment-bc.js"></script>
......