File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ declare namespace dashjs {
201201 enableSeekFix ?: boolean
202202 } ,
203203 utcSynchronization ?: {
204+ enabled ?: boolean ,
204205 useManifestDateHeaderTimeSource ?: boolean ,
205206 backgroundAttempts ?: number ,
206207 timeBetweenSyncAttempts ?: number ,
Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ import {HTTPRequest} from '../streaming/vo/metrics/HTTPRequest';
108108 * enableSeekFix: false
109109 * },
110110 * utcSynchronization: {
111+ * enabled: true,
111112 * useManifestDateHeaderTimeSource: true,
112113 * backgroundAttempts: 2,
113114 * timeBetweenSyncAttempts: 30,
@@ -378,7 +379,8 @@ import {HTTPRequest} from '../streaming/vo/metrics/HTTPRequest';
378379
379380/**
380381 * @typedef {Object } UtcSynchronizationSettings
381- *
382+ * @property {boolean } [enabled=true]
383+ * Enables or disables the UTC clock synchronization
382384 * @property {boolean } [useManifestDateHeaderTimeSource=true]
383385 * Allows you to enable the use of the Date Header, if exposed with CORS, as a timing source for live edge detection.
384386 *
@@ -802,6 +804,7 @@ function Settings() {
802804 enableSeekFix : false
803805 } ,
804806 utcSynchronization : {
807+ enabled : true ,
805808 useManifestDateHeaderTimeSource : true ,
806809 backgroundAttempts : 2 ,
807810 timeBetweenSyncAttempts : 30 ,
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ function TimeSyncController() {
168168 * Does a synchronization in the background in case the last offset should be verified or a 404 occurs
169169 */
170170 function _onAttemptBackgroundSync ( ) {
171- if ( isSynchronizing || isBackgroundSynchronizing || ! lastTimingSource || ! lastTimingSource . value || ! lastTimingSource . schemeIdUri || isNaN ( lastOffset ) || isNaN ( settings . get ( ) . streaming . utcSynchronization . backgroundAttempts ) ) {
171+ if ( ! settings . get ( ) . streaming . utcSynchronization . enabled || isSynchronizing || isBackgroundSynchronizing || ! lastTimingSource || ! lastTimingSource . value || ! lastTimingSource . schemeIdUri || isNaN ( lastOffset ) || isNaN ( settings . get ( ) . streaming . utcSynchronization . backgroundAttempts ) ) {
172172 return ;
173173 }
174174
@@ -287,7 +287,7 @@ function TimeSyncController() {
287287 */
288288 function _shouldPerformSynchronization ( isDynamic ) {
289289 try {
290- if ( ! isDynamic ) {
290+ if ( ! isDynamic || ! settings . get ( ) . streaming . utcSynchronization . enabled ) {
291291 return false ;
292292 }
293293 const timeBetweenSyncAttempts = ! isNaN ( internalTimeBetweenSyncAttempts ) ? internalTimeBetweenSyncAttempts : DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS ;
You can’t perform that action at this time.
0 commit comments