Skip to content

Commit 2db12ef

Browse files
Merge pull request #109 from bbc/utc-time-offset-improvements
Account for other sync events from the `TimeSyncController`
2 parents 946fe1b + 1e2417b commit 2db12ef

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/streaming/controllers/TimeSyncController.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,8 +600,9 @@ function TimeSyncController() {
600600
if (!_isOffsetDriftWithinThreshold(averageOffset)) {
601601
logger.debug(`Completed background UTC sync. Setting client - server offset to ${averageOffset}`);
602602
lastOffset = averageOffset;
603+
const artificialTimeOffsetToApply = settings.get().streaming.utcSynchronization.artificialTimeOffsetToApply;
603604
eventBus.trigger(Events.UPDATE_TIME_SYNC_OFFSET, {
604-
offset: lastOffset
605+
offset: artificialTimeOffsetToApply + lastOffset
605606
});
606607
} else {
607608
logger.debug(`Completed background UTC sync. Offset is within allowed threshold and is not adjusted.`);

0 commit comments

Comments
 (0)