MDL-56869 media_videojs: upgrade video.js to 5.12.6

This commit is contained in:
Marina Glancy 2016-11-10 11:47:27 +08:00
parent b4d6669dd0
commit d76dd4d064
13 changed files with 20272 additions and 20088 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -77,7 +77,7 @@ THE SOFTWARE. */
this.el_.parentNode.className = this.el_.parentNode.className
.replace(' vjs-youtube', '')
.replace(' vjs-youtube-mobile', '');
this.el_.parentNode.removeChild(this.el_);
this.el_.remove();
//Needs to be called after the YouTube player is destroyed, otherwise there will be a null reference exception
Tech.prototype.dispose.call(this);

File diff suppressed because one or more lines are too long

View File

@ -264,7 +264,7 @@ class media_videojs_plugin extends core_media_player_native {
$alias = '';
if ($module === 'video') {
$alias = 'videojs';
$path = new moodle_url('/media/player/videojs/video-js.swf');
$path = new moodle_url('/media/player/videojs/videojs/video-js.swf');
$contents .= $alias . '.options.flash.swf = "' . $path . '";' . "\n";
$contents .= $this->find_language(current_language());
}

View File

@ -1,14 +1,13 @@
VideoJS 5.11.8
VideoJS 5.12.6
--------------
https://github.com/videojs/video.js
Instructions to import VideoJS player into Moodle:
0. Checkout and build videojs source in a separate directory
1. copy 'build/temp/video.js' into 'amd/src/video.js'
2. copy 'build/temp/font/' into 'fonts/' folder
3. copy contens of 'images/' folder into 'pix/' folder
4. copy 'build/temp/video-js.css' into 'styles.css'
1. Download the latest release from https://github.com/videojs/video.js/releases in a separate directory
2. copy 'dist/video.js' into 'amd/src/video.js'
3. copy 'dist/font/' into 'fonts/' folder
4. copy 'dist/video-js.css' into 'styles.css'
Replace
url("font/VideoJS.eot?#iefix")
with
@ -16,14 +15,13 @@ Instructions to import VideoJS player into Moodle:
Search for other relative URLs in this file.
Add stylelint-disable in the beginning.
Add "Modifications of player made by Moodle" to the end of the styles file.
5. copy 'LICENSE' and 'lang/' into 'videojs/' subfolder
6. search source code of video.js for the path to video-js.swf,
download it and store in this folder
Check status of:
https://github.com/videojs/video.js/issues/2777
6. copy 'LICENSE', 'dist/video-js.swf' and 'dist/lang/' into 'videojs/' subfolder
Import plugins:
1. Checkout from https://github.com/videojs/videojs-youtube and build in a separate directory
2. copy 'dist/Youtube.js' into 'amd/src/Youtube.js'
1. Copy https://github.com/videojs/videojs-youtube/blob/master/dist/Youtube.js into 'amd/src/Youtube.js'
In the beginning of the js file replace
define(['videojs']
with

View File

@ -586,9 +586,6 @@ body.vjs-full-window {
-moz-transition: visibility 1s, opacity 1s;
-o-transition: visibility 1s, opacity 1s;
transition: visibility 1s, opacity 1s; }
@media \0screen {
.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {
visibility: hidden; } }
.vjs-controls-disabled .vjs-control-bar,
.vjs-using-native-controls .vjs-control-bar,
@ -599,10 +596,6 @@ body.vjs-full-window {
opacity: 1;
visibility: visible; }
@media \0screen {
.vjs-user-inactive.vjs-playing .vjs-control-bar :before {
content: ""; } }
.vjs-has-started.vjs-no-flex .vjs-control-bar {
display: table; }
@ -1302,8 +1295,22 @@ video::-webkit-media-text-track-display {
.video-js > *:not(.vjs-tech):not(.vjs-poster) {
visibility: hidden; } }
@media \0screen {
.vjs-user-inactive.vjs-playing .vjs-control-bar :before {
content: "";
}
}
@media \0screen {
.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {
visibility: hidden;
}
}
/* Modifications of player made by Moodle: */
/* Audio: https://github.com/videojs/video.js/issues/2777 */
/* Audio: Remove big play button (leave only the button in controls). */
.video-js.vjs-audio .vjs-big-play-button {
display: none;
@ -1322,4 +1329,4 @@ video::-webkit-media-text-track-display {
/* In case of error reset height to the default (otherwise no aspect ratio is available and height becomes 0). */
.video-js.vjs-error {
height: 150px;
}
}

View File

@ -4,14 +4,14 @@
<location>amd/src</location>
<name>VideoJS</name>
<license>Apache</license>
<version>5.11.8</version>
<version>5.12.6</version>
<licenseversion></licenseversion>
</library>
<library>
<location>videojs</location>
<name>VideoJS support files</name>
<license>Apache</license>
<version>5.11.8</version>
<version>5.12.6</version>
<licenseversion></licenseversion>
</library>
</libraries>

View File

@ -30,5 +30,11 @@ videojs.addLanguage("de",{
"This modal can be closed by pressing the Escape key or activating the close button.": "Durch Drücken der Esc-Taste bzw. Betätigung der Schaltfläche \"Schließen\" wird dieses modale Fenster geschlossen.",
", opens captions settings dialog": ", öffnet Einstellungen für Untertitel",
", opens subtitles settings dialog": ", öffnet Einstellungen für Untertitel",
", selected": " (ausgewählt)"
", selected": ", ausgewählt",
"Close Modal Dialog": "Modales Fenster schließen",
"Descriptions": "Beschreibungen",
"descriptions off": "Beschreibungen aus",
"The media is encrypted and we do not have the keys to decrypt it.": "Die Entschlüsselungsschlüssel für den verschlüsselten Medieninhalt sind nicht verfügbar.",
", opens descriptions settings dialog": ", öffnet Einstellungen für Beschreibungen",
"Audio Track": "Tonspur"
});

View File

@ -18,17 +18,23 @@ videojs.addLanguage("el",{
"Captions": "Λεζάντες",
"captions off": "απόκρυψη λεζάντων",
"Chapters": "Κεφάλαια",
"Close Modal Dialog": "Κλείσιμο παραθύρου",
"Descriptions": "Περιγραφές",
"descriptions off": "απόκρυψη περιγραφών",
"Audio Track": "Ροή ήχου",
"You aborted the media playback": "Ακυρώσατε την αναπαραγωγή",
"A network error caused the media download to fail part-way.": "Ένα σφάλμα δικτύου προκάλεσε την αποτυχία μεταφόρτωσης του αρχείου προς αναπαραγωγή.",
"The media could not be loaded, either because the server or network failed or because the format is not supported.": "Το αρχείο προς αναπαραγωγή δεν ήταν δυνατό να φορτωθεί είτε γιατί υπήρξε σφάλμα στον διακομιστή ή το δίκτυο, είτε γιατί ο τύπος του αρχείου δεν υποστηρίζεται.",
"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Η αναπαραγωγή ακυρώθηκε είτε λόγω κατεστραμμένου αρχείου, είτε γιατί το αρχείο απαιτεί λειτουργίες που δεν υποστηρίζονται από το πρόγραμμα περιήγησης που χρησιμοποιείτε.",
"No compatible source was found for this media.": "Δεν βρέθηκε συμβατή πηγή αναπαραγωγής για το συγκεκριμένο αρχείο.",
"Play video": "Αναπαραγωγή βίντεο",
"The media is encrypted and we do not have the keys to decrypt it.": "Το αρχείο προς αναπαραγωγή είναι κρυπτογραφημένo και δεν υπάρχουν τα απαραίτητα κλειδιά αποκρυπτογράφησης.",
"Play Video": "Αναπαραγωγή βίντεο",
"Close": "Κλείσιμο",
"Modal Window": "Aναδυόμενο παράθυρο",
"This is a modal window": "Το παρών είναι ένα αναδυόμενο παράθυρο",
"This modal can be closed by pressing the Escape key or activating the close button.": "Αυτό το παράθυρο μπορεί να εξαφανιστεί πατώντας το πλήκτρο Escape ή πατώντας το κουμπί κλεισίματος.",
", opens captions settings dialog": ", εμφανίζει τις ρυθμίσεις για τις λεζάντες",
", opens subtitles settings dialog": ", εμφανίζει τις ρυθμίσεις για τους υπότιτλους",
", opens descriptions settings dialog": ", εμφανίζει τις ρυθμίσεις για τις περιγραφές",
", selected": ", επιλεγμένο"
});

View File

@ -27,6 +27,7 @@ videojs.addLanguage("en",{
"The media could not be loaded, either because the server or network failed or because the format is not supported.": "The media could not be loaded, either because the server or network failed or because the format is not supported.",
"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",
"No compatible source was found for this media.": "No compatible source was found for this media.",
"The media is encrypted and we do not have the keys to decrypt it.": "The media is encrypted and we do not have the keys to decrypt it.",
"Play Video": "Play Video",
"Close": "Close",
"Modal Window": "Modal Window",

View File

@ -15,12 +15,26 @@ videojs.addLanguage("fr",{
"Playback Rate": "Vitesse de lecture",
"Subtitles": "Sous-titres",
"subtitles off": "Sous-titres désactivés",
"Captions": "Sous-titres",
"captions off": "Sous-titres désactivés",
"Captions": "Sous-titres transcrits",
"captions off": "Sous-titres transcrits désactivés",
"Chapters": "Chapitres",
"Close Modal Dialog": "Fermer la boîte de dialogue modale",
"Descriptions": "Descriptions",
"descriptions off": "descriptions désactivées",
"Audio Track": "Piste audio",
"You aborted the media playback": "Vous avez interrompu la lecture de la vidéo.",
"A network error caused the media download to fail part-way.": "Une erreur de réseau a interrompu le téléchargement de la vidéo.",
"The media could not be loaded, either because the server or network failed or because the format is not supported.": "Cette vidéo n'a pas pu être chargée, soit parce que le serveur ou le réseau a échoué ou parce que le format n'est pas reconnu.",
"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.",
"No compatible source was found for this media.": "Aucune source compatible n'a été trouvée pour cette vidéo."
"No compatible source was found for this media.": "Aucune source compatible n'a été trouvée pour cette vidéo.",
"The media is encrypted and we do not have the keys to decrypt it.": "Le média est chiffré et nous n'avons pas les clés pour le déchiffrer.",
"Play Video": "Lire la vidéo",
"Close": "Fermer",
"Modal Window": "Fenêtre modale",
"This is a modal window": "Ceci est une fenêtre modale",
"This modal can be closed by pressing the Escape key or activating the close button.": "Ce modal peut être fermé en appuyant sur la touche Échap ou activer le bouton de fermeture.",
", opens captions settings dialog": ", ouvrir les paramètres des sous-titres transcrits",
", opens subtitles settings dialog": ", ouvrir les paramètres des sous-titres",
", opens descriptions settings dialog": ", ouvrir les paramètres des descriptions",
", selected": ", sélectionné"
});