diff --git a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/playback/managers/VideoStateManager.java b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/playback/managers/VideoStateManager.java index a8ab13039..3bceb406a 100644 --- a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/playback/managers/VideoStateManager.java +++ b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/playback/managers/VideoStateManager.java @@ -405,7 +405,7 @@ public class VideoStateManager extends PlayerEventListenerHelper { //} private void restoreVolume() { - getController().setVolume(mPlayerData.getMasterVolume()); + getController().setVolume(mPlayerData.getPlayerVolume()); } private void restoreFormats() { diff --git a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/presenters/settings/PlayerSettingsPresenter.java b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/presenters/settings/PlayerSettingsPresenter.java index 64e79a343..5c4bbed1e 100644 --- a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/presenters/settings/PlayerSettingsPresenter.java +++ b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/presenters/settings/PlayerSettingsPresenter.java @@ -120,11 +120,11 @@ public class PlayerSettingsPresenter extends BasePresenter { for (int scalePercent : Helpers.range(0, 100, 5)) { float scale = scalePercent / 100f; options.add(UiOptionItem.from(String.format("%sx", scale), - optionItem -> mPlayerData.setMasterVolume(scale), - Helpers.floatEquals(scale, mPlayerData.getMasterVolume()))); + optionItem -> mPlayerData.setPlayerVolume(scale), + Helpers.floatEquals(scale, mPlayerData.getPlayerVolume()))); } - settingsPresenter.appendRadioCategory(getContext().getString(R.string.master_volume), options); + settingsPresenter.appendRadioCategory(getContext().getString(R.string.volume_limit), options); } private void appendSeekingPreviewCategory(AppDialogPresenter settingsPresenter) { diff --git a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/prefs/PlayerData.java b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/prefs/PlayerData.java index f2d0e8119..2b1681398 100644 --- a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/prefs/PlayerData.java +++ b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/prefs/PlayerData.java @@ -67,7 +67,7 @@ public class PlayerData { private boolean mIsSeekConfirmPlayEnabled; private int mStartSeekIncrementMs; private float mSubtitleScale; - private float mMasterVolume; + private float mPlayerVolume; private PlayerData(Context context) { mPrefs = AppPrefs.instance(context); @@ -353,12 +353,12 @@ public class PlayerData { persistData(); } - public float getMasterVolume() { - return mMasterVolume; + public float getPlayerVolume() { + return mPlayerVolume; } - public void setMasterVolume(float scale) { - mMasterVolume = scale; + public void setPlayerVolume(float scale) { + mPlayerVolume = scale; persistData(); } @@ -506,7 +506,7 @@ public class PlayerData { mStartSeekIncrementMs = Helpers.parseInt(split, 37, 10_000); // old subs size px mSubtitleScale = Helpers.parseFloat(split, 39, 1.0f); - mMasterVolume = Helpers.parseFloat(split, 40, 1.0f); + mPlayerVolume = Helpers.parseFloat(split, 40, 1.0f); if (!mIsRememberSpeedEnabled) { mSpeed = 1.0f; @@ -523,6 +523,6 @@ public class PlayerData { mIsLegacyCodecsForced, mIsSonyTimerFixEnabled, null, null, // old player tweaks mIsQualityInfoEnabled, mIsRememberSpeedEachEnabled, mVideoAspectRatio, mIsGlobalClockEnabled, mIsTimeCorrectionEnabled, mIsGlobalEndingTimeEnabled, mIsEndingTimeEnabled, mIsDoubleRefreshRateEnabled, mIsSeekConfirmPlayEnabled, - mStartSeekIncrementMs, null, mSubtitleScale, mMasterVolume)); + mStartSeekIncrementMs, null, mSubtitleScale, mPlayerVolume)); } } diff --git a/common/src/main/res/values-ru/strings.xml b/common/src/main/res/values-ru/strings.xml index 5b57f16e0..5b3803f3b 100644 --- a/common/src/main/res/values-ru/strings.xml +++ b/common/src/main/res/values-ru/strings.xml @@ -370,4 +370,5 @@ Туннельное воспроизведение обещает лучшую синхронизацию аудио/видео и более плавное воспроизведение. Требуется Андроид 5+ Туннельное воспроизведение (Android 5+) Основная громкость + Ограничение громкости \ No newline at end of file diff --git a/common/src/main/res/values-uk/strings.xml b/common/src/main/res/values-uk/strings.xml index 14f3c0a2e..b635efab9 100644 --- a/common/src/main/res/values-uk/strings.xml +++ b/common/src/main/res/values-uk/strings.xml @@ -370,4 +370,5 @@ Тунельне відтворення обіцяє кращу синхронізацію аудіо/відео та більш плавне відтворення. Потрібен Андроїд 5+ Тунельне відтворення (Android 5+) Основна гучність + Обмеження гучності \ No newline at end of file diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 22f29cb47..f85033fea 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -374,4 +374,5 @@ Tunneled video playback promises benefits such as better audio/video synchronization (AV sync) and smoother playback. Required Android 5+ Tunneled video playback (Android 5+) Master volume + Volume limit