Skip to content

Commit

Permalink
First working version with background sync
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Feb 10, 2021
1 parent 8711260 commit 6d53727
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 81 deletions.
9 changes: 6 additions & 3 deletions src/core/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,12 @@ function Settings() {
stallThreshold: 0.5,
filterUnsupportedEssentialProperties: true,
utcSynchronization: {
backgroundAttempts: 2,
timeBetweenSyncAttempts: 300,
driftFactor: 0.2
backgroundAttempts: 4,
timeBetweenSyncAttempts: 2,
maximumTimeBetweenSyncAttempts: 600,
minimumTimeBetweenSyncAttempts: 2,
timeBetweenSyncAttemptsAdjustmentFactor: 2,
maximumAllowedDrift: 50
},
liveCatchup: {
minDrift: 0.02,
Expand Down
1 change: 1 addition & 0 deletions src/core/events/CoreEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import EventsBase from './EventsBase';
class CoreEvents extends EventsBase {
constructor () {
super();
this.ATTEMPT_BACKGROUND_SYNC = 'attemptBackgroundSync';
this.BUFFERING_COMPLETED = 'bufferingCompleted';
this.BUFFER_CLEARED = 'bufferCleared';
this.BUFFER_LEVEL_UPDATED = 'bufferLevelUpdated';
Expand Down
Loading

0 comments on commit 6d53727

Please sign in to comment.