From 69d2e0367caa23421a3ef8bf4bc5233b78bf4db1 Mon Sep 17 00:00:00 2001 From: Oliver Tacke Date: Fri, 25 Mar 2022 15:41:49 +0100 Subject: [PATCH] Allow author to hide playback rate chooser --- language/.en.json | 6 +- language/af.json | 4 + language/ar.json | 6 +- language/bg.json | 4 + language/bn.json | 6 +- language/bs.json | 4 + language/ca.json | 4 + language/cs.json | 4 + language/da.json | 6 +- language/de.json | 4 + language/el.json | 4 + language/es-mx.json | 4 + language/es.json | 4 + language/et.json | 6 +- language/eu.json | 4 + language/fa.json | 4 + language/fi.json | 6 +- language/fr.json | 4 + language/gl.json | 4 + language/he.json | 4 + language/hr.json | 6 +- language/hu.json | 6 +- language/it.json | 4 + language/ja.json | 6 +- language/ka.json | 4 + language/km.json | 4 + language/ko.json | 4 + language/lv.json | 4 + language/nb.json | 6 +- language/nl.json | 4 + language/nn.json | 4 + language/pl.json | 6 +- language/pt-br.json | 4 + language/pt.json | 4 + language/ru.json | 4 + language/sl.json | 6 +- language/sma.json | 6 +- language/sme.json | 6 +- language/smj.json | 6 +- language/sv.json | 4 + language/tr.json | 4 + language/zh-cn.json | 4 + language/zh-hans.json | 6 +- language/zh-hant.json | 6 +- language/zh-tw.json | 6 +- semantics.json | 8 ++ src/scripts/interactive-video.js | 130 ++++++++++++++++--------------- 47 files changed, 275 insertions(+), 79 deletions(-) diff --git a/language/.en.json b/language/.en.json index a1d3aa381..0147ef2d3 100644 --- a/language/.en.json +++ b/language/.en.json @@ -289,6 +289,10 @@ "label": "Prevent skipping forward in a video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deactivate sound", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/af.json b/language/af.json index 413d65adb..d78f110ed 100644 --- a/language/af.json +++ b/language/af.json @@ -289,6 +289,10 @@ "label": "Verhoed vooruitspring in video", "description": "Aktivering van hierdie opsie sal gebruikernavigasiekontrole deur verstekkontroles deaktiveer." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deaktiveer klank", "description": "Aktivering van hierdie opsie sal die video se klank deaktiveer en verhoed dat dit aangeskakel kan word." diff --git a/language/ar.json b/language/ar.json index 51058f031..e30cc7494 100644 --- a/language/ar.json +++ b/language/ar.json @@ -289,6 +289,10 @@ "label": "Prevent skipping forward in a video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deactivate sound", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/bg.json b/language/bg.json index 433d3d91e..1bc38164b 100644 --- a/language/bg.json +++ b/language/bg.json @@ -289,6 +289,10 @@ "label": "Предотвратяване на прескачането напред във видеото", "description": "Активирането на тези опции ще деактивира видео навигацията на потребителя чрез контроли по подразбиране." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Изключване на звука", "description": "Активирането на тази опция ще дезактивира звука на видеото и ще предотврати включването му." diff --git a/language/bn.json b/language/bn.json index 9d29f6aca..743b434b5 100644 --- a/language/bn.json +++ b/language/bn.json @@ -289,6 +289,10 @@ "label": "ভিডিওর কিছু অংশ না দেখে সামনে যাওয়া বন্ধ করো", "description": "এই অপশন সক্রিয় করা হলে ব্যবহারকারী ভিডিও কনট্রোল ব্যবহার করে সামনে যেতে পারবে না।" }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "শব্দ নিষ্ক্রিয় করো", "description": "এই অপশন সক্রিয় করা হলে ভিডিওর শব্দ নিষ্ক্রিয় হবে এবং সেই শব্দকে আবার চালু করা যাবে না।" @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/bs.json b/language/bs.json index 268918c10..b54de086a 100644 --- a/language/bs.json +++ b/language/bs.json @@ -289,6 +289,10 @@ "label": "Spriječi premotavnje naprijed u videu", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deaktiviraj zvuk", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." diff --git a/language/ca.json b/language/ca.json index b57695ba1..3df51fb71 100644 --- a/language/ca.json +++ b/language/ca.json @@ -289,6 +289,10 @@ "label": "Impedeix avançar el vídeo", "description": "Si habiliteu aquesta opció es desactivarà la navegació de vídeo de l’usuari mitjançant controls predeterminats." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Desactiva el so", "description": "Si habiliteu aquesta opció, es desactivarà el so del vídeo i no es podrà activar." diff --git a/language/cs.json b/language/cs.json index e80d8fc6c..d0355c4b0 100644 --- a/language/cs.json +++ b/language/cs.json @@ -289,6 +289,10 @@ "label": "Zabránit přeskakování videa dopředu", "description": "Povolením této možnosti zakážete navigaci uživatele videa pomocí výchozích ovládacích prvků." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deaktivovat zvuk", "description": "Povolením této možnosti deaktivujete zvuk videa a zabráníte jeho zapnutí." diff --git a/language/da.json b/language/da.json index 8f3dd8f4b..c64349096 100644 --- a/language/da.json +++ b/language/da.json @@ -289,6 +289,10 @@ "label": "Undgå at spole frem i en video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deaktiver lyd", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/de.json b/language/de.json index 394adcf44..43398ea74 100644 --- a/language/de.json +++ b/language/de.json @@ -287,6 +287,10 @@ "label": "Springen deaktivieren", "description": "Wenn ausgewählt, muss der Lernende das Video anschauen, ohne selbst an andere Stellen springen zu können." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Ton deaktivieren", "description": "Auswählen, um die Audio-Ausgabe zu deaktivieren." diff --git a/language/el.json b/language/el.json index 377c3c0c0..6cce8cfb6 100644 --- a/language/el.json +++ b/language/el.json @@ -289,6 +289,10 @@ "label": "Να μην επιτρέπεται η παράκαμψη ενός τμήματος του βίντεο", "description": "Η ενεργοποίηση αυτής της επιλογής θα απενεργοποιήσει την πλοήγηση του χρήστη στο βίντεο μέσω των προεπιλεγμένων κουμπιών." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Απενεργοποίηση ήχου", "description": "Η ενεργοποίηση αυτής της επιλογής θα απενεργοποιήσει τον ήχο του βίντεο και θα αποτρέψει την ενεργοποίησή του." diff --git a/language/es-mx.json b/language/es-mx.json index 45d294a77..5d9edeff5 100644 --- a/language/es-mx.json +++ b/language/es-mx.json @@ -289,6 +289,10 @@ "label": "Evitar que se salte hacia adelante en el vídeo", "description": "Al habilitar esta opción se deshabilitará la navegación del video del usuario por medio de controles predeterminados." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Desactivar sonido", "description": "Habilitar esta opción desactiva el sonido del vídeo y evitará que se active." diff --git a/language/es.json b/language/es.json index 390f7c3a0..fcf2448a1 100644 --- a/language/es.json +++ b/language/es.json @@ -289,6 +289,10 @@ "label": "Evitar que se salte hacia adelante en el vídeo", "description": "Al habilitar esta opción se deshabilitará la navegación del video del usuario por medio de controles predeterminados." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Desactivar sonido", "description": "Habilitar esta opción desactiva el sonido del vídeo y evitará que se active." diff --git a/language/et.json b/language/et.json index 7d946ec38..fbaacb798 100644 --- a/language/et.json +++ b/language/et.json @@ -289,6 +289,10 @@ "label": "Keela videos edasikerimine", "description": "Selle võimaluse lubamisel keelatakse kasutajal vaikejuhtnuppudega navigeerimine." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Vaigista heli", "description": "Selle valikuga vaigistatakse video heli nii, et kasutaja ei saa seda sisse lülitada." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/eu.json b/language/eu.json index 66c6ccace..65f2af1ce 100644 --- a/language/eu.json +++ b/language/eu.json @@ -287,6 +287,10 @@ "label": "Galerazi bideoan aurrera jauzi egitea", "description": "Aukera hau aktibatuta desgaitzen dira nabigazio ohiko kontrolak." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Desgaitu soinua", "description": "Aukera hau aktibatuta bideoaren soinua desaktibatzen da eta galerazten da martxan jartzea." diff --git a/language/fa.json b/language/fa.json index 5eae061b6..e9fd50c63 100644 --- a/language/fa.json +++ b/language/fa.json @@ -289,6 +289,10 @@ "label": "جلوگیری از پرش به جلو در ویدئو", "description": "فعال‌سازی این گزینه، پیمایش ویدئو توسط کاربر را از طریق کنترل‌های پیش‌فرض غیرفعال خواهد کرد." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "غیرفعال کردن صدا", "description": "فعال‌سازی این گزینه صدای ویدئو را غیرفعال خواهد کرد و مانع روشن شدن آن خواهد شد." diff --git a/language/fi.json b/language/fi.json index d73e314e7..5b39ed119 100644 --- a/language/fi.json +++ b/language/fi.json @@ -289,6 +289,10 @@ "label": "Estä videossa eteenpäin hyppiminen", "description": "Tämän valinta estää käyttäjän navigoinnnin videossa oletusohjaimilla." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Estä ääni", "description": "Tämä valinta estää äänen ja sen kytkemisen päälle." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/fr.json b/language/fr.json index a89647b80..befe02611 100644 --- a/language/fr.json +++ b/language/fr.json @@ -289,6 +289,10 @@ "label": "Empêcher de sauter en avant dans la vidéo", "description": "Cette option empêchera les utilisateurs de naviguer au sein de la video" }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Désactiver le son", "description": "Cette option désactive le son de la vidéo." diff --git a/language/gl.json b/language/gl.json index b8fbfec94..18d2bd9b9 100644 --- a/language/gl.json +++ b/language/gl.json @@ -289,6 +289,10 @@ "label": "Impedir o salto cara adiante no vídeo", "description": "Esta opción impide que o usuario se mova polo vídeo usando os controles de navegación por defecto." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Desactivar son", "description": "Esta opción desactiva o son do vídeo e impide que se poda activar." diff --git a/language/he.json b/language/he.json index 282067121..bc2ee1cc8 100644 --- a/language/he.json +++ b/language/he.json @@ -289,6 +289,10 @@ "label": "מנעו דילוג קדימה בסרטון", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "כיבוי שמע", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." diff --git a/language/hr.json b/language/hr.json index 1d32fdc5c..f8357f80d 100644 --- a/language/hr.json +++ b/language/hr.json @@ -289,6 +289,10 @@ "label": "Prevent skipping forward in a video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deactivate sound", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/hu.json b/language/hu.json index 2adce4aea..17c93ad8d 100644 --- a/language/hu.json +++ b/language/hu.json @@ -289,6 +289,10 @@ "label": "Prevent skipping forward in a video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deactivate sound", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/it.json b/language/it.json index 58a92c712..cb9f6b2b8 100644 --- a/language/it.json +++ b/language/it.json @@ -289,6 +289,10 @@ "label": "Impedisci di saltare avanti in un video", "description": "Abilitare questa opzione disattiverà la navigazione dei video da parte dell'utente attraverso i controlli predefiniti" }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Disattiva il sonoro", "description": "Abilitare questa opzione disattiverà il sonoro di un video e ne impedirà l'accensione" diff --git a/language/ja.json b/language/ja.json index 36b0d5af1..4176f29e1 100644 --- a/language/ja.json +++ b/language/ja.json @@ -289,6 +289,10 @@ "label": "Prevent skipping forward in a video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "サウンド無効化", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/ka.json b/language/ka.json index da926a924..7445baf2d 100644 --- a/language/ka.json +++ b/language/ka.json @@ -286,6 +286,10 @@ "label": "Prevent skipping forward in a video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deactivate sound", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." diff --git a/language/km.json b/language/km.json index 67397effb..b7a2a6f49 100644 --- a/language/km.json +++ b/language/km.json @@ -289,6 +289,10 @@ "label": "Prevent skipping forward in a video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deactivate sound", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." diff --git a/language/ko.json b/language/ko.json index 5f31d52b4..6ecd4b135 100644 --- a/language/ko.json +++ b/language/ko.json @@ -289,6 +289,10 @@ "label": "비디오에서 앞으로 건너뛰기 방지", "description": "이 옵션을 활성화하면 기본 컨트롤을 통해 사용자 비디오 탐색이 비활성화됨." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "사운드 비활성화", "description": "이 옵션을 활성화하면 동영상의 사운드가 비활성화되고 소리가 켜지지 않게 됨." diff --git a/language/lv.json b/language/lv.json index 83954a9f4..c00da175d 100644 --- a/language/lv.json +++ b/language/lv.json @@ -286,6 +286,10 @@ "description": "Šīs opcijas ieslēgšana lietotājam atspējos video navigāciju ar noklusējuma vadīklām.", "label": "Novērsiet pārlēkšanu uz priekšu videoklipā" }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Atslēgt skaņu", "description": "Šīs opcijas aktivizēšana, atslēgs videoklipa skaņu un liegs tās ieslēgšanu." diff --git a/language/nb.json b/language/nb.json index 3225da2f5..39e44a9a9 100644 --- a/language/nb.json +++ b/language/nb.json @@ -289,6 +289,10 @@ "label": "Unngå at brukere hopper over innhold i video", "description": "Slå på for å nekte at brukere hopper over innhold i video ved hjelp av standard kontrollere." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deaktiver lyd", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/nl.json b/language/nl.json index f4e118f48..2e108f6b7 100644 --- a/language/nl.json +++ b/language/nl.json @@ -287,6 +287,10 @@ "label": "Voorkom voorwaartse navigatie in een video", "description": "Met deze opties ingeschakeld, kan een gebruiker niet door de video scrollen met de standaard knoppen." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Geluid uitschakelen", "description": "Met deze optie wordt het geluid van de video uitgeschakeld en kan het niet worden ingeschakeld." diff --git a/language/nn.json b/language/nn.json index cf6659853..0ff6fcbc1 100644 --- a/language/nn.json +++ b/language/nn.json @@ -289,6 +289,10 @@ "label": "Unngå at brukere hopper over innhold i video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deaktiver lyd", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." diff --git a/language/pl.json b/language/pl.json index 1aad10b1d..50c436d6d 100644 --- a/language/pl.json +++ b/language/pl.json @@ -289,6 +289,10 @@ "label": "Zapobiegaj przeskakiwaniu do przodu", "description": "Włączenie tej opcji uniemożliwi widzowi używanie paska postępu do zmiany odtwarzanego fragmentu wideo." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Wyłącz dźwięk", "description": "Włączenie tej opcji wyłączy ścieżkę dźwiękową i uniemożliwi jej włączenie." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/pt-br.json b/language/pt-br.json index 879e169e1..df1c31472 100644 --- a/language/pt-br.json +++ b/language/pt-br.json @@ -289,6 +289,10 @@ "label": "Evitar pular para frente em um vídeo", "description": "Ativar esta opção irá desativar a navegação através dos controles padrões de vídeo do usuário." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Desativar som", "description": "Ativar esta opção removerá o som do vídeo e não permitirá que o som seja ligado." diff --git a/language/pt.json b/language/pt.json index ffac70255..a2c18d79e 100644 --- a/language/pt.json +++ b/language/pt.json @@ -287,6 +287,10 @@ "label": "Evitar saltar para frente no vídeo", "description": "Ativar esta opção desativará a navegação no vídeo através dos controlos predefinidos." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Desativar som", "description": "Ativar esta opção desativará o som do vídeo e impedirá que seja ligado." diff --git a/language/ru.json b/language/ru.json index 52a648250..a3c7bf728 100644 --- a/language/ru.json +++ b/language/ru.json @@ -289,6 +289,10 @@ "label": "Предотвратить перемотку вперед в видео", "description": "Включение этой опции отключит навигацию пользователя по видео с помощью элементов управления по умолчанию." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Отключить звук", "description": "Включение этого параметра отключит звук видео и предотвратит его включение." diff --git a/language/sl.json b/language/sl.json index 61038471e..490ad1a55 100644 --- a/language/sl.json +++ b/language/sl.json @@ -289,6 +289,10 @@ "label": "Prepreči preskok naprej", "description": "Z onemogočenimi kontrolniki za predvajanje videoposnetka bo možen le ogled v enem kosu." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Onemogoči zvok", "description": "Videoposnetek se bo predvajal v nemem načinu." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/sma.json b/language/sma.json index a1d3aa381..0147ef2d3 100644 --- a/language/sma.json +++ b/language/sma.json @@ -289,6 +289,10 @@ "label": "Prevent skipping forward in a video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deactivate sound", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/sme.json b/language/sme.json index a1d3aa381..0147ef2d3 100644 --- a/language/sme.json +++ b/language/sme.json @@ -289,6 +289,10 @@ "label": "Prevent skipping forward in a video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deactivate sound", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/smj.json b/language/smj.json index a1d3aa381..0147ef2d3 100644 --- a/language/smj.json +++ b/language/smj.json @@ -289,6 +289,10 @@ "label": "Prevent skipping forward in a video", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Deactivate sound", "description": "Enabling this option will deactivate the video's sound and prevent it from being switched on." @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/sv.json b/language/sv.json index 0555e22cd..f4e23560a 100644 --- a/language/sv.json +++ b/language/sv.json @@ -289,6 +289,10 @@ "label": "Förhindra att spola framåt i video", "description": "Om du väljer denna inställning så inaktiveras möjligheten för användare att navigera i video med standardkontroller." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Inaktivera ljud", "description": "Om du väljer denna inställning så inaktiveras ljudet i videon och möjligheten för användare att slå på ljud förhindras." diff --git a/language/tr.json b/language/tr.json index f3757467e..dd613097d 100644 --- a/language/tr.json +++ b/language/tr.json @@ -289,6 +289,10 @@ "label": "Videoda ileri atlamayı önle", "description": "Bu seçenek seçildiğinde kullanıcıya varsayılan video kontrolleri etkisiz kılınacaktır." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "Sesi devre dışı bırak", "description": "Bu seçenek seçildiğinde videonun sesi devre dışı bırakılacak ve açılması önlenecektir." diff --git a/language/zh-cn.json b/language/zh-cn.json index 359f32998..0c1fc601d 100644 --- a/language/zh-cn.json +++ b/language/zh-cn.json @@ -289,6 +289,10 @@ "label": "防止跳播影片", "description": "勾选后,会停用影片的时间巡览功能。用戶就不能在播放时跳过影片片段。" }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "关闭影片音量", "description": "勾选后,会关闭影片的声音。用戶就不能在播放时间启用影片声音。" diff --git a/language/zh-hans.json b/language/zh-hans.json index aa47537e5..b5ce4f35e 100644 --- a/language/zh-hans.json +++ b/language/zh-hans.json @@ -289,6 +289,10 @@ "label": "防止跳播影片", "description": "勾选后,会停用影片的时间巡览功能。用戶就不能在播放时跳过影片片段。" }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "关闭影片音量", "description": "勾选后,会关闭影片的声音。用戶就不能在播放时间启用影片声音。" @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/zh-hant.json b/language/zh-hant.json index 03b1dbc79..b25f6e9c6 100644 --- a/language/zh-hant.json +++ b/language/zh-hant.json @@ -289,6 +289,10 @@ "label": "防止跳播影片", "description": "勾選後,會停用影片的時間巡覽功能。用戶就不能在播放時跳過影片片段。" }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "關閉影片音量", "description": "勾選後,會關閉影片的聲音。用戶就不能在播放時開啟影片聲音。" @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/language/zh-tw.json b/language/zh-tw.json index f378ddbb8..a095d9310 100644 --- a/language/zh-tw.json +++ b/language/zh-tw.json @@ -289,6 +289,10 @@ "label": "影像中不能點擊跳過", "description": "啟用此選項時,使用者將不能任意跳換." }, + { + "label": "Hide playback rate chooser", + "description": "Enabling this option will hide the playback rate chooser." + }, { "label": "關閉聲音", "description": "啟用此選項時將關閉影片的聲音,且無法再被開啟聲音" @@ -476,4 +480,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/semantics.json b/semantics.json index 6aca2a6e3..1bb205006 100644 --- a/semantics.json +++ b/semantics.json @@ -723,6 +723,14 @@ "importance": "low", "description": "Enabling this options will disable user video navigation through default controls." }, + { + "name": "deactivatePlaybackRateChooser", + "type": "boolean", + "default": false, + "label": "Hide playback rate chooser", + "importance": "low", + "description": "Enabling this option will hide the playback rate chooser." + }, { "name": "deactivateSound", "type": "boolean", diff --git a/src/scripts/interactive-video.js b/src/scripts/interactive-video.js index b2e4eba0b..603d502dc 100644 --- a/src/scripts/interactive-video.js +++ b/src/scripts/interactive-video.js @@ -110,6 +110,7 @@ function InteractiveVideo(params, id, contentData) { self.showRewind10 = (params.override.showRewind10 !== undefined ? params.override.showRewind10 : false); self.showBookmarksmenuOnLoad = (params.override.showBookmarksmenuOnLoad !== undefined ? params.override.showBookmarksmenuOnLoad : false); self.preventSkipping = params.override.preventSkipping || false; + self.deactivatePlaybackRateChooser = params.override.deactivatePlaybackRateChooser || false; self.deactivateSound = params.override.deactivateSound || false; } // Translated UI text defaults @@ -351,7 +352,9 @@ function InteractiveVideo(params, id, contentData) { // Qualities might not be available until after play. self.addQualityChooser(); - self.addPlaybackRateChooser(); + if (this.deactivatePlaybackRateChooser !== true) { + self.addPlaybackRateChooser(); + } // Make sure splash screen is removed. self.removeSplash(); @@ -437,15 +440,17 @@ function InteractiveVideo(params, id, contentData) { } }); - self.video.on('playbackRateChange', function (event) { - var playbackRate = event.data; - // Firefox fires a "ratechange" event immediately upon changing source, at this - // point controls has not been initialized, so we must check for controls - if (self.controls && self.controls.$playbackRateChooser) { - // Update playbackRate selector - self.controls.$playbackRateChooser.find('li').attr('aria-checked', 'false').filter('[playback-rate="' + playbackRate + '"]').attr('aria-checked', 'true'); - } - }); + if (self.deactivatePlaybackRateChooser !== true) { + self.video.on('playbackRateChange', function (event) { + var playbackRate = event.data; + // Firefox fires a "ratechange" event immediately upon changing source, at this + // point controls has not been initialized, so we must check for controls + if (self.controls && self.controls.$playbackRateChooser) { + // Update playbackRate selector + self.controls.$playbackRateChooser.find('li').attr('aria-checked', 'false').filter('[playback-rate="' + playbackRate + '"]').attr('aria-checked', 'true'); + } + }); + } // Handle entering fullscreen self.on('enterFullScreen', function () { @@ -705,7 +710,7 @@ InteractiveVideo.prototype.attach = function ($container) { // 'video only' fallback has no interactions let isAnswerable = this.hasMainSummary(); - + if (this.interactions) { // interactions require parent $container, recreate with input this.interactions.forEach(function (interaction) { @@ -2100,47 +2105,49 @@ InteractiveVideo.prototype.attachControls = function ($wrapper) { self.closePopupMenus(); }); - // Add popup for selecting playback rate - self.controls.$playbackRateChooser = H5P.jQuery('
', { - 'class': 'h5p-chooser h5p-playbackRate', - 'role': 'dialog', - html: `

${self.l10n.playbackRate}

`, - }); - self.popupMenuChoosers.push(self.controls.$playbackRateChooser); + if (self.deactivatePlaybackRateChooser !== true) { + // Add popup for selecting playback rate + self.controls.$playbackRateChooser = H5P.jQuery('
', { + 'class': 'h5p-chooser h5p-playbackRate', + 'role': 'dialog', + html: `

${self.l10n.playbackRate}

`, + }); + self.popupMenuChoosers.push(self.controls.$playbackRateChooser); - const closePlaybackRateMenu = () => { - if (self.isMinimal) { - self.controls.$more.click(); - } - else { - self.controls.$playbackRateButton.click(); - } - self.resumeVideo(); - }; + const closePlaybackRateMenu = () => { + if (self.isMinimal) { + self.controls.$more.click(); + } + else { + self.controls.$playbackRateButton.click(); + } + self.resumeVideo(); + }; - // Adding close button to playback rate-menu - self.controls.$playbackRateChooser.append($('', { - 'role': 'button', - 'class': 'h5p-chooser-close-button', - 'tabindex': '0', - 'aria-label': self.l10n.close, - click: () => closePlaybackRateMenu(), - keydown: event => { - if (isSpaceOrEnterKey(event)) { - closePlaybackRateMenu(); - event.preventDefault(); + // Adding close button to playback rate-menu + self.controls.$playbackRateChooser.append($('', { + 'role': 'button', + 'class': 'h5p-chooser-close-button', + 'tabindex': '0', + 'aria-label': self.l10n.close, + click: () => closePlaybackRateMenu(), + keydown: event => { + if (isSpaceOrEnterKey(event)) { + closePlaybackRateMenu(); + event.preventDefault(); + } } - } - })); + })); - // Button for opening video playback rate selection dialog - self.controls.$playbackRateButton = self.createButton('playbackRate', 'h5p-control', $right, createPopupMenuHandler('$playbackRateButton', '$playbackRateChooser')); - self.popupMenuButtons.push(self.controls.$playbackRateButton); - self.setDisabled(self.controls.$playbackRateButton); - self.controls.$playbackRateButton.attr('aria-haspopup', 'true'); - self.controls.$playbackRateButton.attr('aria-expanded', 'false'); + // Button for opening video playback rate selection dialog + self.controls.$playbackRateButton = self.createButton('playbackRate', 'h5p-control', $right, createPopupMenuHandler('$playbackRateButton', '$playbackRateChooser')); + self.popupMenuButtons.push(self.controls.$playbackRateButton); + self.setDisabled(self.controls.$playbackRateButton); + self.controls.$playbackRateButton.attr('aria-haspopup', 'true'); + self.controls.$playbackRateButton.attr('aria-expanded', 'false'); - self.controls.$playbackRateChooser.insertAfter(self.controls.$playbackRateButton); + self.controls.$playbackRateChooser.insertAfter(self.controls.$playbackRateButton); + } // Add volume button control (toggle mute) if (!isAndroid() && !isIpad()) { @@ -2258,21 +2265,22 @@ InteractiveVideo.prototype.attachControls = function ($wrapper) { self.controls.$qualityButtonMinimal.attr('role', 'menuitem'); self.controls.$overlayButtons = self.controls.$overlayButtons.add(self.controls.$qualityButtonMinimal); self.minimalMenuKeyboardControls.addElement(self.controls.$qualityButtonMinimal.get(0)); - - // Playback rate - self.controls.$playbackRateButtonMinimal = self.createButton('playbackRate', 'h5p-minimal-button', $minimalWrap, function () { - if (!self.isDisabled(self.controls.$playbackRateButton)) { - self.controls.$overlayButtons.addClass('h5p-hide'); - self.controls.$playbackRateButton.click(); - } - }, true); - self.controls.$playbackRateButtonMinimal.attr('role', 'menuitem'); - self.setDisabled(self.controls.$playbackRateButtonMinimal); - self.controls.$overlayButtons = self.controls.$overlayButtons.add(self.controls.$playbackRateButtonMinimal); - self.minimalMenuKeyboardControls.addElement(self.controls.$playbackRateButtonMinimal.get(0)); - self.addQualityChooser(); - self.addPlaybackRateChooser(); + + if (self.deactivatePlaybackRateChooser !== true) { + // Playback rate + self.controls.$playbackRateButtonMinimal = self.createButton('playbackRate', 'h5p-minimal-button', $minimalWrap, function () { + if (!self.isDisabled(self.controls.$playbackRateButton)) { + self.controls.$overlayButtons.addClass('h5p-hide'); + self.controls.$playbackRateButton.click(); + } + }, true); + self.controls.$playbackRateButtonMinimal.attr('role', 'menuitem'); + self.setDisabled(self.controls.$playbackRateButtonMinimal); + self.controls.$overlayButtons = self.controls.$overlayButtons.add(self.controls.$playbackRateButtonMinimal); + self.minimalMenuKeyboardControls.addElement(self.controls.$playbackRateButtonMinimal.get(0)); + self.addPlaybackRateChooser(); + } self.interactionKeyboardControls = new Controls([new UIKeyboard()]);