1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix syncplay review issues

This commit is contained in:
Bill Thornton 2021-09-13 11:10:28 -04:00
parent de29dac896
commit e548388f8f
3 changed files with 11 additions and 20 deletions

View file

@ -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;

View file

@ -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);
}

View file

@ -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() {