mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Disable sync correction by default on mobile
This commit is contained in:
parent
247d3f23e6
commit
de29dac896
2 changed files with 21 additions and 11 deletions
|
@ -2,8 +2,9 @@
|
|||
* Module that manages the playback of SyncPlay.
|
||||
* @module components/syncPlay/core/PlaybackCore
|
||||
*/
|
||||
|
||||
import { Events } from 'jellyfin-apiclient';
|
||||
|
||||
import browser from '../../../scripts/browser';
|
||||
import { toBoolean, toFloat } from '../../../scripts/stringUtils';
|
||||
import * as Helper from './Helper';
|
||||
import { getSetting } from './Settings';
|
||||
|
@ -20,7 +21,8 @@ class PlaybackCore {
|
|||
this.playbackDiffMillis = 0; // Used for stats and remote time sync.
|
||||
this.syncAttempts = 0;
|
||||
this.lastSyncTime = new Date();
|
||||
this.enableSyncCorrection = true; // User setting to disable sync during playback.
|
||||
// User setting to disable sync during playback.
|
||||
this.enableSyncCorrection = !(browser.mobile || browser.iOS);
|
||||
|
||||
this.playerIsBuffering = false;
|
||||
|
||||
|
@ -67,7 +69,7 @@ class PlaybackCore {
|
|||
this.useSkipToSync = toBoolean(getSetting('useSkipToSync'), true);
|
||||
|
||||
// Whether sync correction during playback is active.
|
||||
this.enableSyncCorrection = toBoolean(getSetting('enableSyncCorrection'), true);
|
||||
this.enableSyncCorrection = toBoolean(getSetting('enableSyncCorrection'), !(browser.mobile || browser.iOS));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -96,14 +96,22 @@ class SettingsEditor {
|
|||
async initEditor() {
|
||||
const { context } = this;
|
||||
|
||||
context.querySelector('#txtExtraTimeOffset').value = toFloat(getSetting('extraTimeOffset'), 0.0);
|
||||
context.querySelector('#chkSyncCorrection').checked = toBoolean(getSetting('enableSyncCorrection'), true);
|
||||
context.querySelector('#txtMinDelaySpeedToSync').value = toFloat(getSetting('minDelaySpeedToSync'), 60.0);
|
||||
context.querySelector('#txtMaxDelaySpeedToSync').value = toFloat(getSetting('maxDelaySpeedToSync'), 3000.0);
|
||||
context.querySelector('#txtSpeedToSyncDuration').value = toFloat(getSetting('speedToSyncDuration'), 1000.0);
|
||||
context.querySelector('#txtMinDelaySkipToSync').value = toFloat(getSetting('minDelaySkipToSync'), 400.0);
|
||||
context.querySelector('#chkSpeedToSync').checked = toBoolean(getSetting('useSpeedToSync'), true);
|
||||
context.querySelector('#chkSkipToSync').checked = toBoolean(getSetting('useSkipToSync'), true);
|
||||
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);
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue