in source/stale-playlist-detector/playlist.js [50:62]
changed(input) {
// compare based on the hash of the playlist content
if (this.options.detector_options.change_detect == "CONTENTHASH") {
logger.info(`checking computed hash [${this.options.url}]`);
return (input.hash != this.last_sample.hash);
} else
if (this.options.detector_options.change_detect == "MEDIASEQUENCE") {
logger.info(`check media sequence value [${this.options.url}]`);
return (input.media_sequence != this.last_sample.media_sequence);
} else {
throw "unknown change detection specified";
}
}