Skip to content

Commit

Permalink
Corrected ServiceDescription handling (#3879)
Browse files Browse the repository at this point in the history
- minDrift should not be set from SD as there is no direct mapping to any SD parameters
- maxDrift is set if present and larger than SD target
  • Loading branch information
piersoh committed Feb 18, 2022
1 parent a2ed768 commit f562b03
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/streaming/controllers/PlaybackController.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,20 @@ function PlaybackController() {
settings.update({
streaming: {
delay: {
liveDelay: llsd.latency.target / 1000,
},
liveCatchup: {
minDrift: (llsd.latency.target + 500) / 1000,
maxDrift: llsd.latency.max > llsd.latency.target ? (llsd.latency.max - llsd.latency.target + 500) / 1000 : undefined
liveDelay: llsd.latency.target / 1000
}
}
});
if (llsd.latency.max && llsd.latency.max > llsd.latency.target ) {
logger.debug('Apply LL properties coming from service description. Max Latency:', llsd.latency.max);
settings.update({
streaming: {
liveCatchup: {
maxDrift: (llsd.latency.max - llsd.latency.target) / 1000
}
}
});
}
}
if (llsd.playbackRate && llsd.playbackRate.max > 1.0) {
logger.debug('Apply LL properties coming from service description. Max PlaybackRate:', llsd.playbackRate.max);
Expand Down

0 comments on commit f562b03

Please sign in to comment.