diff --git a/src/components/syncPlay/core/PlaybackCore.js b/src/components/syncPlay/core/PlaybackCore.js index 596393f9df..57e34769cd 100644 --- a/src/components/syncPlay/core/PlaybackCore.js +++ b/src/components/syncPlay/core/PlaybackCore.js @@ -22,7 +22,7 @@ class PlaybackCore { this.syncAttempts = 0; this.lastSyncTime = new Date(); // User setting to disable sync during playback. - this.enableSyncCorrection = !(browser.mobile || browser.iOS); + this.enableSyncCorrection = false; this.playerIsBuffering = false; diff --git a/src/components/syncPlay/core/timeSync/TimeSyncCore.js b/src/components/syncPlay/core/timeSync/TimeSyncCore.js index adb135f28b..772121dac8 100644 --- a/src/components/syncPlay/core/timeSync/TimeSyncCore.js +++ b/src/components/syncPlay/core/timeSync/TimeSyncCore.js @@ -48,7 +48,7 @@ class TimeSyncCore { Events.trigger(this, 'time-sync-server-update', [timeOffset, ping]); }); - Events.on(appSettings, 'change', function (e, name) { + Events.on(appSettings, 'change', (e, name) => { if (name === 'extraTimeOffset') { this.extraTimeOffset = toFloat(getSetting('extraTimeOffset'), 0.0); } diff --git a/src/components/syncPlay/ui/settings/SettingsEditor.js b/src/components/syncPlay/ui/settings/SettingsEditor.js index 2b32f5de8a..3f90725145 100644 --- a/src/components/syncPlay/ui/settings/SettingsEditor.js +++ b/src/components/syncPlay/ui/settings/SettingsEditor.js @@ -5,13 +5,12 @@ import { Events } from 'jellyfin-apiclient'; import SyncPlay from '../../core'; -import { getSetting, setSetting } from '../../core/Settings'; +import { setSetting } from '../../core/Settings'; import dialogHelper from '../../../dialogHelper/dialogHelper'; import layoutManager from '../../../layoutManager'; import loading from '../../../loading/loading'; import toast from '../../../toast/toast'; import globalize from '../../../../scripts/globalize'; -import { toBoolean, toFloat } from '../../../../scripts/stringUtils'; import 'material-design-icons-iconfont'; import '../../../../elements/emby-input/emby-input'; @@ -96,22 +95,14 @@ class SettingsEditor { async initEditor() { const { context } = this; - context.querySelector('#txtExtraTimeOffset').value = toFloat(getSetting('extraTimeOffset'), - SyncPlay.Manager.playbackCore.extraTimeOffset); - context.querySelector('#chkSyncCorrection').checked = toBoolean(getSetting('enableSyncCorrection'), - SyncPlay.Manager.playbackCore.enableSyncCorrection); - context.querySelector('#txtMinDelaySpeedToSync').value = toFloat(getSetting('minDelaySpeedToSync'), - SyncPlay.Manager.playbackCore.minDelaySpeedToSync); - context.querySelector('#txtMaxDelaySpeedToSync').value = toFloat(getSetting('maxDelaySpeedToSync'), - SyncPlay.Manager.playbackCore.maxDelaySpeedToSync); - context.querySelector('#txtSpeedToSyncDuration').value = toFloat(getSetting('speedToSyncDuration'), - SyncPlay.Manager.playbackCore.speedToSyncDuration); - context.querySelector('#txtMinDelaySkipToSync').value = toFloat(getSetting('minDelaySkipToSync'), - SyncPlay.Manager.playbackCore.minDelaySkipToSync); - context.querySelector('#chkSpeedToSync').checked = toBoolean(getSetting('useSpeedToSync'), - SyncPlay.Manager.playbackCore.useSpeedToSync); - context.querySelector('#chkSkipToSync').checked = toBoolean(getSetting('useSkipToSync'), - SyncPlay.Manager.playbackCore.useSkipToSync); + context.querySelector('#txtExtraTimeOffset').value = SyncPlay.Manager.timeSyncCore.extraTimeOffset; + context.querySelector('#chkSyncCorrection').checked = SyncPlay.Manager.playbackCore.enableSyncCorrection; + context.querySelector('#txtMinDelaySpeedToSync').value = SyncPlay.Manager.playbackCore.minDelaySpeedToSync; + context.querySelector('#txtMaxDelaySpeedToSync').value = SyncPlay.Manager.playbackCore.maxDelaySpeedToSync; + context.querySelector('#txtSpeedToSyncDuration').value = SyncPlay.Manager.playbackCore.speedToSyncDuration; + context.querySelector('#txtMinDelaySkipToSync').value = SyncPlay.Manager.playbackCore.minDelaySkipToSync; + context.querySelector('#chkSpeedToSync').checked = SyncPlay.Manager.playbackCore.useSpeedToSync; + context.querySelector('#chkSkipToSync').checked = SyncPlay.Manager.playbackCore.useSkipToSync; } onSubmit() {