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:
parent
de29dac896
commit
e548388f8f
3 changed files with 11 additions and 20 deletions
|
@ -22,7 +22,7 @@ class PlaybackCore {
|
||||||
this.syncAttempts = 0;
|
this.syncAttempts = 0;
|
||||||
this.lastSyncTime = new Date();
|
this.lastSyncTime = new Date();
|
||||||
// User setting to disable sync during playback.
|
// User setting to disable sync during playback.
|
||||||
this.enableSyncCorrection = !(browser.mobile || browser.iOS);
|
this.enableSyncCorrection = false;
|
||||||
|
|
||||||
this.playerIsBuffering = false;
|
this.playerIsBuffering = false;
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ class TimeSyncCore {
|
||||||
Events.trigger(this, 'time-sync-server-update', [timeOffset, ping]);
|
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') {
|
if (name === 'extraTimeOffset') {
|
||||||
this.extraTimeOffset = toFloat(getSetting('extraTimeOffset'), 0.0);
|
this.extraTimeOffset = toFloat(getSetting('extraTimeOffset'), 0.0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,12 @@
|
||||||
|
|
||||||
import { Events } from 'jellyfin-apiclient';
|
import { Events } from 'jellyfin-apiclient';
|
||||||
import SyncPlay from '../../core';
|
import SyncPlay from '../../core';
|
||||||
import { getSetting, setSetting } from '../../core/Settings';
|
import { setSetting } from '../../core/Settings';
|
||||||
import dialogHelper from '../../../dialogHelper/dialogHelper';
|
import dialogHelper from '../../../dialogHelper/dialogHelper';
|
||||||
import layoutManager from '../../../layoutManager';
|
import layoutManager from '../../../layoutManager';
|
||||||
import loading from '../../../loading/loading';
|
import loading from '../../../loading/loading';
|
||||||
import toast from '../../../toast/toast';
|
import toast from '../../../toast/toast';
|
||||||
import globalize from '../../../../scripts/globalize';
|
import globalize from '../../../../scripts/globalize';
|
||||||
import { toBoolean, toFloat } from '../../../../scripts/stringUtils';
|
|
||||||
|
|
||||||
import 'material-design-icons-iconfont';
|
import 'material-design-icons-iconfont';
|
||||||
import '../../../../elements/emby-input/emby-input';
|
import '../../../../elements/emby-input/emby-input';
|
||||||
|
@ -96,22 +95,14 @@ class SettingsEditor {
|
||||||
async initEditor() {
|
async initEditor() {
|
||||||
const { context } = this;
|
const { context } = this;
|
||||||
|
|
||||||
context.querySelector('#txtExtraTimeOffset').value = toFloat(getSetting('extraTimeOffset'),
|
context.querySelector('#txtExtraTimeOffset').value = SyncPlay.Manager.timeSyncCore.extraTimeOffset;
|
||||||
SyncPlay.Manager.playbackCore.extraTimeOffset);
|
context.querySelector('#chkSyncCorrection').checked = SyncPlay.Manager.playbackCore.enableSyncCorrection;
|
||||||
context.querySelector('#chkSyncCorrection').checked = toBoolean(getSetting('enableSyncCorrection'),
|
context.querySelector('#txtMinDelaySpeedToSync').value = SyncPlay.Manager.playbackCore.minDelaySpeedToSync;
|
||||||
SyncPlay.Manager.playbackCore.enableSyncCorrection);
|
context.querySelector('#txtMaxDelaySpeedToSync').value = SyncPlay.Manager.playbackCore.maxDelaySpeedToSync;
|
||||||
context.querySelector('#txtMinDelaySpeedToSync').value = toFloat(getSetting('minDelaySpeedToSync'),
|
context.querySelector('#txtSpeedToSyncDuration').value = SyncPlay.Manager.playbackCore.speedToSyncDuration;
|
||||||
SyncPlay.Manager.playbackCore.minDelaySpeedToSync);
|
context.querySelector('#txtMinDelaySkipToSync').value = SyncPlay.Manager.playbackCore.minDelaySkipToSync;
|
||||||
context.querySelector('#txtMaxDelaySpeedToSync').value = toFloat(getSetting('maxDelaySpeedToSync'),
|
context.querySelector('#chkSpeedToSync').checked = SyncPlay.Manager.playbackCore.useSpeedToSync;
|
||||||
SyncPlay.Manager.playbackCore.maxDelaySpeedToSync);
|
context.querySelector('#chkSkipToSync').checked = SyncPlay.Manager.playbackCore.useSkipToSync;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue