Turn page while playing (#1383) fixes #1365

* Add an EReader setting for turning when playing

This allows to allow the navigation with the Volume buttons even when
audiobooks are playing.

---------

Co-authored-by: advplyr <advplyr@protonmail.com>
This commit is contained in:
RaHoni 2024-12-13 23:20:13 +01:00 committed by GitHub
parent b02c1311ff
commit 2452f09714
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 47 additions and 41 deletions

View file

@ -54,7 +54,7 @@
</modals-fullscreen-modal>
<!-- ereader settings modal -->
<modals-fullscreen-modal v-model="showSettingsModal" :theme="ereaderTheme" half-screen>
<modals-fullscreen-modal v-model="showSettingsModal" :theme="ereaderTheme">
<div style="box-shadow: 0px -8px 8px #11111155">
<div class="flex items-end justify-between h-14 px-4 pb-2 mb-6">
<h1 class="text-lg">{{ $strings.HeaderEreaderSettings }}</h1>
@ -94,12 +94,18 @@
</div>
<ui-toggle-btns v-model="ereaderSettings.spread" :items="spreadItems" @input="settingsUpdated" />
</div>
<div class="flex items-center">
<div class="flex items-center mb-6">
<div class="w-32">
<p class="text-base">{{ $strings.LabelNavigateWithVolume }}:</p>
</div>
<ui-toggle-btns v-model="ereaderSettings.navigateWithVolume" :items="navigateWithVolumeItems" @input="settingsUpdated" />
</div>
<div class="flex items-center">
<div class="w-32">
<p class="text-base">{{ $strings.LabelNavigateWithVolumeWhilePlaying }}:</p>
</div>
<ui-toggle-btns v-model="ereaderSettings.navigateWithVolumeWhilePlaying" :items="navigateWithVolumeWhilePlayingItems" @input="settingsUpdated" />
</div>
</div>
</div>
</div>
@ -132,7 +138,8 @@ export default {
lineSpacing: 115,
spread: 'auto',
textStroke: 0,
navigateWithVolume: 'enabled'
navigateWithVolume: 'enabled',
navigateWithVolumeWhilePlaying: false
}
}
},
@ -196,7 +203,7 @@ export default {
navigateWithVolumeItems() {
return [
{
text: this.$strings.LabelNavigateWithVolumeEnabled,
text: this.$strings.LabelOn,
value: 'enabled'
},
{
@ -204,11 +211,23 @@ export default {
value: 'mirrored'
},
{
text: this.$strings.LabelNavigateWithVolumeDisabled,
text: this.$strings.LabelOff,
value: 'none'
}
]
},
navigateWithVolumeWhilePlayingItems() {
return [
{
text: this.$strings.LabelOn,
value: true
},
{
text: this.$strings.LabelOff,
value: false
}
]
},
themeItems() {
return [
{
@ -424,7 +443,7 @@ export default {
this.isInittingWatchVolume = true
const isWatching = await VolumeButtons.isWatching()
if (this.ereaderSettings.navigateWithVolume !== 'none' && !this.isPlayerOpen) {
if (this.ereaderSettings.navigateWithVolume !== 'none' && (this.ereaderSettings.navigateWithVolumeWhilePlaying || !this.isPlayerOpen)) {
if (!isWatching.value) {
const options = {
disableSystemVolumeHandler: true,

View file

@ -176,8 +176,6 @@
"LabelNarrator": "কথক",
"LabelNarrators": "কথক",
"LabelNavigateWithVolume": "ভলিউম বাটন দিয়ে নেভিগেট করুন",
"LabelNavigateWithVolumeDisabled": "বন্ধ",
"LabelNavigateWithVolumeEnabled": "চালু",
"LabelNavigateWithVolumeMirrored": "মিরর করা হয়েছে",
"LabelNever": "কখনও না",
"LabelNewestAuthors": "নতুন লেখক",
@ -186,6 +184,7 @@
"LabelNotFinished": "সমাপ্ত হয়নি",
"LabelNotStarted": "শুরু হয়নি",
"LabelOff": "বন্ধ",
"LabelOn": "চালু",
"LabelPassword": "পাসওয়ার্ড",
"LabelPath": "পথ",
"LabelPlaybackDirect": "সরাসরি",

View file

@ -176,8 +176,6 @@
"LabelNarrator": "Vypravěč",
"LabelNarrators": "Vypravěči",
"LabelNavigateWithVolume": "Navigace pomocí tlačítek hlasitosti",
"LabelNavigateWithVolumeDisabled": "Vypnuto",
"LabelNavigateWithVolumeEnabled": "Zapnuto",
"LabelNavigateWithVolumeMirrored": "Zrcadleno",
"LabelNever": "Nikdy",
"LabelNewestAuthors": "Nejnovější autoři",
@ -186,6 +184,7 @@
"LabelNotFinished": "Nedokončeno",
"LabelNotStarted": "Nezahájeno",
"LabelOff": "Vypnout",
"LabelOn": "Zapnuto",
"LabelPassword": "Heslo",
"LabelPath": "Cesta",
"LabelPlaybackDirect": "Přímé",

View file

@ -179,9 +179,8 @@
"LabelNarrator": "Erzähler",
"LabelNarrators": "Erzähler",
"LabelNavigateWithVolume": "Mit Lautstärke blättern",
"LabelNavigateWithVolumeDisabled": "Aus",
"LabelNavigateWithVolumeEnabled": "An",
"LabelNavigateWithVolumeMirrored": "Umgekehrt",
"LabelNavigateWithVolumeWhilePlaying": "Auch bei Wiedergabe mit Lautstärketasten blättern",
"LabelNever": "Nie",
"LabelNewestAuthors": "Neueste Autoren",
"LabelNewestEpisodes": "Neueste Episoden",
@ -190,6 +189,7 @@
"LabelNotStarted": "Nicht begonnen",
"LabelNumEpisodes": "{0} Episoden",
"LabelOff": "Aus",
"LabelOn": "An",
"LabelPassword": "Passwort",
"LabelPath": "Pfad",
"LabelPlaybackDirect": "Direkt",

View file

@ -179,9 +179,10 @@
"LabelNarrator": "Narrator",
"LabelNarrators": "Narrators",
"LabelNavigateWithVolume": "Navigate with volume keys",
"LabelNavigateWithVolumeDisabled": "Off",
"LabelNavigateWithVolumeEnabled": "On",
"LabelNavigateWithVolumeMirrored": "Mirrored",
"LabelNavigateWithVolumeWhilePlaying": "Allow volume keys to navigate while playing",
"LabelNavigateWithVolumeWhilePlayingDisabled": "Off",
"LabelNavigateWithVolumeWhilePlayingEnabled": "On",
"LabelNever": "Never",
"LabelNewestAuthors": "Newest Authors",
"LabelNewestEpisodes": "Newest Episodes",
@ -190,6 +191,7 @@
"LabelNotStarted": "Not Started",
"LabelNumEpisodes": "{0} episodes",
"LabelOff": "Off",
"LabelOn": "On",
"LabelPassword": "Password",
"LabelPath": "Path",
"LabelPlaybackDirect": "Direct",

View file

@ -179,8 +179,6 @@
"LabelNarrator": "Narrador",
"LabelNarrators": "Narradores",
"LabelNavigateWithVolume": "Navegar con las teclas de volumen",
"LabelNavigateWithVolumeDisabled": "Apagar",
"LabelNavigateWithVolumeEnabled": "Encender",
"LabelNavigateWithVolumeMirrored": "Espejo",
"LabelNever": "Nunca",
"LabelNewestAuthors": "Autores más recientes",
@ -190,6 +188,7 @@
"LabelNotStarted": "Sin iniciar",
"LabelNumEpisodes": "{0} episodios",
"LabelOff": "Apagado",
"LabelOn": "Encendido",
"LabelPassword": "Contraseña",
"LabelPath": "Ruta de carpeta",
"LabelPlaybackDirect": "Directo",

View file

@ -163,14 +163,13 @@
"LabelNarrator": "Lukija",
"LabelNarrators": "Lukijat",
"LabelNavigateWithVolume": "Navigoi äänenvoimakkuus-painikkeilla",
"LabelNavigateWithVolumeDisabled": "Pois päältä",
"LabelNavigateWithVolumeEnabled": "Päällä",
"LabelNever": "Ei koskaan",
"LabelNewestAuthors": "Uusimmat kirjailijat",
"LabelNewestEpisodes": "Uusimmat jaksot",
"LabelNo": "Ei",
"LabelNotStarted": "Ei aloitettu",
"LabelOff": "Pois päältä",
"LabelOn": "Päällä",
"LabelPassword": "Salasana",
"LabelPath": "Polku",
"LabelPlaybackLocal": "Paikallinen",

View file

@ -179,8 +179,6 @@
"LabelNarrator": "Narrateur",
"LabelNarrators": "Narrateurs",
"LabelNavigateWithVolume": "Naviguer avec les touches de volume",
"LabelNavigateWithVolumeDisabled": "Désactivé",
"LabelNavigateWithVolumeEnabled": "Activé",
"LabelNavigateWithVolumeMirrored": "En miroir",
"LabelNever": "Jamais",
"LabelNewestAuthors": "Auteurs récents",
@ -190,6 +188,7 @@
"LabelNotStarted": "Pas commencé",
"LabelNumEpisodes": "{0} épisodes",
"LabelOff": "Éteint",
"LabelOn": "Activé",
"LabelPassword": "Mot de passe",
"LabelPath": "Chemin",
"LabelPlaybackDirect": "Direct",

View file

@ -179,8 +179,6 @@
"LabelNarrator": "Pripovjedač",
"LabelNarrators": "Pripovjedači",
"LabelNavigateWithVolume": "Navigacija tipkama za glasnoću",
"LabelNavigateWithVolumeDisabled": "Isključeno",
"LabelNavigateWithVolumeEnabled": "Uključeno",
"LabelNavigateWithVolumeMirrored": "Zrcali",
"LabelNever": "Nikada",
"LabelNewestAuthors": "Najnoviji autori",
@ -190,6 +188,7 @@
"LabelNotStarted": "Nije započeto",
"LabelNumEpisodes": "{0} nastavaka",
"LabelOff": "Isključeno",
"LabelOn": "Uključeno",
"LabelPassword": "Zaporka",
"LabelPath": "Putanja",
"LabelPlaybackDirect": "Izravno",

View file

@ -179,8 +179,6 @@
"LabelNarrator": "Előadó",
"LabelNarrators": "Előadók",
"LabelNavigateWithVolume": "Navigálás a hangerőgombokkal",
"LabelNavigateWithVolumeDisabled": "Kikapcsolva",
"LabelNavigateWithVolumeEnabled": "Bekapcsolva",
"LabelNavigateWithVolumeMirrored": "Tükrözve",
"LabelNever": "Soha",
"LabelNewestAuthors": "Legújabb szerzők",
@ -189,7 +187,8 @@
"LabelNotFinished": "Nem befejezett",
"LabelNotStarted": "Nem kezdődött el",
"LabelNumEpisodes": "{0} epizód",
"LabelOff": "Ki",
"LabelOff": "Kikapcsolva",
"LabelOn": "Bekapcsolva",
"LabelPassword": "Jelszó",
"LabelPath": "Útvonal",
"LabelPlaybackDirect": "Közvetlen",

View file

@ -179,8 +179,6 @@
"LabelNarrator": "Narratore",
"LabelNarrators": "Narratori",
"LabelNavigateWithVolume": "Navigare con i tasti del volume",
"LabelNavigateWithVolumeDisabled": "Disattivo",
"LabelNavigateWithVolumeEnabled": "Attivo",
"LabelNavigateWithVolumeMirrored": "Invertito",
"LabelNever": "Mai",
"LabelNewestAuthors": "Nuovi autori",
@ -190,6 +188,7 @@
"LabelNotStarted": "Non iniziato",
"LabelNumEpisodes": "{0} episodi",
"LabelOff": "Disattivato",
"LabelOn": "Attivo",
"LabelPassword": "Password",
"LabelPath": "Percorso",
"LabelPlaybackDirect": "Diretto",

View file

@ -176,8 +176,6 @@
"LabelNarrator": "Verteller",
"LabelNarrators": "Vertellers",
"LabelNavigateWithVolume": "Navigeer met volume knoppen",
"LabelNavigateWithVolumeDisabled": "Uit",
"LabelNavigateWithVolumeEnabled": "Aam",
"LabelNavigateWithVolumeMirrored": "Gespiegeld",
"LabelNever": "Nooit",
"LabelNewestAuthors": "Nieuwste Auteurs",
@ -186,6 +184,7 @@
"LabelNotFinished": "Niet Voltooid",
"LabelNotStarted": "Niet Gestart",
"LabelOff": "Uit",
"LabelOn": "Aan",
"LabelPassword": "Wachtwoord",
"LabelPath": "Pad",
"LabelPlaybackDirect": "Direct",

View file

@ -179,8 +179,6 @@
"LabelNarrator": "Читает",
"LabelNarrators": "Чтецы",
"LabelNavigateWithVolume": "Навигация с помощью клавиш регулировки громкости",
"LabelNavigateWithVolumeDisabled": "Выключить",
"LabelNavigateWithVolumeEnabled": "Включён",
"LabelNavigateWithVolumeMirrored": "Зеркало",
"LabelNever": "Никогда",
"LabelNewestAuthors": "Новые авторы",
@ -190,6 +188,7 @@
"LabelNotStarted": "Не запущено",
"LabelNumEpisodes": "{0} эпизодов",
"LabelOff": "Выключить",
"LabelOn": "Включён",
"LabelPassword": "Пароль",
"LabelPath": "Путь",
"LabelPlaybackDirect": "Напрямую",

View file

@ -179,8 +179,6 @@
"LabelNarrator": "Bralec",
"LabelNarrators": "Bralci",
"LabelNavigateWithVolume": "Krmarite s tipkami za glasnost",
"LabelNavigateWithVolumeDisabled": "Izključeno",
"LabelNavigateWithVolumeEnabled": "Vključeno",
"LabelNavigateWithVolumeMirrored": "Zrcalno",
"LabelNever": "Nikoli",
"LabelNewestAuthors": "Najnovejši avtorji",
@ -190,6 +188,7 @@
"LabelNotStarted": "Ni zagnano",
"LabelNumEpisodes": "{0} epizod",
"LabelOff": "Izključeno",
"LabelOn": "Vključeno",
"LabelPassword": "Geslo",
"LabelPath": "Pot",
"LabelPlaybackDirect": "Neposredno",

View file

@ -176,8 +176,6 @@
"LabelNarrator": "Berättare",
"LabelNarrators": "Berättare",
"LabelNavigateWithVolume": "Navigera med volymknapparna",
"LabelNavigateWithVolumeDisabled": "Av",
"LabelNavigateWithVolumeEnabled": "På",
"LabelNavigateWithVolumeMirrored": "Speglad",
"LabelNever": "Aldrig",
"LabelNewestAuthors": "Senast tillagda författare",
@ -186,6 +184,7 @@
"LabelNotFinished": "Ej avslutad",
"LabelNotStarted": "Inte påbörjad",
"LabelOff": "Av",
"LabelOn": "På",
"LabelPassword": "Lösenord",
"LabelPath": "Sökväg",
"LabelPlaybackDirect": "Direct",

View file

@ -179,8 +179,6 @@
"LabelNarrator": "Читець",
"LabelNarrators": "Читці",
"LabelNavigateWithVolume": "Навігація за допомогою клавіш гучності",
"LabelNavigateWithVolumeDisabled": "Вимкнено",
"LabelNavigateWithVolumeEnabled": "Увімкнено",
"LabelNavigateWithVolumeMirrored": "Віддзеркалено",
"LabelNever": "Ніколи",
"LabelNewestAuthors": "Нові автори",
@ -190,6 +188,7 @@
"LabelNotStarted": "Непочаті",
"LabelNumEpisodes": "{0} епізодів",
"LabelOff": "Вимкнути",
"LabelOn": "Увімкнено",
"LabelPassword": "Пароль",
"LabelPath": "Шлях",
"LabelPlaybackDirect": "Безпосередньо",

View file

@ -179,8 +179,6 @@
"LabelNarrator": "演播者",
"LabelNarrators": "演播者",
"LabelNavigateWithVolume": "使用音量键导航",
"LabelNavigateWithVolumeDisabled": "关闭",
"LabelNavigateWithVolumeEnabled": "打开",
"LabelNavigateWithVolumeMirrored": "镜像",
"LabelNever": "从不",
"LabelNewestAuthors": "最新作者",
@ -190,6 +188,7 @@
"LabelNotStarted": "未开始",
"LabelNumEpisodes": "{0} 个剧集",
"LabelOff": "关闭",
"LabelOn": "打开",
"LabelPassword": "密码",
"LabelPath": "路径",
"LabelPlaybackDirect": "直接播放",

View file

@ -176,8 +176,6 @@
"LabelNarrator": "講述者",
"LabelNarrators": "講述者",
"LabelNavigateWithVolume": "使用音量鍵導航",
"LabelNavigateWithVolumeDisabled": "關閉",
"LabelNavigateWithVolumeEnabled": "打開",
"LabelNavigateWithVolumeMirrored": "鏡像",
"LabelNever": "從不",
"LabelNewestAuthors": "最新作者",
@ -186,6 +184,7 @@
"LabelNotFinished": "未聽完",
"LabelNotStarted": "未開始",
"LabelOff": "關閉",
"LabelOn": "打開",
"LabelPassword": "密碼",
"LabelPath": "路徑",
"LabelPlaybackDirect": "直接播放",