Skip to content

Commit

Permalink
revert the special case for handling daterange cue attribute when toS…
Browse files Browse the repository at this point in the history
…tring called
  • Loading branch information
Nfrederiksen committed Nov 27, 2024
1 parent 78889db commit b1bf950
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions m3u.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,9 @@ M3U.prototype.toString = function toString() {
});

if (this.items.PlaylistItem.length) {
let cuedInterstitial = false;
let final_interstitial_item = null;
if (this.items.PlaylistItem[this.items.PlaylistItem.length - 1].get("daterange") &&
this.items.PlaylistItem[this.items.PlaylistItem.length - 1].get("daterange")["CLASS"] == "com.apple.hls.interstitial" &&
this.items.PlaylistItem[this.items.PlaylistItem.length - 1].get("daterange")["CUE"]
) {
cuedInterstitial = true;
}
if (cuedInterstitial) {
final_interstitial_item = this.items.PlaylistItem.pop()
}
output.push(this.items.PlaylistItem.map(itemToString).join('\n'));
if (this.get('playlistType') === 'VOD') {
output.push('#EXT-X-ENDLIST');
if (final_interstitial_item) {
output.push(final_interstitial_item.toString());
}
}
} else {
if (this.items.StreamItem.length) {
Expand Down

0 comments on commit b1bf950

Please sign in to comment.