From fb3b629357caef32a47bd5809f200039920eb427 Mon Sep 17 00:00:00 2001 From: Brandon Casey <2381475+brandonocasey@users.noreply.github.com> Date: Thu, 21 Jan 2021 15:38:22 -0500 Subject: [PATCH] chore: remove unused and non-standard tag #ZEN-TOTAL-DURATION (#133) --- src/parse-stream.js | 12 ------------ test/fixtures/integration/absoluteUris.m3u8 | 1 - test/fixtures/integration/domainUris.m3u8 | 1 - test/fixtures/integration/emptyPlaylistType.m3u8 | 1 - test/fixtures/integration/event.m3u8 | 1 - test/fixtures/integration/invalidPlaylistType.m3u8 | 1 - .../manifestExtTTargetdurationNegative.m3u8 | 1 - .../integration/manifestExtXEndlistEarly.m3u8 | 1 - test/fixtures/integration/manifestNoExtM3u.m3u8 | 1 - test/fixtures/integration/media.m3u8 | 1 - test/fixtures/integration/whiteSpace.m3u8 | 1 - test/fixtures/integration/zeroDuration.m3u8 | 1 - 12 files changed, 23 deletions(-) diff --git a/src/parse-stream.js b/src/parse-stream.js index a82a137..5836cab 100644 --- a/src/parse-stream.js +++ b/src/parse-stream.js @@ -174,18 +174,6 @@ export default class ParseStream extends Stream { this.trigger('data', event); return; } - match = (/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/).exec(newLine); - if (match) { - event = { - type: 'tag', - tagType: 'totalduration' - }; - if (match[1]) { - event.duration = parseInt(match[1], 10); - } - this.trigger('data', event); - return; - } match = (/^#EXT-X-VERSION:?([0-9.]*)?/).exec(newLine); if (match) { event = { diff --git a/test/fixtures/integration/absoluteUris.m3u8 b/test/fixtures/integration/absoluteUris.m3u8 index 9c137a8..6fbaf05 100644 --- a/test/fixtures/integration/absoluteUris.m3u8 +++ b/test/fixtures/integration/absoluteUris.m3u8 @@ -9,5 +9,4 @@ https://example.com/00002.ts //example.com/00003.ts #EXTINF:10, http://example.com/00004.ts -#ZEN-TOTAL-DURATION:57.9911 #EXT-X-ENDLIST diff --git a/test/fixtures/integration/domainUris.m3u8 b/test/fixtures/integration/domainUris.m3u8 index a5528ef..8134d07 100644 --- a/test/fixtures/integration/domainUris.m3u8 +++ b/test/fixtures/integration/domainUris.m3u8 @@ -9,5 +9,4 @@ /00003.ts #EXTINF:10, /00004.ts -#ZEN-TOTAL-DURATION:57.9911 #EXT-X-ENDLIST diff --git a/test/fixtures/integration/emptyPlaylistType.m3u8 b/test/fixtures/integration/emptyPlaylistType.m3u8 index 0b64e64..0396ca4 100644 --- a/test/fixtures/integration/emptyPlaylistType.m3u8 +++ b/test/fixtures/integration/emptyPlaylistType.m3u8 @@ -13,5 +13,4 @@ /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts #EXTINF:8, /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts -#ZEN-TOTAL-DURATION:57.9911 #EXT-X-ENDLIST diff --git a/test/fixtures/integration/event.m3u8 b/test/fixtures/integration/event.m3u8 index 7e5b29a..cb6381d 100644 --- a/test/fixtures/integration/event.m3u8 +++ b/test/fixtures/integration/event.m3u8 @@ -13,5 +13,4 @@ /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts #EXTINF:8, /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts -#ZEN-TOTAL-DURATION:57.9911 #EXT-X-ENDLIST diff --git a/test/fixtures/integration/invalidPlaylistType.m3u8 b/test/fixtures/integration/invalidPlaylistType.m3u8 index c901083..8b95bed 100644 --- a/test/fixtures/integration/invalidPlaylistType.m3u8 +++ b/test/fixtures/integration/invalidPlaylistType.m3u8 @@ -13,5 +13,4 @@ /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00005.ts #EXTINF:8, /test/ts-files/zencoder/haze/Haze_Mantel_President_encoded_1200-00006.ts -#ZEN-TOTAL-DURATION:57.9911 #EXT-X-ENDLIST diff --git a/test/fixtures/integration/manifestExtTTargetdurationNegative.m3u8 b/test/fixtures/integration/manifestExtTTargetdurationNegative.m3u8 index d3c154b..7b3d10e 100644 --- a/test/fixtures/integration/manifestExtTTargetdurationNegative.m3u8 +++ b/test/fixtures/integration/manifestExtTTargetdurationNegative.m3u8 @@ -1,5 +1,4 @@ #EXTM3U -#ZEN-TOTAL-DURATION:50 #EXT-X-TARGETDURATION:-10 #EXTINF:10, /test/ts-files/zencoder/gogo/00001.ts diff --git a/test/fixtures/integration/manifestExtXEndlistEarly.m3u8 b/test/fixtures/integration/manifestExtXEndlistEarly.m3u8 index e251472..dd19745 100644 --- a/test/fixtures/integration/manifestExtXEndlistEarly.m3u8 +++ b/test/fixtures/integration/manifestExtXEndlistEarly.m3u8 @@ -1,5 +1,4 @@ #EXTM3U -#ZEN-TOTAL-DURATION:50 #EXT-X-TARGETDURATION:10 #EXTINF:10, /test/ts-files/zencoder/gogo/00001.ts diff --git a/test/fixtures/integration/manifestNoExtM3u.m3u8 b/test/fixtures/integration/manifestNoExtM3u.m3u8 index 3f3919a..2058c16 100644 --- a/test/fixtures/integration/manifestNoExtM3u.m3u8 +++ b/test/fixtures/integration/manifestNoExtM3u.m3u8 @@ -1,4 +1,3 @@ -#ZEN-TOTAL-DURATION:10 #EXT-X-TARGETDURATION:10 #EXTINF:10, /test/ts-files/zencoder/gogo/00001.ts diff --git a/test/fixtures/integration/media.m3u8 b/test/fixtures/integration/media.m3u8 index 4658b58..f191b7f 100644 --- a/test/fixtures/integration/media.m3u8 +++ b/test/fixtures/integration/media.m3u8 @@ -9,5 +9,4 @@ media-00002.ts media-00003.ts #EXTINF:10, media-00004.ts -#ZEN-TOTAL-DURATION:57.9911 #EXT-X-ENDLIST diff --git a/test/fixtures/integration/whiteSpace.m3u8 b/test/fixtures/integration/whiteSpace.m3u8 index ca51362..62e0c4c 100644 --- a/test/fixtures/integration/whiteSpace.m3u8 +++ b/test/fixtures/integration/whiteSpace.m3u8 @@ -10,5 +10,4 @@ http://example.com/00001.ts //example.com/00003.ts #EXTINF:10, http://example.com/00004.ts -#ZEN-TOTAL-DURATION:57.9911 #EXT-X-ENDLIST diff --git a/test/fixtures/integration/zeroDuration.m3u8 b/test/fixtures/integration/zeroDuration.m3u8 index 20aaf6d..2245b98 100644 --- a/test/fixtures/integration/zeroDuration.m3u8 +++ b/test/fixtures/integration/zeroDuration.m3u8 @@ -4,5 +4,4 @@ #EXTINF:0, http://example.com/00001.ts -#ZEN-TOTAL-DURATION:57.9911 #EXT-X-ENDLIST