Skip to content

Commit

Permalink
Fixes and enhancements for version 1.0.2
Browse files Browse the repository at this point in the history
- Add gzipped media resources
- Fix copyright in language files
- Add de-DE and ru-RU language files to module XML
- Fix package and subpackage doc block tags
- Fix source group change not working when select size is smaller than number of select options
- Add copyright to JS
- Less cryptic function and variable names in JS
- Add inline help to the configuration form
- Add check for Joomla API to JS
- Use zero value to auto-size select element
- Add option to choose CSS style sheet
- Add hint to inline help about using own CSS files
- Add notes to the options form
- Fix version and creation date in module XML
  • Loading branch information
richard67 authored Sep 12, 2022
2 parents 13cd0c1 + 34c341f commit 00b1587
Show file tree
Hide file tree
Showing 19 changed files with 193 additions and 58 deletions.
22 changes: 15 additions & 7 deletions build/media_source/mod_rfvideo/js/rfvideo.es6.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
function selChangeQ(elSelect, elVideoDiv, elPlaylistDiv, elVideo, sourceGroups) {
/**
* @copyright (C) 2022 Richard Fath <https://www.richard-fath.de>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
if (!Joomla) {
throw new Error('Joomla API was not properly initialized');
}

function sourceSelectChanged(elSelect, elVideoDiv, elPlaylistDiv, elVideo, sourceGroups) {
const vidExt = elVideo.currentSrc.substr(elVideo.currentSrc.lastIndexOf('.'));

if (vidExt === '') {
Expand Down Expand Up @@ -42,7 +50,7 @@ const allVideoPlayerDivs = document.querySelectorAll('div.rfvideoplayer');
allVideoPlayerDivs.forEach(videoPlayerDiv => {
const myVideoDiv = videoPlayerDiv.querySelector('.rfvideo');
const myPlaylistDiv = videoPlayerDiv.querySelector('.rfvideoplaylist');
const mySelectQ = videoPlayerDiv.getElementsByTagName('select')[0];
const mySourceSelect = videoPlayerDiv.getElementsByTagName('select')[0];
const myVideo = videoPlayerDiv.getElementsByTagName('video')[0];
const myStatus = videoPlayerDiv.querySelector('.rfvideostatus');
const myPlaylistItems = videoPlayerDiv.getElementsByTagName('li');
Expand All @@ -58,11 +66,11 @@ allVideoPlayerDivs.forEach(videoPlayerDiv => {
});
}

if (mySelectQ) {
if (mySourceSelect) {
let mySourceGroups = [];

for (let i = 0; i < mySelectQ.size; ++i) {
const opts = mySelectQ.options[i].value.split(';');
for (let i = 0; i < mySourceSelect.length; ++i) {
const opts = mySourceSelect.options[i].value.split(';');
let group = {
'suffix': opts[0],
'height': opts[1],
Expand All @@ -73,8 +81,8 @@ allVideoPlayerDivs.forEach(videoPlayerDiv => {
mySourceGroups[i] = group;
}

mySelectQ.addEventListener('change', function () {
selChangeQ(mySelectQ, myVideoDiv, myPlaylistDiv, myVideo, mySourceGroups);
mySourceSelect.addEventListener('change', function () {
sourceSelectChanged(mySourceSelect, myVideoDiv, myPlaylistDiv, myVideo, mySourceGroups);
});
}

Expand Down
46 changes: 34 additions & 12 deletions src/language/de-DE/mod_rfvideo.ini
Original file line number Diff line number Diff line change
@@ -1,37 +1,59 @@
; Joomla! Project
; (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
; mod_rfvideo
; (C) 2022 Richard Fath <https://www.richard-fath.de>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_RFVIDEO="RF Videoplayer-Modul"
MOD_RFVIDEO_AUTOPLAY_DESCR="Das \"autoplay\" Attribut des \"video\" Elements"
MOD_RFVIDEO_AUTOPLAY_LABEL="Autoplay"
MOD_RFVIDEO_BASIC_NOTE_DESCR="Der Modul-Titel, den Sie oben eingeben, wird als \"title\" Attribut des \"video\" Elements verwendet. Er ist übersetzbar, so dass Sie eine Sprachkonstante oder einen Sprachoverride verwenden können."
MOD_RFVIDEO_BASIC_NOTE_LABEL="Hinweis"
MOD_RFVIDEO_CONTROLS_DESCR="Das \"controls\" Attribut des \"video\" Elements"
MOD_RFVIDEO_CONTROLS_LABEL="Controls"
MOD_RFVIDEO_DESCRIPTION_LABEL="Description"
MOD_RFVIDEO_DESCRIPTION_LABEL="Beschreibung"
MOD_RFVIDEO_DOWNLOAD_LINK_DESCR="Ein optionaler Link zu Downloads, der angezeigt wird, wenn der Browser kein HTML5-Video unterstützt."
MOD_RFVIDEO_DOWNLOAD_LINK_LABEL="Downloadlink"
MOD_RFVIDEO_HEIGHT_LABEL="Height"
MOD_RFVIDEO_IMAGE_LABEL="Poster Image"
MOD_RFVIDEO_LOADING="Lade Video &hellip;"
MOD_RFVIDEO_LOOP_DESCR="Das \"loop\" Attribut des \"video\" Elements"
MOD_RFVIDEO_LOOP_LABEL="Loop"
MOD_RFVIDEO_MUTED_DESCR="Das \"muted\" Attribut des \"video\" Elements"
MOD_RFVIDEO_MUTED_LABEL="Muted"
MOD_RFVIDEO_NO_BROWSER_SUPPORT="Ihr Browser unterstützt entweder das Video-Tag nicht oder keines der bereitgestellten Videoformate."
MOD_RFVIDEO_PLAYLIST_FIELDSET_LABEL="Playliste"
MOD_RFVIDEO_PLAYLIST_ITEM_POSITION_DESCR="Position in Sekunden, z.&nbsp;B. \"0\" für den Anfang des Videos, oder \"10.123\" für diese Position im Video."
MOD_RFVIDEO_PLAYLIST_ITEM_POSITION_LABEL="Position"
MOD_RFVIDEO_PLAYLIST_ITEM_TITLE_DESCR="Titel, der in der Playliste angezeigt wird."
MOD_RFVIDEO_PLAYLIST_ITEM_TITLE_LABEL="Titel"
MOD_RFVIDEO_PLAYLIST_DESCR="Hier fügen Sie Titel zur Playliste hinzu. Für jeden Titel müssen Sie die Position im Video in Sekunden eingeben, z.&nbsp;B. \"0\" für den Anfang des Videos oder z.&nbsp;B. \"10.123\", und den Titeltext."
MOD_RFVIDEO_PLAYLIST_LABEL="Playliste"
MOD_RFVIDEO_PLAYLIST_START="Start"
MOD_RFVIDEO_PRELOAD_DESCR="Das \"preload\" Attribut des \"video\" Elements"
MOD_RFVIDEO_PRELOAD_LABEL="Preload"
MOD_RFVIDEO_SEEKING="Suche &hellip;"
MOD_RFVIDEO_SELECT_DESCRIPTION_LABEL="Group Select Description"
MOD_RFVIDEO_SELECT_LABEL_LABEL="Group Select Label"
MOD_RFVIDEO_SELECT_POSITION_BOTTOM="Bottom"
MOD_RFVIDEO_SELECT_POSITION_LABEL="Group Select Position"
MOD_RFVIDEO_SELECT_POSITION_TOP="Top"
MOD_RFVIDEO_SELECT_SIZE_LABEL="Group Select Size"
MOD_RFVIDEO_SELECT_DESCRIPTION_DESCR="Optionale Beschreibung, die unterhalb des \"select\" Elements angezeigt wird."
MOD_RFVIDEO_SELECT_DESCRIPTION_LABEL="Quellenauswahl-Beschreibung"
MOD_RFVIDEO_SELECT_LABEL_DESCR="Optionale Beschriftung (\"label\" Element) für das \"select\" Element"
MOD_RFVIDEO_SELECT_LABEL_LABEL="Quellenauswahl-Beschriftung"
MOD_RFVIDEO_SELECT_POSITION_BOTTOM="Unten"
MOD_RFVIDEO_SELECT_POSITION_DESCR="Position des \"select\" Input-Elements, das angezeigt wird, wenn es mehr aus eine Quellen-Gruppe gibt. Wählen Sie \"Keine\" wenn Sie nicht wollen, dass es angezeigt wird."
MOD_RFVIDEO_SELECT_POSITION_LABEL="Quellenauswahl-Position"
MOD_RFVIDEO_SELECT_POSITION_TOP="Oben"
MOD_RFVIDEO_SELECT_SIZE_DESCR="Das \"size\" Attribut des \"select\" Elements - Wählen Sie Null, wenn es automatisch auf die Anzahl der Optionen des \"select\" Elements gesetzt werden soll. Eine größere Eingabe als die Anzahl der Optionen wird ignoriert."
MOD_RFVIDEO_SELECT_SIZE_LABEL="Quellenauswahl-Größe"
MOD_RFVIDEO_SOURCE_FILE_DESCR="Wählen Sie eine Videodatei von ihrem Server."
MOD_RFVIDEO_SOURCE_FILE_LABEL="Datei"
MOD_RFVIDEO_SOURCE_GROUPS_LABEL="Source Group"
MOD_RFVIDEO_SOURCE_GROUPS_DESCR="Hier können Sie Quellen-Gruppen hinzufügen. Eine Quellen-Gruppe ist eine Liste von Video-Quellen in unterschiedlichen Formaten für das selbe Video. Sie können mehrere Quellen-Gruppen verwenden, um verschiedene Videoqualitäten anzubieten."
MOD_RFVIDEO_SOURCE_GROUPS_LABEL="Quellen-Gruppe"
MOD_RFVIDEO_SOURCE_TYPE_DESCR="Wählen Sie den Typ der ausgewählten Videodatei."
MOD_RFVIDEO_SOURCE_TYPE_LABEL="Typ"
MOD_RFVIDEO_SOURCES_FIELDSET_LABEL="Sources"
MOD_RFVIDEO_SOURCES_LABEL="Sources"
MOD_RFVIDEO_SOURCES_FIELDSET_LABEL="Quellen"
MOD_RFVIDEO_SOURCES_LABEL="Quellen"
MOD_RFVIDEO_SOURCES_NOTE_DESCR="Die Felder \"Quellenauswahl-Beschriftung\" und \"Quellenauswahl-Beschreibung\" und das Feld \"Beschreibung\" jeder Quellen-Gruppe sind übersetzbar, so dass Sie Sprachkonstanten oder Sprachoverrides verwenden können."
MOD_RFVIDEO_SOURCES_NOTE_LABEL="Hinweis"
MOD_RFVIDEO_STYLESHEET_DESCR="CSS-Stylesheet-Datei, die geladen werden soll - Wählen Sie keine Datei aus, wenn Sie kein Stylesheet laden wollen, z.&nbsp;B. weil Sie den Videoplayer mit der Datei \"user.css\" ihres Templates gestalten. Sie können auch ihre eigene CSS-Datei - und wenn vorhanden minifizierte und gzip-komptimierte Dateien - in den Ordner \"media/mod_rfvideo/css\" hochladen und dann hier auswählen."
MOD_RFVIDEO_STYLESHEET_LABEL="Stylesheet"
MOD_RFVIDEO_SUFFIX_LABEL="Suffix"
MOD_RFVIDEO_USE_DOWNLOAD="Nutzen Sie stattdessen einen der <a href=\"%s\">Downloads</a>."
MOD_RFVIDEO_WIDTH_LABEL="Width"
Expand Down
4 changes: 2 additions & 2 deletions src/language/de-DE/mod_rfvideo.sys.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; Joomla! Project
; (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
; mod_rfvideo
; (C) 2022 Richard Fath <https://www.richard-fath.de>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

Expand Down
26 changes: 24 additions & 2 deletions src/language/en-GB/mod_rfvideo.ini
Original file line number Diff line number Diff line change
@@ -1,37 +1,59 @@
; Joomla! Project
; (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
; mod_rfvideo
; (C) 2022 Richard Fath <https://www.richard-fath.de>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_RFVIDEO="RF Video Player Module"
MOD_RFVIDEO_AUTOPLAY_DESCR="The \"video\" element's \"autoplay\" attribute"
MOD_RFVIDEO_AUTOPLAY_LABEL="Autoplay"
MOD_RFVIDEO_BASIC_NOTE_DESCR="The module title you enter above will be used as \"title\" attribute of the \"video\" element. It is translatable so you can use a language string or language override."
MOD_RFVIDEO_BASIC_NOTE_LABEL="Hint"
MOD_RFVIDEO_CONTROLS_DESCR="The \"video\" element's \"controls\" attribute"
MOD_RFVIDEO_CONTROLS_LABEL="Controls"
MOD_RFVIDEO_DESCRIPTION_LABEL="Description"
MOD_RFVIDEO_DOWNLOAD_LINK_DESCR="An optional link to downloads which is shown when the browser doesn't support HTML 5 video."
MOD_RFVIDEO_DOWNLOAD_LINK_LABEL="Download Link"
MOD_RFVIDEO_HEIGHT_LABEL="Height"
MOD_RFVIDEO_IMAGE_LABEL="Poster Image"
MOD_RFVIDEO_LOADING="Loading video &hellip;"
MOD_RFVIDEO_LOOP_DESCR="The \"video\" element's \"loop\" attribute"
MOD_RFVIDEO_LOOP_LABEL="Loop"
MOD_RFVIDEO_MUTED_DESCR="The \"video\" element's \"muted\" attribute"
MOD_RFVIDEO_MUTED_LABEL="Muted"
MOD_RFVIDEO_NO_BROWSER_SUPPORT="Your browser either does not support the video tag or none of the provided video formats."
MOD_RFVIDEO_PLAYLIST_FIELDSET_LABEL="Playlist"
MOD_RFVIDEO_PLAYLIST_ITEM_POSITION_DESCR="Position in seconds and fractions of seconds, eg \"0\" for the start of the video, or \"10.123\" for that position in the video."
MOD_RFVIDEO_PLAYLIST_ITEM_POSITION_LABEL="Position"
MOD_RFVIDEO_PLAYLIST_ITEM_TITLE_DESCR="Title shown in the playlist."
MOD_RFVIDEO_PLAYLIST_ITEM_TITLE_LABEL="Title"
MOD_RFVIDEO_PLAYLIST_DESCR="Here you add items to your playlist. For each item you have to enter the position in the video in seconds, eg \"0\" for the start of the video, or eg \"10.123\", and the title."
MOD_RFVIDEO_PLAYLIST_LABEL="Playlist"
MOD_RFVIDEO_PLAYLIST_START="Start"
MOD_RFVIDEO_PRELOAD_DESCR="The \"video\" element's \"preload\" attribute"
MOD_RFVIDEO_PRELOAD_LABEL="Preload"
MOD_RFVIDEO_SEEKING="Seeking &hellip;"
MOD_RFVIDEO_SELECT_DESCRIPTION_DESCR="Optional description shown below the \"select\" element"
MOD_RFVIDEO_SELECT_DESCRIPTION_LABEL="Group Select Description"
MOD_RFVIDEO_SELECT_LABEL_DESCR="Optional label for the \"select\" element"
MOD_RFVIDEO_SELECT_LABEL_LABEL="Group Select Label"
MOD_RFVIDEO_SELECT_POSITION_BOTTOM="Bottom"
MOD_RFVIDEO_SELECT_POSITION_DESCR="Position of the \"select\" input element which is shown if there is more than one source group, select \"None\" if you don't want it to be shown."
MOD_RFVIDEO_SELECT_POSITION_LABEL="Group Select Position"
MOD_RFVIDEO_SELECT_POSITION_TOP="Top"
MOD_RFVIDEO_SELECT_SIZE_DESCR="\"size\" attribute of the \"select\" element - select zero when it shall be automatically set to number of options of the \"select\" element. A larger size than the number of options will be ignored."
MOD_RFVIDEO_SELECT_SIZE_LABEL="Group Select Size"
MOD_RFVIDEO_SOURCE_FILE_DESCR="Select a video file from your server."
MOD_RFVIDEO_SOURCE_FILE_LABEL="File"
MOD_RFVIDEO_SOURCE_GROUPS_DESCR="Here you can add source groups. A source group is a list of video sources of different formats for the same video. You can use multiple source groups to provide different video qualities."
MOD_RFVIDEO_SOURCE_GROUPS_LABEL="Source Group"
MOD_RFVIDEO_SOURCE_TYPE_DESCR="Select the type of the selected video file."
MOD_RFVIDEO_SOURCE_TYPE_LABEL="Type"
MOD_RFVIDEO_SOURCES_FIELDSET_LABEL="Sources"
MOD_RFVIDEO_SOURCES_LABEL="Sources"
MOD_RFVIDEO_SOURCES_NOTE_DESCR="The fields \"Group Select Label\" and \"Group Select Description\" and the \"Description\" field of each source group are translatable so you can use language strings or language overrides."
MOD_RFVIDEO_SOURCES_NOTE_LABEL="Hint"
MOD_RFVIDEO_STYLESHEET_DESCR="CSS style sheet file to be loaded - do not make a selection if you don't want to load a style sheet eg because you style the video player with your template's \"user.css\" file. You can also upload your own CSS file - and if available minified gzipped files - to folder \"media/mod_rfvideo/css\" and then select it here."
MOD_RFVIDEO_STYLESHEET_LABEL="Style Sheet"
MOD_RFVIDEO_SUFFIX_LABEL="Suffix"
MOD_RFVIDEO_USE_DOWNLOAD="Use one of the <a href=\"%s\">downloads</a> instead."
MOD_RFVIDEO_WIDTH_LABEL="Width"
Expand Down
4 changes: 2 additions & 2 deletions src/language/en-GB/mod_rfvideo.sys.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; Joomla! Project
; (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
; mod_rfvideo
; (C) 2022 Richard Fath <https://www.richard-fath.de>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

Expand Down
26 changes: 24 additions & 2 deletions src/language/ru-RU/mod_rfvideo.ini
Original file line number Diff line number Diff line change
@@ -1,38 +1,60 @@
; Joomla! Project
; (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
; mod_rfvideo
; (C) 2022 Richard Fath <https://www.richard-fath.de>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_RFVIDEO="Модуль РФ видеоплеера"
MOD_RFVIDEO_AUTOPLAY_DESCR="The \"video\" element's \"autoplay\" attribute"
MOD_RFVIDEO_AUTOPLAY_LABEL="Autoplay"
MOD_RFVIDEO_BASIC_NOTE_DESCR="The module title you enter above will be used as \"title\" attribute of the \"video\" element. It is translatable so you can use a language string or language override."
MOD_RFVIDEO_BASIC_NOTE_LABEL="Hint"
MOD_RFVIDEO_CONTROLS_DESCR="The \"video\" element's \"controls\" attribute"
MOD_RFVIDEO_CONTROLS_LABEL="Controls"
MOD_RFVIDEO_DESCRIPTION_LABEL="Description"
MOD_RFVIDEO_DOWNLOAD_LINK_DESCR="An optional link to downloads which is shown when the browser doesn't support HTML 5 video."
MOD_RFVIDEO_DOWNLOAD_LINK_LABEL="Download Link"
MOD_RFVIDEO_HEIGHT_LABEL="Height"
MOD_RFVIDEO_IMAGE_LABEL="Poster Image"
MOD_RFVIDEO_LOADING="Загрузка видео &hellip;"
MOD_RFVIDEO_LOOP_DESCR="The \"video\" element's \"loop\" attribute"
MOD_RFVIDEO_LOOP_LABEL="Loop"
MOD_RFVIDEO_MUTED_DESCR="The \"video\" element's \"muted\" attribute"
MOD_RFVIDEO_MUTED_LABEL="Muted"
MOD_RFVIDEO_NO_BROWSER_SUPPORT="Ваш браузер либо не поддерживает тег видео, либо не поддерживает ни один из предоставленных форматов видео."
MOD_RFVIDEO_PLAYLIST_FIELDSET_LABEL="Playlist"
MOD_RFVIDEO_PLAYLIST_ITEM_POSITION_DESCR="Position in seconds and fractions of seconds, eg \"0\" for the start of the video, or \"10.123\" for that position in the video."
MOD_RFVIDEO_PLAYLIST_ITEM_POSITION_LABEL="Position"
MOD_RFVIDEO_PLAYLIST_ITEM_TITLE_DESCR="Title shown in the playlist."
MOD_RFVIDEO_PLAYLIST_ITEM_TITLE_LABEL="Title"
MOD_RFVIDEO_PLAYLIST_DESCR="Here you add items to your playlist. For each item you have to enter the position in the video in seconds, eg \"0\" for the start of the video, or eg \"10.123\", and the title."
MOD_RFVIDEO_PLAYLIST_LABEL="Playlist"
MOD_RFVIDEO_PLAYLIST_START="Начало"
MOD_RFVIDEO_PRELOAD_DESCR="The \"video\" element's \"preload\" attribute"
MOD_RFVIDEO_PRELOAD_LABEL="Preload"
MOD_RFVIDEO_SEEKING="Ищу &hellip;"
MOD_RFVIDEO_SELECT_DESCRIPTION_DESCR="Optional description shown below the \"select\" element"
MOD_RFVIDEO_SELECT_DESCRIPTION_LABEL="Group Select Description"
MOD_RFVIDEO_SELECT_LABEL_DESCR="Optional label for the \"select\" element"
MOD_RFVIDEO_SELECT_LABEL_LABEL="Group Select Label"
MOD_RFVIDEO_SELECT_POSITION_BOTTOM="Bottom"
MOD_RFVIDEO_SELECT_POSITION_DESCR="Position of the \"select\" input element which is shown if there is more than one source group, select \"None\" if you don't want it to be shown."
MOD_RFVIDEO_SELECT_POSITION_LABEL="Group Select Position"
MOD_RFVIDEO_SELECT_POSITION_TOP="Top"
MOD_RFVIDEO_SELECT_SIZE_DESCR="\"size\" attribute of the \"select\" element - select zero when it shall be automatically set to number of options of the \"select\" element. A larger size than the number of options will be ignored."
MOD_RFVIDEO_SELECT_SIZE_LABEL="Group Select Size"
MOD_RFVIDEO_SOURCE_FILE_DESCR="Select a video file from your server."
MOD_RFVIDEO_SOURCE_FILE_LABEL="File"
MOD_RFVIDEO_SOURCE_GROUPS_DESCR="Here you can add source groups. A source group is a list of video sources of different formats for the same video. You can use multiple source groups to provide different video qualities."
MOD_RFVIDEO_SOURCE_GROUPS_LABEL="Source Group"
MOD_RFVIDEO_SOURCE_TYPE_DESCR="Select the type of the selected video file."
MOD_RFVIDEO_SOURCE_TYPE_LABEL="Type"
MOD_RFVIDEO_SOURCES_FIELDSET_LABEL="Sources"
MOD_RFVIDEO_SOURCES_LABEL="Sources"
MOD_RFVIDEO_SUFFIX_LABEL="Suffix"
MOD_RFVIDEO_SOURCES_NOTE_DESCR="The fields \"Group Select Label\" and \"Group Select Description\" and the \"Description\" field of each source group are translatable so you can use language strings or language overrides."
MOD_RFVIDEO_SOURCES_NOTE_LABEL="Hint"
MOD_RFVIDEO_STYLESHEET_DESCR="CSS style sheet file to be loaded - do not make a selection if you don't want to load a style sheet eg because you style the video player with your template's \"user.css\" file. You can also upload your own CSS file - and if available minified gzipped files - to folder \"media/mod_rfvideo/css\" and then select it here."
MOD_RFVIDEO_STYLESHEET_LABEL="Style Sheet"
MOD_RFVIDEO_USE_DOWNLOAD="Используйте один из <a href=\"%s\">загрузок</a> вместо этого."
MOD_RFVIDEO_WIDTH_LABEL="Width"
MOD_RFVIDEO_XML_DESCRIPTION="Модуль видеоплеера от Ричард Фатх (немецкий Richard Fath)"
4 changes: 2 additions & 2 deletions src/language/ru-RU/mod_rfvideo.sys.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; Joomla! Project
; (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
; mod_rfvideo
; (C) 2022 Richard Fath <https://www.richard-fath.de>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

Expand Down
Binary file added src/media/css/rfvideo.min.css.gz
Binary file not shown.
22 changes: 15 additions & 7 deletions src/media/js/rfvideo-es5.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
(function () {
'use strict';

function selChangeQ(elSelect, elVideoDiv, elPlaylistDiv, elVideo, sourceGroups) {
/**
* @copyright (C) 2022 Richard Fath <https://www.richard-fath.de>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
if (!Joomla) {
throw new Error('Joomla API was not properly initialized');
}

function sourceSelectChanged(elSelect, elVideoDiv, elPlaylistDiv, elVideo, sourceGroups) {
var vidExt = elVideo.currentSrc.substr(elVideo.currentSrc.lastIndexOf('.'));

if (vidExt === '') {
Expand Down Expand Up @@ -45,7 +53,7 @@
allVideoPlayerDivs.forEach(function (videoPlayerDiv) {
var myVideoDiv = videoPlayerDiv.querySelector('.rfvideo');
var myPlaylistDiv = videoPlayerDiv.querySelector('.rfvideoplaylist');
var mySelectQ = videoPlayerDiv.getElementsByTagName('select')[0];
var mySourceSelect = videoPlayerDiv.getElementsByTagName('select')[0];
var myVideo = videoPlayerDiv.getElementsByTagName('video')[0];
var myStatus = videoPlayerDiv.querySelector('.rfvideostatus');
var myPlaylistItems = videoPlayerDiv.getElementsByTagName('li');
Expand All @@ -65,11 +73,11 @@
_loop(i);
}

if (mySelectQ) {
if (mySourceSelect) {
var mySourceGroups = [];

for (var _i = 0; _i < mySelectQ.size; ++_i) {
var opts = mySelectQ.options[_i].value.split(';');
for (var _i = 0; _i < mySourceSelect.length; ++_i) {
var opts = mySourceSelect.options[_i].value.split(';');

var group = {
'suffix': opts[0],
Expand All @@ -81,8 +89,8 @@
mySourceGroups[_i] = group;
}

mySelectQ.addEventListener('change', function () {
selChangeQ(mySelectQ, myVideoDiv, myPlaylistDiv, myVideo, mySourceGroups);
mySourceSelect.addEventListener('change', function () {
sourceSelectChanged(mySourceSelect, myVideoDiv, myPlaylistDiv, myVideo, mySourceGroups);
});
}

Expand Down
Loading

0 comments on commit 00b1587

Please sign in to comment.