diff --git a/.gitattributes b/.gitattributes index 5c0583c105d92ccc8883a9399d3ea8cc59277b54..b08ce3a644553e2ed0a5951c653aa9de9fc29933 100644 --- a/.gitattributes +++ b/.gitattributes @@ -200,16 +200,54 @@ lib/getid3/write.metaflac.php -text lib/getid3/write.php -text lib/getid3/write.real.php -text lib/getid3/write.vorbiscomment.php -text +lib/mejs/lang/ca.js -text +lib/mejs/lang/cs.js -text +lib/mejs/lang/de.js -text +lib/mejs/lang/es.js -text +lib/mejs/lang/fr.js -text +lib/mejs/lang/hr.js -text +lib/mejs/lang/hu.js -text +lib/mejs/lang/it.js -text +lib/mejs/lang/ja.js -text +lib/mejs/lang/ko.js -text +lib/mejs/lang/nl.js -text +lib/mejs/lang/pl.js -text +lib/mejs/lang/pt-br.js -text +lib/mejs/lang/pt.js -text +lib/mejs/lang/ro.js -text +lib/mejs/lang/ru.js -text +lib/mejs/lang/sk.js -text +lib/mejs/lang/sv.js -text +lib/mejs/lang/uk.js -text +lib/mejs/lang/zh-cn.js -text +lib/mejs/lang/zh.js -text lib/mejs/mediaelement-and-player.js -text lib/mejs/mediaelement-and-player.min.js -text +lib/mejs/mediaelement-flash-audio-ogg.swf -text +lib/mejs/mediaelement-flash-audio.swf -text +lib/mejs/mediaelement-flash-video-hls.swf -text +lib/mejs/mediaelement-flash-video-mdash.swf -text +lib/mejs/mediaelement-flash-video.swf -text lib/mejs/mediaelement.js -text lib/mejs/mediaelement.min.js -text +lib/mejs/mediaelementplayer-legacy.css -text +lib/mejs/mediaelementplayer-legacy.min.css -text lib/mejs/mediaelementplayer.css -text lib/mejs/mediaelementplayer.js -text lib/mejs/mediaelementplayer.min.css -text lib/mejs/mediaelementplayer.min.js -text lib/mejs/mejs-controls.png -text lib/mejs/mejs-controls.svg -text +lib/mejs/renderers/dailymotion.js -text +lib/mejs/renderers/dailymotion.min.js -text +lib/mejs/renderers/facebook.js -text +lib/mejs/renderers/facebook.min.js -text +lib/mejs/renderers/soundcloud.js -text +lib/mejs/renderers/soundcloud.min.js -text +lib/mejs/renderers/twitch.js -text +lib/mejs/renderers/twitch.min.js -text +lib/mejs/renderers/vimeo.js -text +lib/mejs/renderers/vimeo.min.js -text /medias_administrations.php -text /medias_autoriser.php -text /medias_fonctions.php -text diff --git a/lib/mejs/lang/ca.js b/lib/mejs/lang/ca.js new file mode 100644 index 0000000000000000000000000000000000000000..0c90c17c884a877e089f27524b8d0341f4890357 --- /dev/null +++ b/lib/mejs/lang/ca.js @@ -0,0 +1,89 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Catalan + * + * @author + * Tongro + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.ca === undefined) { + exports.ca = { + "mejs.plural-form": 1, + "mejs.download-file": "Descarregar arxiu", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Pantalla completa", + "mejs.play": "Reproducció", + "mejs.pause": "Pausa", + // "mejs.time-slider": "Time Slider", + // "mejs.time-help-text": "Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.", + //"mejs.live-broadcast" : "Live Broadcast", + // "mejs.volume-help-text": "Use Up/Down Arrow keys to increase or decrease volume.", + "mejs.unmute": "Reactivar silenci", + "mejs.mute": "Silenci", + // "mejs.volume-slider": "Volume Slider", + "mejs.video-player": "Reproductor de vÃdeo", + "mejs.audio-player": "Reproductor d'à udio", + "mejs.captions-subtitles": "Llegendes/SubtÃtols", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Ningú" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/cs.js b/lib/mejs/lang/cs.js new file mode 100644 index 0000000000000000000000000000000000000000..0a0656c25d731571daaa9b2b97f6d326efc7c760 --- /dev/null +++ b/lib/mejs/lang/cs.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Czech + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.cs === undefined) { + exports.cs = { + "mejs.plural-form": 8, + "mejs.download-file": "Stáhnout soubor", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Celá obrazovka", + "mejs.play": "PÅ™ehrát", + "mejs.pause": "Pozastavit", + "mejs.time-slider": "Posuvný běžec nastavenà Äasu", + "mejs.time-help-text": "Použijte tlaÄÃtka se Å¡ipkami doleva / doprava pro posun o jednu vteÅ™inu, tlaÄÃtka se Å¡ipkami nahoru / dolů pro posun o deset vteÅ™in.", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "Použijte tlaÄÃtka se Å¡ipkami nahoru / dolů pro zesÃlenà nebo zeslabenà hlasitosti.", + "mejs.unmute": "Zapnout zvuk", + "mejs.mute": "Vypnout zvuk", + "mejs.volume-slider": "Posuvný běžec nastavenà hlasitosti", + "mejs.video-player": "PÅ™ehrávaÄ videa", + "mejs.audio-player": "PÅ™ehrávaÄ hudby", + "mejs.captions-subtitles": "Titulky", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Žádný" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/de.js b/lib/mejs/lang/de.js new file mode 100644 index 0000000000000000000000000000000000000000..fc3f5c34eefcac7d1dbd2931e7175f3236f1f7da --- /dev/null +++ b/lib/mejs/lang/de.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * German + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.de === undefined) { + exports.de = { + "mejs.plural-form": 1, + "mejs.download-file": "Datei herunterladen", + "mejs.install-flash": "Ihr Browser unterstützt kein Flash. Bitte aktivieren Sie Flash bzw. laden Sie die aktuellste Flash-Version herunter unter https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Vollbild", + "mejs.play": "Abspielen", + "mejs.pause": "Pause", + "mejs.time-slider": "Zeitschieberegler", + "mejs.time-help-text": "Verwende die Pfeiltaste nach links/rechts, um eine Sekunde zu spulen, hoch/runter um zehn Sekunden zu spulen.", + "mejs.live-broadcast" : "Live-Ãœbertragung", + "mejs.volume-help-text": "Verwende die Pfeiltaste nach oben/nach unten um die Lautstärke zu erhöhen oder zu verringern.", + "mejs.unmute": "Stummschaltung aufheben", + "mejs.mute": "Stummschalten", + "mejs.volume-slider": "Lautstärkeregler", + "mejs.video-player": "Video-Player", + "mejs.audio-player": "Audio-Player", + "mejs.captions-subtitles": "Ãœberschriften/Untertitel", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Keine", + "mejs.afrikaans": "Afrikanisch", + "mejs.albanian": "Albanisch", + "mejs.arabic": "Arabisch", + "mejs.belarusian": "Weißrussisch", + "mejs.bulgarian": "Bulgarisch", + "mejs.catalan": "Katalanisch", + "mejs.chinese": "Chinesisch", + "mejs.chinese-simplified": "Chinesisch (Vereinfacht)", + "mejs.chinese-traditional": "Chinesisch (Traditionell)", + "mejs.croatian": "Kroatisch", + "mejs.czech": "Tschechisch", + "mejs.danish": "Dänisch", + "mejs.dutch": "Niederländisch", + "mejs.english": "Englisch", + "mejs.estonian": "Estnisch", + "mejs.filipino": "Filipino", + "mejs.finnish": "Finnisch", + "mejs.french": "Französisch", + "mejs.galician": "Galicisch", + "mejs.german": "Deutsch", + "mejs.greek": "Griechisch", + "mejs.haitian-creole": "Haitianisch", + "mejs.hebrew": "Hebräisch", + "mejs.hindi": "Hindi", + "mejs.hungarian": "Ungarisch", + "mejs.icelandic": "Isländisch", + "mejs.indonesian": "Indonesisch", + "mejs.irish": "Irisch", + "mejs.italian": "Italienisch", + "mejs.japanese": "Japanisch", + "mejs.korean": "Koreanisch", + "mejs.latvian": "Lettisch", + "mejs.lithuanian": "Litauisch", + "mejs.macedonian": "Mazedonisch", + "mejs.malay": "Malaysisch", + "mejs.maltese": "Maltesisch", + "mejs.norwegian": "Norwegisch", + "mejs.persian": "Persisch", + "mejs.polish": "Polnisch", + "mejs.portuguese": "Portugiesisch", + "mejs.romanian": "Rumänisch", + "mejs.russian": "Russisch", + "mejs.serbian": "Serbisch", + "mejs.slovak": "Slovakisch", + "mejs.slovenian": "Slovenisch", + "mejs.spanish": "Spanisch", + "mejs.swahili": "Swahili", + "mejs.swedish": "Schwedisch", + "mejs.tagalog": "Tagalog", + "mejs.thai": "Thailändisch", + "mejs.turkish": "Türkisch", + "mejs.ukrainian": "Ukrainisch", + "mejs.vietnamese": "Vietnamnesisch", + "mejs.welsh": "Walisisch", + "mejs.yiddish": "Jiddisch" + }; + } +})(mejs.i18n); diff --git a/lib/mejs/lang/es.js b/lib/mejs/lang/es.js new file mode 100644 index 0000000000000000000000000000000000000000..11465e84d763d1b148f992cc188a5570dd2739cb --- /dev/null +++ b/lib/mejs/lang/es.js @@ -0,0 +1,90 @@ +/*! + * This is a `i18n` language object. + * + * Spanish + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * Rafael Miranda (GitHub: @rafa8626) + * + * @see core/i18n.js + */(function (exports) { + if (exports.es === undefined) { + exports.es = { + "mejs.plural-form": 1, + "mejs.download-file": "Descargar archivo", + "mejs.install-flash": "Esta usando un navegador que no tiene activado o instalado el reproductor de Flash. Por favor active el plugin del reproductor de Flash o descargue la versión más reciente en https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Pantalla completa", + "mejs.play": "Reproducción", + "mejs.pause": "Pausa", + "mejs.time-slider": "Control deslizante de tiempo", + "mejs.time-help-text": "Use las flechas Izquierda/Derecha para avanzar un segundo y las flechas Arriba/Abajo para avanzar diez segundos.", + "mejs.live-broadcast": "Transmisión en Vivo", + "mejs.volume-help-text": "Use las flechas Arriba/Abajo para subir o bajar el volumen.", + "mejs.unmute": "Reactivar silencio", + "mejs.mute": "Silencio", + "mejs.volume-slider": "Control deslizante de volumen", + "mejs.video-player": "Reproductor de video", + "mejs.audio-player": "Reproductor de audio", + "mejs.captions-subtitles": "Leyendas/SubtÃtulos", + "mejs.captions-chapters": "CapÃtulos", + "mejs.none": "Ninguno", + "mejs.afrikaans": "Afrikaans", + "mejs.albanian": "Albano", + "mejs.arabic": "Ãrabe", + "mejs.belarusian": "Bielorruso", + "mejs.bulgarian": "Búlgaro", + "mejs.catalan": "Catalán", + "mejs.chinese": "Chino", + "mejs.chinese-simplified": "Chino (Simplificado)", + "mejs.chinese-traditional": "Chino (Tradicional)", + "mejs.croatian": "Croata", + "mejs.czech": "Checo", + "mejs.danish": "Danés", + "mejs.dutch": "Holandés", + "mejs.english": "Inglés", + "mejs.estonian": "Estoniano", + "mejs.filipino": "Filipino", + "mejs.finnish": "Finlandés", + "mejs.french": "Francés", + "mejs.galician": "Gallego", + "mejs.german": "Alemán", + "mejs.greek": "Griego", + "mejs.haitian-creole": "Haitiano Criollo", + "mejs.hebrew": "Hebreo", + "mejs.hindi": "Hindi", + "mejs.hungarian": "Húngaro", + "mejs.icelandic": "Islandés", + "mejs.indonesian": "Indonesio", + "mejs.irish": "Irlandés", + "mejs.italian": "Italiano", + "mejs.japanese": "Japonés", + "mejs.korean": "Coreano", + "mejs.latvian": "Letón", + "mejs.lithuanian": "Lituano", + "mejs.macedonian": "Macedonio", + "mejs.malay": "Malayo", + "mejs.maltese": "Maltés", + "mejs.norwegian": "Noruego", + "mejs.persian": "Persa", + "mejs.polish": "Polaco", + "mejs.portuguese": "Portugués", + "mejs.romanian": "Rumano", + "mejs.russian": "Ruso", + "mejs.serbian": "Serbio", + "mejs.slovak": "Eslovaco", + "mejs.slovenian": "Eslovenio", + "mejs.spanish": "Español", + "mejs.swahili": "Swahili", + "mejs.swedish": "Suizo", + "mejs.tagalog": "Tagalog", + "mejs.thai": "Tailandés", + "mejs.turkish": "Turco", + "mejs.ukrainian": "Ucraniano", + "mejs.vietnamese": "Vietnamita", + "mejs.welsh": "Galés", + "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/fr.js b/lib/mejs/lang/fr.js new file mode 100644 index 0000000000000000000000000000000000000000..9f45257d3d3ee27036bf3de1a43d895446ea5d88 --- /dev/null +++ b/lib/mejs/lang/fr.js @@ -0,0 +1,91 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * French + * + * @author + * Luc Poupard (Twitter: @klohFR) + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.fr === undefined) { + exports.fr = { + "mejs.plural-form": 2, + "mejs.download-file": "Télécharger le fichier", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Plein écran", + "mejs.play": "Lecture", + "mejs.pause": "Pause", + "mejs.time-slider": "Curseur temporel", + "mejs.time-help-text": "Utilisez les flèches Gauche/Droite du clavier pour avancer d'une seconde, les flèches Haut/Bas pour avancer de 10 secondes.", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "Utilisez les flèches Haut/Bas du clavier pour augmenter ou diminuer le volume.", + "mejs.unmute": "Activer le son", + "mejs.mute": "Désactiver le son", + "mejs.volume-slider": "Volume", + "mejs.video-player": "Lecteur Vidéo", + "mejs.audio-player": "Lecteur Audio", + "mejs.captions-subtitles": "Sous-titres", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Aucun" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/hr.js b/lib/mejs/lang/hr.js new file mode 100644 index 0000000000000000000000000000000000000000..b468e49b8d1715c5b98eb9ff98bcf345cac4e0f1 --- /dev/null +++ b/lib/mejs/lang/hr.js @@ -0,0 +1,87 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Croatian + * + * @author + * Hrvoj3e (hrvoj3e@gmail.com) * @see core/i18n.js + */ +(function (exports) { + if (exports.hr === undefined) { + exports.hr = { + "mejs.plural-form": 7, + "mejs.download-file": "Preuzmi datoteku", + "mejs.install-flash": "Koristite preglednik koji nema omogućen ili instaliran Flash preglednik. Molimo Vas ukljuÄite Flash dodatak ili preuzmite najnoviju verziju s https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Puni zaslon", + "mejs.play": "Pokreni", + "mejs.pause": "Zaustavi", + "mejs.time-slider": "Vremenska traka", + "mejs.time-help-text": "Koristi strelice lijevo/desno za pomak naprijed za 1 sekundu te gore/dolje za pomak od 10 sekundi.", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "Koristi strelice gore/dolje za pojaÄavanje ili stiÅ¡avanje.", + "mejs.unmute": "UkljuÄi zvuk", + "mejs.mute": "IskljuÄi zvuk", + "mejs.volume-slider": "PokazivaÄ razine zvuka", + "mejs.video-player": "Video preglednik", + "mejs.audio-player": "Audio preglednik", + "mejs.captions-subtitles": "Opisi/Prijevodi", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "NiÅ¡ta", + "mejs.afrikaans": "AfriÄki", + "mejs.albanian": "Albanski", + "mejs.arabic": "Arapski", + "mejs.belarusian": "Bjeloruski", + "mejs.bulgarian": "Bugarski", + "mejs.catalan": "Katalonski", + "mejs.chinese": "Kineski", + "mejs.chinese-simplified": "Kineski (jednostavni)", + "mejs.chinese-traditional": "Kineski (tradicionalni)", + "mejs.croatian": "Hrvatski", + "mejs.czech": "ÄŒeÅ¡ki", + "mejs.danish": "Danski", + "mejs.dutch": "Nizozemski", + "mejs.english": "Engleski", + "mejs.estonian": "Estonski", + "mejs.filipino": "Filipinski", + "mejs.finnish": "Finski", + "mejs.french": "Francuski", + "mejs.galician": "Galicijski", + "mejs.german": "NjemaÄki", + "mejs.greek": "GrÄki", + "mejs.haitian-creole": "Haićanski kreolski", + "mejs.hebrew": "Hebrejski", + "mejs.hindi": "Hindski", + "mejs.hungarian": "MaÄ‘arski", + "mejs.icelandic": "Islandski", + "mejs.indonesian": "Indonezijski", + "mejs.irish": "Irski", + "mejs.italian": "Talijanski", + "mejs.japanese": "Japanski", + "mejs.korean": "Korejski", + "mejs.latvian": "Latvijski", + "mejs.lithuanian": "Litvanski", + "mejs.macedonian": "Makedonski", + "mejs.malay": "Malajski", + "mejs.maltese": "MalteÅ¡ki", + "mejs.norwegian": "NorveÅ¡ki", + "mejs.persian": "Perzijski", + "mejs.polish": "Poljski", + "mejs.portuguese": "Portugalski", + "mejs.romanian": "Rumunjski", + "mejs.russian": "Ruski", + "mejs.serbian": "Srpski", + "mejs.slovak": "SlovaÄki", + "mejs.slovenian": "Slovenski", + "mejs.spanish": "Å panjolski", + "mejs.swahili": "Svahili", + "mejs.swedish": "Å vedski", + "mejs.tagalog": "TagaloÅ¡ki", + "mejs.thai": "Tajski", + "mejs.turkish": "Turski", + "mejs.ukrainian": "Ukrajinski", + "mejs.vietnamese": "Vijetnamski", + "mejs.welsh": "VelÅ¡ki", + "mejs.yiddish": "JidiÅ¡ki" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/hu.js b/lib/mejs/lang/hu.js new file mode 100644 index 0000000000000000000000000000000000000000..f66dbe19417f1ee1ac1840508a73b338a17704a2 --- /dev/null +++ b/lib/mejs/lang/hu.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Hungarian + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.hu === undefined) { + exports.hu = { + "mejs.plural-form": 1, + "mejs.download-file": "Fájl letöltése", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Teljes képernyÅ‘", + "mejs.play": "Lejátszás", + "mejs.pause": "Szünet", + "mejs.time-slider": "IdÅ‘ csúszka", + "mejs.time-help-text": "Használja a Bal/Jobb nyÃl gombokat az egy másodperces léptetéshez, a Fel/Le nyÃl gombokat a tÃz másodperces léptetéshez.", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "Használja a Fel/Le nyÃl gombokat a hangerÅ‘ növeléséhez vagy csökkentéséhez.", + "mejs.unmute": "NémÃtás feloldása", + "mejs.mute": "NémÃtás", + "mejs.volume-slider": "HangerÅ‘csúszka", + "mejs.video-player": "Videolejátszó", + "mejs.audio-player": "Audiolejátszó", + "mejs.captions-subtitles": "KépaláÃrás/Feliratok", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Nincs" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/it.js b/lib/mejs/lang/it.js new file mode 100644 index 0000000000000000000000000000000000000000..2f794f0e160056c3c734ec2fbc9d3ebee6702689 --- /dev/null +++ b/lib/mejs/lang/it.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Italian + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha "SoftCreatR" Greuel + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.it === undefined) { + exports.it = { + "mejs.plural-form": 1, + "mejs.download-file": "Scaricare il file", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Schermo intero", + "mejs.play": "Eseguire", + "mejs.pause": "Pausa", + "mejs.time-slider": "Barra di scorrimento", + "mejs.time-help-text": "Utilizzare i tasti Freccia sinistra/Freccia destra per avanzare di un secondo, Freccia Su/Giù per avanzare dieci secondi.", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "Utilizzare i tasti Freccia Su/Giù per aumentare o diminuire il volume.", + "mejs.unmute": "Disattivare muto", + "mejs.mute": "Muto", + "mejs.volume-slider": "Barra del volume", + "mejs.video-player": "Lettore Video", + "mejs.audio-player": "Lettore Audio", + "mejs.captions-subtitles": "Acquisizioni/sottotitoli", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Nessuno" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/ja.js b/lib/mejs/lang/ja.js new file mode 100644 index 0000000000000000000000000000000000000000..69fa1e469476c6862e500821332e51d3bc7b3590 --- /dev/null +++ b/lib/mejs/lang/ja.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Japanese + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha "SoftCreatR" Greuel + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.ja === undefined) { + exports.ja = { + "mejs.plural-form": 0, + "mejs.download-file": "ファイルをダウンãƒãƒ¼ãƒ‰ã™ã‚‹", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "全画é¢", + "mejs.play": "å†ç”Ÿ", + "mejs.pause": "一時åœæ¢", + "mejs.time-slider": "タイムスライダー", + "mejs.time-help-text": "1秒進ã‚ã‚‹ã«ã¯å·¦/å³çŸ¢å°ã‚’ã‚ーをã€10秒進ã‚ã‚‹ã«ã¯ä¸Š/下矢å°ã‚’使ã„ã¾ã™ã€‚", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "音é‡ã‚’上ã’ãŸã‚Šä¸‹ã’ãŸã‚Šã™ã‚‹ã«ã¯ã€ä¸Š/下矢å°ã‚’使ã„ã¾ã™ã€‚", + "mejs.unmute": "ミュートを解除", + "mejs.mute": "ミュート", + "mejs.volume-slider": "音é‡ã‚¹ãƒ©ã‚¤ãƒ€ãƒ¼", + "mejs.video-player": "ビデオプレーヤー", + "mejs.audio-player": "オーディオプレーヤー", + "mejs.captions-subtitles": "ã‚ャプション/å—幕", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "ãªã—" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/ko.js b/lib/mejs/lang/ko.js new file mode 100644 index 0000000000000000000000000000000000000000..2d577de64f032c1fcfd01af020c65c1e8d1f5697 --- /dev/null +++ b/lib/mejs/lang/ko.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Korean + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha "SoftCreatR" Greuel + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.ko === undefined) { + exports.ko = { + "mejs.plural-form": 0, + "mejs.download-file": "íŒŒì¼ ë‹¤ìš´ë¡œë“œ", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "ì „ì²´í™”ë©´", + "mejs.play": "ìž‘ë™", + "mejs.pause": "ì •ì§€", + "mejs.time-slider": "시간 슬ë¼ì´ë”", + "mejs.time-help-text": "1ì´ˆ ì „ì§„í•˜ë ¤ë©´ 좌/우측 화살표를 ì‚¬ìš©í•˜ì‹œê³ 10ì´ˆ ì „ì§„í•˜ë ¤ë©´ 위/아래 화살표를 사용하세요.", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "ë³¼ë¥¨ì„ ë†’ì´ê±°ë‚˜ ë‚®ì¶”ë ¤ë©´ 위/아래 화살표를 ì´ìš©í•˜ì„¸ìš”.", + "mejs.unmute": "ìŒì†Œê±° í•´ì œ", + "mejs.mute": "ë§ ì—†ëŠ”", + "mejs.volume-slider": "볼륨 슬ë¼ì´ë”", + "mejs.video-player": "비디오 í”Œë ˆì´ì–´", + "mejs.audio-player": "오디오 í”Œë ˆì´ì–´", + "mejs.captions-subtitles": "캡션/ìžë§‰", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "ì—†ìŒ" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/nl.js b/lib/mejs/lang/nl.js new file mode 100644 index 0000000000000000000000000000000000000000..1ab99c4c3670b2fe4a36cb92e3f44bd2c8c1fb52 --- /dev/null +++ b/lib/mejs/lang/nl.js @@ -0,0 +1,91 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Dutch + * + * @author + * Leonard de Ruijter, Twitter: @LeonarddR + * Jalios (Twitter: @Jalios) + * Sascha "SoftCreatR" Greuel + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.nl === undefined) { + exports.nl = { + "mejs.plural-form": 1, + "mejs.download-file": "Bestand downloaden", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Volledig scherm", + "mejs.play": "Afspelen", + "mejs.pause": "Pauzeren", + "mejs.time-slider": "Tijd schuifbalk", + "mejs.time-help-text": "Gebruik pijl naar links/rechts om per seconde te springen, pijl omhoog/omlaag om per tien seconden te springen.", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "Gebruik pijl omhoog/omlaag om het volume te verhogen/verlagen.", + "mejs.unmute": "Dempen opheffen", + "mejs.mute": "Dempen", + "mejs.volume-slider": "Volume schuifbalk", + "mejs.video-player": "Videospeler", + "mejs.audio-player": "Audiospeler", + "mejs.captions-subtitles": "Bijschriften/ondertiteling", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Geen" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/pl.js b/lib/mejs/lang/pl.js new file mode 100644 index 0000000000000000000000000000000000000000..77bd398afcc678ca50c3e004a6d1197604f2b921 --- /dev/null +++ b/lib/mejs/lang/pl.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Polish + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.pl === undefined) { + exports.pl = { + "mejs.plural-form": 9, + "mejs.download-file": "Pobierz plik", + "mejs.install-flash": "Twoja przeglÄ…darka nie ma wÅ‚Ä…czonej lub zainstalowanej wtyczki Flash Player. Prosimy jÄ… wÅ‚Ä…czyć lub pobrać najnowszÄ… wersjÄ™ ze strony https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "PeÅ‚ny ekran", + "mejs.play": "Odtwarzaj", + "mejs.pause": "Wstrzymaj", + "mejs.time-slider": "Suwak czasu", + "mejs.time-help-text": "StrzaÅ‚ki w lewo/w prawo powodujÄ… przewijanie o sekundÄ™, strzaÅ‚ki w górÄ™/w dół o dziesięć sekund.", + "mejs.live-broadcast": "Transmisja na żywo", + "mejs.volume-help-text": "Aby zwiÄ™kszyć lub zmniejszyć gÅ‚oÅ›ność, użyj strzaÅ‚ek w górÄ™/w dół.", + "mejs.unmute": "WyÅ‚Ä…cz wyciszenie", + "mejs.mute": "Wycisz", + "mejs.volume-slider": "Suwak gÅ‚oÅ›noÅ›ci", + "mejs.video-player": "Odtwarzacz wideo", + "mejs.audio-player": "Odtwarzacz audio", + "mejs.captions-subtitles": "Podpisy/napisy", + "mejs.captions-chapters": "RozdziaÅ‚y", + "mejs.none": "Brak", + "mejs.afrikaans": "AfrykaÅ„ski", + "mejs.albanian": "AlbaÅ„ski", + "mejs.arabic": "Arabski", + "mejs.belarusian": "BiaÅ‚oruski", + "mejs.bulgarian": "BuÅ‚garski", + "mejs.catalan": "KataloÅ„ski", + "mejs.chinese": "ChiÅ„ski", + "mejs.chinese-simplified": "ChiÅ„ski (uproszczony)", + "mejs.chinese-traditional": "ChiÅ„ski (tradycyjny)", + "mejs.croatian": "Chorwacki", + "mejs.czech": "Czeski", + "mejs.danish": "DuÅ„ski", + "mejs.dutch": "Holenderski", + "mejs.english": "Angielski", + "mejs.estonian": "EstoÅ„ski", + "mejs.filipino": "FilipiÅ„ski", + "mejs.finnish": "FiÅ„ski", + "mejs.french": "Francuski", + "mejs.galician": "Galicyjski", + "mejs.german": "Niemiecki", + "mejs.greek": "Grecki", + "mejs.haitian-creole": "HaitaÅ„ski", + "mejs.hebrew": "Hebrajski", + "mejs.hindi": "Hinduski", + "mejs.hungarian": "WÄ™gierski", + "mejs.icelandic": "Islandzki", + "mejs.indonesian": "Indonezyjski", + "mejs.irish": "Irlandzki", + "mejs.italian": "WÅ‚oski", + "mejs.japanese": "JapoÅ„ski", + "mejs.korean": "KoreaÅ„ski", + "mejs.latvian": "Åotewski", + "mejs.lithuanian": "Litewski", + "mejs.macedonian": "MacedoÅ„ski", + "mejs.malay": "Malajski", + "mejs.maltese": "MaltaÅ„ski", + "mejs.norwegian": "Norweski", + "mejs.persian": "Perski", + "mejs.polish": "Polski", + "mejs.portuguese": "Portugalski", + "mejs.romanian": "RumuÅ„ski", + "mejs.russian": "Rosyjski", + "mejs.serbian": "Serbski", + "mejs.slovak": "SÅ‚owacki", + "mejs.slovenian": "SÅ‚oweÅ„ski", + "mejs.spanish": "HiszpaÅ„ski", + "mejs.swahili": "Suahili", + "mejs.swedish": "Szwedzki", + "mejs.tagalog": "Tagalski", + "mejs.thai": "Tajski", + "mejs.turkish": "Turecki", + "mejs.ukrainian": "UkraiÅ„ski", + "mejs.vietnamese": "Wietnamski", + "mejs.welsh": "Walijski", + "mejs.yiddish": "Jidysz" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/pt-br.js b/lib/mejs/lang/pt-br.js new file mode 100644 index 0000000000000000000000000000000000000000..4357e70946028b2095be47b48a7f711450953325 --- /dev/null +++ b/lib/mejs/lang/pt-br.js @@ -0,0 +1,91 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Brazilian (Portuguese) + * + * @author + * Armando Meziat (Twitter: @odnamrataizem) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports['pt-BR'] === undefined) { + exports['pt-BR'] = { + "mejs.plural-form": 2, + "mejs.download-file": "Baixar arquivo", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Tela inteira", + //"mejs.play": "Play", + //"mejs.pause": "Pause", + //"mejs.time-slider": "Time Slider", + //"mejs.time-help-text": "Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.", + //"mejs.live-broadcast" : "Live Broadcast", + //"mejs.time-skip-back": "Skip back %1 second(s)", + //"mejs.volume-help-text": "Use Up/Down Arrow keys to increase or decrease volume.", + "mejs.unmute": "Tirar silêncio", + "mejs.mute": "Silenciar", + //"mejs.volume-slider": "Volume Slider", + //"mejs.video-player": "Video Player", + //"mejs.audio-player": "Audio Player", + "mejs.captions-subtitles": "Legendas", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Sem legendas" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/pt.js b/lib/mejs/lang/pt.js new file mode 100644 index 0000000000000000000000000000000000000000..7d5a4a84748f7c61da31e212fa34fee409a8ba31 --- /dev/null +++ b/lib/mejs/lang/pt.js @@ -0,0 +1,92 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Portuguese + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.pt === undefined) { + exports.pt = { + "mejs.plural-form": 1, + "mejs.download-file": "Descarregar o ficheiro", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Ecrã completo", + "mejs.play": "Reprodução", + "mejs.pause": "Pausa", + "mejs.time-slider": "Deslizador do tempo", + "mejs.time-help-text": "Use as teclas das setas para a esquerda/direita para avançar um segundo, e as setas para cima/baixo para avançar dez segundos.", + //"mejs.live-broadcast" : "Live Broadcast", + + + "mejs.volume-help-text": "Use as teclas das setas para cima/baixo para aumentar ou diminuir o volume.", + "mejs.unmute": "Voltar ao som", + "mejs.mute": "Silêncio", + "mejs.volume-slider": "Deslizador do volume", + "mejs.video-player": "Leitor de vÃdeo", + "mejs.audio-player": "Leitor de áudio", + "mejs.captions-subtitles": "Legendas", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Nenhum" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/ro.js b/lib/mejs/lang/ro.js new file mode 100644 index 0000000000000000000000000000000000000000..cabbe842601f9dc0049348d64860493c5a9ff288 --- /dev/null +++ b/lib/mejs/lang/ro.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Romanian + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.ro === undefined) { + exports.ro = { + "mejs.plural-form": 5, + "mejs.download-file": "Descarcă fiÅŸierul", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Ecran complet", + "mejs.play": "Redare", + "mejs.pause": "Pauză", + "mejs.time-slider": "Cursor timp", + "mejs.time-help-text": "Utilizează tastele săgeată Stânga/Dreapta pentru a avansa o secundă ÅŸi săgeÅ£ile Sus/Jos pentru a avansa zece secunde.", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "Utilizează tastele de săgeată Sus/Jos pentru a creÅŸte/micÅŸora volumul", + "mejs.unmute": "Cu sunet", + "mejs.mute": "Fără sunet", + "mejs.volume-slider": "Cursor volum", + "mejs.video-player": "Player video", + "mejs.audio-player": "Player audio", + "mejs.captions-subtitles": "Legende/Subtitrări", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Niciunul" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/ru.js b/lib/mejs/lang/ru.js new file mode 100644 index 0000000000000000000000000000000000000000..bd87300eaa0b7796c2115a2ba52a1a1827d7c5ea --- /dev/null +++ b/lib/mejs/lang/ru.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Russian + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.ru === undefined) { + exports.ru = { + "mejs.plural-form": 7, + "mejs.download-file": "Скачать файл", + "mejs.install-flash": "Flash player в вашем браузере не уÑтановлен или отключен. ПожалуйÑта включите ваш Flash player или Ñкачайте поÑледнюю верÑию Ñ https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "ПолноÑкранный режим", + "mejs.play": "ВоÑпроизвеÑти", + "mejs.pause": "Пауза", + "mejs.time-slider": "Слайдер времени", + "mejs.time-help-text": "ИÑпользуйте Левую/Правую клавиши Ñо Ñтрелками, чтобы продвинутьÑÑ Ð½Ð° одну Ñекунду, клавиши Ñо Ñтрелками Вверх/Вниз, чтобы продвинутьÑÑ Ð½Ð° деÑÑÑ‚ÑŒ Ñекунд.", + "mejs.live-broadcast" : "ПрÑÐ¼Ð°Ñ Ñ‚Ñ€Ð°Ð½ÑлÑциÑ", + "mejs.volume-help-text": "ИÑпользуйте клавиши Ñо Ñтрелками Вверх/Вниз, чтобы увеличить или уменьшить громкоÑÑ‚ÑŒ.", + "mejs.unmute": "Включить звук", + "mejs.mute": "Отключить звук", + "mejs.volume-slider": "Слайдер громкоÑти", + "mejs.video-player": "Видеоплеер", + "mejs.audio-player": "Ðудиоплеер", + "mejs.captions-subtitles": "Титры/Субтитры", + "mejs.captions-chapters": "Главы", + "mejs.none": "Ðет", + "mejs.afrikaans": "ÐфриканÑкий", + "mejs.albanian": "ÐлбанÑкий", + "mejs.arabic": "ÐрабÑкий", + "mejs.belarusian": "БелоруÑÑкий", + "mejs.bulgarian": "БолгарÑкий", + "mejs.catalan": "КаталонÑкий", + "mejs.chinese": "КитайÑкий", + "mejs.chinese-simplified": "КитайÑкий (упрощенный)", + "mejs.chinese-traditional": "Chinese (традиционный)", + "mejs.croatian": "ХорватÑкий", + "mejs.czech": "ЧешÑкий", + "mejs.danish": "ДатÑкий", + "mejs.dutch": "ГолландÑкий", + "mejs.english": "ÐнглийÑкий", + "mejs.estonian": "ÐÑтонÑкий", + "mejs.filipino": "ФилиппинÑкий", + "mejs.finnish": "ФинÑкий", + "mejs.french": "ФранцузÑкий", + "mejs.galician": "ГалиÑийÑкий", + "mejs.german": "Ðемецкий", + "mejs.greek": "ГречеÑкий", + "mejs.haitian-creole": "ГаитÑнÑкий креольÑкий", + "mejs.hebrew": "Иврит", + "mejs.hindi": "Хинди", + "mejs.hungarian": "ВенгерÑкий", + "mejs.icelandic": "ИÑландÑкий", + "mejs.indonesian": "ИндонезийÑкий", + "mejs.irish": "ИрландÑкий", + "mejs.italian": "ИтальÑнÑкий", + "mejs.japanese": "ЯпонÑкий", + "mejs.korean": "КорейÑкий", + "mejs.latvian": "ЛатышÑкий", + "mejs.lithuanian": "ЛитовÑкий", + "mejs.macedonian": "МакедонÑкий", + "mejs.malay": "МалайÑкий", + "mejs.maltese": "МальтийÑкий", + "mejs.norwegian": "ÐорвежÑкий", + "mejs.persian": "ПерÑидÑкий", + "mejs.polish": "ПольÑкий", + "mejs.portuguese": "ПортугальÑкий", + "mejs.romanian": "РумынÑкий", + "mejs.russian": "РуÑÑкий", + "mejs.serbian": "СербÑкий", + "mejs.slovak": "Словацкий", + "mejs.slovenian": "СловенÑкий", + "mejs.spanish": "ИÑпанÑкий", + "mejs.swahili": "Суахили", + "mejs.swedish": "ШведÑкий", + "mejs.tagalog": "ТагальÑкий", + "mejs.thai": "ТайÑкий", + "mejs.turkish": "Турецкий", + "mejs.ukrainian": "УкраинÑкий", + "mejs.vietnamese": "ВьетнамÑкий", + "mejs.welsh": "ВаллийÑкий", + "mejs.yiddish": "Идиш" + }; + } +})(mejs.i18n); diff --git a/lib/mejs/lang/sk.js b/lib/mejs/lang/sk.js new file mode 100644 index 0000000000000000000000000000000000000000..d8b840bff143dc436d380616d66c81b693f695d9 --- /dev/null +++ b/lib/mejs/lang/sk.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Slovak + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.sk === undefined) { + exports.sk = { + "mejs.plural-form": 8, + "mejs.download-file": "PrevziaÅ¥ súbor", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Celá obrazovka", + "mejs.play": "PrehraÅ¥", + "mejs.pause": "PozastaviÅ¥", + "mejs.time-slider": "PosúvaÄ Äasu", + "mejs.time-help-text": "Klávesmi so Å¡Ãpkou doľava/doprava posuniete o jednu sekundu, Å¡Ãpkami nahor/ nadol posuniete o desaÅ¥ sekúnd.", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "Klávesmi so Å¡Ãpkou nahor/nadol zvýšite alebo znÞite hlasitosÅ¥.", + "mejs.unmute": "ZruÅ¡iÅ¥ stlmenie", + "mejs.mute": "StlmiÅ¥", + "mejs.volume-slider": "PosúvaÄ hlasitosti", + "mejs.video-player": "PrehrávaÄ videa", + "mejs.audio-player": "PrehrávaÄ zvuku", + "mejs.captions-subtitles": "Skryté titulky/Titulky", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "Žiadne" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/sv.js b/lib/mejs/lang/sv.js new file mode 100644 index 0000000000000000000000000000000000000000..7cc402da391dcb8d689b953c521df4c052f968b5 --- /dev/null +++ b/lib/mejs/lang/sv.js @@ -0,0 +1,89 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Swedish + * + * @author + * Petter (Twitter: @petter_j) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.sv === undefined) { + exports.sv = { + "mejs.plural-form": 1, + // "mejs.download-file": "Download File", + "mejs.install-flash": "Du använder en webbläsare som inte har Flash Player aktiverat eller installerad. Aktivera Flash Player eller hämta den senaste versionen frÃ¥n https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Fullskärm", + "mejs.play": "Spela", + "mejs.pause": "Pausa", + "mejs.time-slider": "Tidslinje", + "mejs.time-help-text": "Använd Vänster/Höger piltangent för att spola en sekund, Upp/Ner piltangent spola tio sekunder.", + "mejs.live-broadcast": "Livesändning", + "mejs.volume-help-text": "Använd Upp/Ner piltangent för att öka eller minska volymen.", + "mejs.unmute": "Ljud pÃ¥", + "mejs.mute": "Ljud av", + "mejs.volume-slider": "Volymkontroll", + "mejs.video-player": "Video Spelare", + "mejs.audio-player": "Audio Spelare", + "mejs.captions-subtitles": "Textning/Undertexter", + "mejs.captions-chapters": "Kapitel", + "mejs.none": "Ingen", + "mejs.afrikaans": "Afrikaans", + "mejs.albanian": "Albanska", + "mejs.arabic": "Arabiska", + "mejs.belarusian": "Nederländska", + "mejs.bulgarian": "Bulgariska", + "mejs.catalan": "Katalanska", + "mejs.chinese": "Kinesiska", + "mejs.chinese-simplified": "Kinesiska (Förenklad)", + "mejs.chinese-traditional": "Kinesiska (Traditionell)", + "mejs.croatian": "Kroatiska", + "mejs.czech": "Tjeckiska", + "mejs.danish": "Danska", + "mejs.dutch": "Holländska", + "mejs.english": "Engelska", + "mejs.estonian": "Estniska", + "mejs.filipino": "Filipinska", + "mejs.finnish": "Finska", + "mejs.french": "Franska", + "mejs.galician": "Galiciska", + "mejs.german": "Tyska", + "mejs.greek": "Grekiska", + "mejs.haitian-creole": "Haitisk kreolsk", + "mejs.hebrew": "Hebreiska", + "mejs.hindi": "Hindi", + "mejs.hungarian": "Ungerska", + "mejs.icelandic": "Isländska", + "mejs.indonesian": "Indonesiska", + "mejs.irish": "Irländska", + "mejs.italian": "Italienska", + "mejs.japanese": "Japanska", + "mejs.korean": "Koreanska", + "mejs.latvian": "Lettiska", + "mejs.lithuanian": "Litauiska", + "mejs.macedonian": "Makedonska", + "mejs.malay": "Malaysiska", + "mejs.maltese": "Maltesiska", + "mejs.norwegian": "Norska", + "mejs.persian": "Persiska", + "mejs.polish": "Polska", + "mejs.portuguese": "Portugisiska", + "mejs.romanian": "Romänska", + "mejs.russian": "Ryska", + "mejs.serbian": "Serbiska", + "mejs.slovak": "Slovakiska", + "mejs.slovenian": "Slovenska", + "mejs.spanish": "Spanska", + "mejs.swahili": "Swahiliska", + "mejs.swedish": "Svenska", + "mejs.tagalog": "Tagalogiska", + "mejs.thai": "Thailänska", + "mejs.turkish": "Turkiska", + "mejs.ukrainian": "Ukrainska", + "mejs.vietnamese": "Vietnamesiska", + "mejs.welsh": "Skotska", + "mejs.yiddish": "Jiddisch" + }; + } +})(mejs.i18n); diff --git a/lib/mejs/lang/uk.js b/lib/mejs/lang/uk.js new file mode 100644 index 0000000000000000000000000000000000000000..99bc3ffc976733407b8071d143f0e8868dd77070 --- /dev/null +++ b/lib/mejs/lang/uk.js @@ -0,0 +1,89 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Ukrainian + * + * @author + * Dmitry Krekota (dmitry.krekota@gmail.com) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.uk === undefined) { + exports.uk = { + "mejs.plural-form": 7, + // "mejs.download-file": "Download File", + "mejs.install-flash": "Flash Player у вашому браузері не вÑтановлений або відключений. Будь лаÑка включіть Flash Player або Ñкачайте оÑтанню верÑÑ–ÑŽ із https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "Повноекранний режим", + "mejs.play": "ПуÑк", + "mejs.pause": "Пауза", + "mejs.time-slider": "Повзунок чаÑу", + "mejs.time-help-text": "ВикориÑтовуйте ліву/праву клавіші зі Ñтрілками, щоб переміÑтитиÑÑ Ð½Ð° одну Ñекунду, або клавіші вверх/вниз, щоб переміÑтитиÑÑ Ð½Ð° деÑÑÑ‚ÑŒ Ñекунд.", + "mejs.live-broadcast" : "ПрÑма транÑлÑціÑ", + "mejs.volume-help-text": "ВикориÑтовуйте клавіші зі Ñтрілками вверх/вниз, щоб збільшити або зменшити звук.", + "mejs.unmute": "Включити звук", + "mejs.mute": "Відключити звук", + "mejs.volume-slider": "Повзунок звуку", + "mejs.video-player": "Відеоплеєр", + "mejs.audio-player": "Ðудіоплеєр", + "mejs.captions-subtitles": "Титри/Субтитри", + "mejs.captions-chapters": "Глави", + "mejs.none": "Ðемає", + "mejs.afrikaans": "ÐфрикаанÑ", + "mejs.albanian": "ÐлбанÑька", + "mejs.arabic": "ÐрабÑька", + "mejs.belarusian": "БілоруÑька", + "mejs.bulgarian": "БолгарÑька", + "mejs.catalan": "КаталонÑька", + "mejs.chinese": "КитайÑька", + "mejs.chinese-simplified": "КитайÑька (Ñпрощена)", + "mejs.chinese-traditional": "КитайÑька (традиційна)", + "mejs.croatian": "ХорватÑка", + "mejs.czech": "ЧеÑька", + "mejs.danish": "Дацька", + "mejs.dutch": "ГолландÑька", + "mejs.english": "ÐнглийÑька", + "mejs.estonian": "ЕÑтонÑька", + "mejs.filipino": "ФіліппінÑька", + "mejs.finnish": "ФінÑька", + "mejs.french": "Французька", + "mejs.galician": "ГаліÑійÑька", + "mejs.german": "Ðімецька", + "mejs.greek": "Грецька", + "mejs.haitian-creole": "ГаїтÑнÑька креольÑька", + "mejs.hebrew": "Іврит", + "mejs.hindi": "Хінді", + "mejs.hungarian": "УгорÑька", + "mejs.icelandic": "ІÑландÑька", + "mejs.indonesian": "ІндонезійÑька", + "mejs.irish": "ІрландÑька", + "mejs.italian": "ІталійÑька", + "mejs.japanese": "ЯпонÑька", + "mejs.korean": "КорейÑька", + "mejs.latvian": "ЛатвійÑька", + "mejs.lithuanian": "ЛитовÑька", + "mejs.macedonian": "МакедонÑька", + "mejs.malay": "МалайÑька", + "mejs.maltese": "МальтійÑька", + "mejs.norwegian": "Ðорвезька", + "mejs.persian": "ПерÑька", + "mejs.polish": "ПольÑька", + "mejs.portuguese": "ПортугальÑька", + "mejs.romanian": "РумунÑька", + "mejs.russian": "РоÑійÑька", + "mejs.serbian": "СербÑька", + "mejs.slovak": "Словацька", + "mejs.slovenian": "СловенÑька", + "mejs.spanish": "ІÑпанÑька", + "mejs.swahili": "Суахілі", + "mejs.swedish": "ШведÑька", + "mejs.tagalog": "ТагальÑька", + "mejs.thai": "ТайÑька", + "mejs.turkish": "Турецька", + "mejs.ukrainian": "УкраїнÑька", + "mejs.vietnamese": "Ð’'єтнамÑька", + "mejs.welsh": "ВаллійÑька", + "mejs.yiddish": "Ідиш" + }; + } +})(mejs.i18n); diff --git a/lib/mejs/lang/zh-cn.js b/lib/mejs/lang/zh-cn.js new file mode 100644 index 0000000000000000000000000000000000000000..975ea14cecb0e7a3e08ca79621c5dd1d719d025f --- /dev/null +++ b/lib/mejs/lang/zh-cn.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Chinese (Simplified) + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports['zh-CN'] === undefined) { + exports['zh-CN'] = { + "mejs.plural-form": 0, + "mejs.download-file": "下载文件", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "å…¨å±", + "mejs.play": "æ’放", + "mejs.pause": "æš‚åœ", + "mejs.time-slider": "时间滑动棒", + "mejs.time-help-text": "使用作/å³ç®å¤´å¿«è¿›1秒,使用上/下ç®å¤´å¿«è¿›10秒。", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "使用上/下ç®å¤´æ高或é™ä½ŽéŸ³é‡ã€‚", + "mejs.unmute": "å–消é™éŸ³", + "mejs.mute": "é™éŸ³", + "mejs.volume-slider": "音é‡é€‰æ‹©é”®", + "mejs.video-player": "视频æ’放器", + "mejs.audio-player": "音频æ’放器", + "mejs.captions-subtitles": "å—幕/æ ‡é¢˜", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "æ— " + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/lang/zh.js b/lib/mejs/lang/zh.js new file mode 100644 index 0000000000000000000000000000000000000000..2e73e0f8a83efe9a6cbfe699fc0a7eea34a1d914 --- /dev/null +++ b/lib/mejs/lang/zh.js @@ -0,0 +1,90 @@ +'use strict';/*! + * This is a `i18n` language object. + * + * Chinese (Traditional) + * + * @author + * Jalios (Twitter: @Jalios) + * Sascha Greuel (Twitter: @SoftCreatR) + * + * @see core/i18n.js + */ +(function (exports) { + if (exports.zh === undefined) { + exports.zh = { + "mejs.plural-form": 0, + "mejs.download-file": "下載文件", + // "mejs.install-flash": "You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/", + "mejs.fullscreen": "å…¨å±", + "mejs.play": "æ’放", + "mejs.pause": "æš«åœ", + "mejs.time-slider": "時間滑動棒", + "mejs.time-help-text": "使用左/å³ç®é 快進1秒,上/下ç®é 快進10秒。", + //"mejs.live-broadcast" : "Live Broadcast", + "mejs.volume-help-text": "使用上/下ç®é æ高或é™ä½ŽéŸ³é‡ã€‚", + "mejs.unmute": "å–消éœéŸ³", + "mejs.mute": "éœéŸ³", + "mejs.volume-slider": "音é‡æŽ§åˆ¶éµ", + "mejs.video-player": "è¦–é »æ’放器", + "mejs.audio-player": "éŸ³é »æ’放器", + "mejs.captions-subtitles": "å—幕/標題", + // "mejs.captions-chapters": "Chapters", + "mejs.none": "沒有" + // "mejs.afrikaans": "Afrikaans", + // "mejs.albanian": "Albanian", + // "mejs.arabic": "Arabic", + // "mejs.belarusian": "Belarusian", + // "mejs.bulgarian": "Bulgarian", + // "mejs.catalan": "Catalan", + // "mejs.chinese": "Chinese", + // "mejs.chinese-simplified": "Chinese (Simplified)", + // "mejs.chinese-traditional": "Chinese (Traditional)", + // "mejs.croatian": "Croatian", + // "mejs.czech": "Czech", + // "mejs.danish": "Danish", + // "mejs.dutch": "Dutch", + // "mejs.english": "English", + // "mejs.estonian": "Estonian", + // "mejs.filipino": "Filipino", + // "mejs.finnish": "Finnish", + // "mejs.french": "French", + // "mejs.galician": "Galician", + // "mejs.german": "German", + // "mejs.greek": "Greek", + // "mejs.haitian-creole": "Haitian Creole", + // "mejs.hebrew": "Hebrew", + // "mejs.hindi": "Hindi", + // "mejs.hungarian": "Hungarian", + // "mejs.icelandic": "Icelandic", + // "mejs.indonesian": "Indonesian", + // "mejs.irish": "Irish", + // "mejs.italian": "Italian", + // "mejs.japanese": "Japanese", + // "mejs.korean": "Korean", + // "mejs.latvian": "Latvian", + // "mejs.lithuanian": "Lithuanian", + // "mejs.macedonian": "Macedonian", + // "mejs.malay": "Malay", + // "mejs.maltese": "Maltese", + // "mejs.norwegian": "Norwegian", + // "mejs.persian": "Persian", + // "mejs.polish": "Polish", + // "mejs.portuguese": "Portuguese", + // "mejs.romanian": "Romanian", + // "mejs.russian": "Russian", + // "mejs.serbian": "Serbian", + // "mejs.slovak": "Slovak", + // "mejs.slovenian": "Slovenian", + // "mejs.spanish": "Spanish", + // "mejs.swahili": "Swahili", + // "mejs.swedish": "Swedish", + // "mejs.tagalog": "Tagalog", + // "mejs.thai": "Thai", + // "mejs.turkish": "Turkish", + // "mejs.ukrainian": "Ukrainian", + // "mejs.vietnamese": "Vietnamese", + // "mejs.welsh": "Welsh", + // "mejs.yiddish": "Yiddish" + }; + } +})(mejs.i18n); \ No newline at end of file diff --git a/lib/mejs/mediaelement-flash-audio-ogg.swf b/lib/mejs/mediaelement-flash-audio-ogg.swf new file mode 100644 index 0000000000000000000000000000000000000000..102a5c0b3669c73cdcf70c50682ea05b830c8e0a Binary files /dev/null and b/lib/mejs/mediaelement-flash-audio-ogg.swf differ diff --git a/lib/mejs/mediaelement-flash-audio.swf b/lib/mejs/mediaelement-flash-audio.swf new file mode 100644 index 0000000000000000000000000000000000000000..fa3a32a9052e7a1d452b4a0403101aacaa22a3ef Binary files /dev/null and b/lib/mejs/mediaelement-flash-audio.swf differ diff --git a/lib/mejs/mediaelement-flash-video-hls.swf b/lib/mejs/mediaelement-flash-video-hls.swf new file mode 100644 index 0000000000000000000000000000000000000000..c307bcfc031de23b22e440ee070d89175171fbcf Binary files /dev/null and b/lib/mejs/mediaelement-flash-video-hls.swf differ diff --git a/lib/mejs/mediaelement-flash-video-mdash.swf b/lib/mejs/mediaelement-flash-video-mdash.swf new file mode 100644 index 0000000000000000000000000000000000000000..f6061020a1b7a50b6e3ee657b945f9d9d6b51716 Binary files /dev/null and b/lib/mejs/mediaelement-flash-video-mdash.swf differ diff --git a/lib/mejs/mediaelement-flash-video.swf b/lib/mejs/mediaelement-flash-video.swf new file mode 100644 index 0000000000000000000000000000000000000000..a5cc52f7c3a8d0761e591595157d7126b6d180e5 Binary files /dev/null and b/lib/mejs/mediaelement-flash-video.swf differ diff --git a/lib/mejs/mediaelementplayer-legacy.css b/lib/mejs/mediaelementplayer-legacy.css new file mode 100644 index 0000000000000000000000000000000000000000..2b150b1e391044f3c902a3ee002a946ba4439b12 --- /dev/null +++ b/lib/mejs/mediaelementplayer-legacy.css @@ -0,0 +1,670 @@ +/* Accessibility: hide screen reader texts (and prefer "top" for RTL languages). +Reference: http://blog.rrwd.nl/2015/04/04/the-screen-reader-text-class-why-and-how/ */ +.mejs-offscreen { + clip: rect(1px, 1px, 1px, 1px); /* IE8-IE11 - no support for clip-path */ + clip-path: polygon(0px 0px, 0px 0px, 0px 0px, 0px 0px); + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; +} + +.mejs-container { + position: relative; + background: #000; + font-family: "Helvetica", Arial, serif; + text-align: left; + vertical-align: top; + text-indent: 0; + box-sizing: border-box; + min-width: 250px; +} + +.mejs-container .mejs-video { + min-height: 140px; +} + +.mejs-container * { + box-sizing: border-box; +} + +/* Hide native play button from iOS to favor plugin button */ +.mejs-container video::-webkit-media-controls-start-playback-button { + display: none !important; + -webkit-appearance: none; +} + +.mejs-fill-container, +.mejs-fill-container .mejs-container { + width: 100%; + height: 100%; +} + +.mejs-fill-container { + overflow: hidden; + position: relative; + margin: 0 auto; + background: transparent; +} + +.mejs-container:focus { + outline: none; +} + +.mejs-iframe-overlay { + position: absolute; + width: 100%; + height: 100%; +} + +.mejs-embed, +.mejs-embed body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + background: #000; + overflow: hidden; +} + +.mejs-fullscreen { + overflow: hidden !important; +} + +.mejs-container-fullscreen { + position: fixed; + left: 0; + top: 0; + right: 0; + bottom: 0; + overflow: hidden; + z-index: 1000; +} + +.mejs-container-fullscreen .mejs-mediaelement, +.mejs-container-fullscreen video { + width: 100% !important; + height: 100% !important; +} + +.mejs-clear { + clear: both; +} + +/* Start: LAYERS */ +.mejs-background { + position: absolute; + top: 0; + left: 0; +} + +.mejs-mediaelement { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; +} + +.mejs-poster { + position: absolute; + top: 0; + left: 0; + background-size: contain; + background-position: 50% 50%; + background-repeat: no-repeat; + z-index: 1; +} + +:root .mejs-poster-img { + display: none; +} + +.mejs-poster-img { + border: 0; + padding: 0; +} + +.mejs-overlay { + position: absolute; + top: 0; + left: 0; + z-index: 1; +} +.mejs-layer { + z-index: 1; +} + +.mejs-overlay-play { + cursor: pointer; +} + +.mejs-overlay-button { + position: absolute; + top: 50%; + left: 50%; + width: 80px; + height: 80px; + margin: -40px 0 0 -40px; + background: url("mejs-controls.svg") no-repeat; + background-position: 0 -39px; + overflow: hidden; + z-index: 1; +} + +.mejs-overlay:hover > .mejs-overlay-button { + background-position: -80px -39px; +} + +.mejs-overlay-loading { + position: absolute; + top: 50%; + left: 50%; + width: 80px; + height: 80px; + margin: -40px 0 0 -40px; +} + +.mejs-overlay-loading-bg-img { + display: block; + width: 80px; + height: 80px; + background: transparent url("mejs-controls.svg") -160px -40px no-repeat; + -webkit-animation: mejs-loading-spinner 1s linear infinite; + -moz-animation: mejs-loading-spinner 1s linear infinite; + animation: mejs-loading-spinner 1s linear infinite; + z-index: 1; +} + +@-moz-keyframes mejs-loading-spinner { + 100% { + -moz-transform: rotate(360deg); + } +} + +@-webkit-keyframes mejs-loading-spinner { + 100% { + -webkit-transform: rotate(360deg); + } +} + +@keyframes mejs-loading-spinner { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +/* End: LAYERS */ + +/* Start: CONTROL BAR */ +.mejs-controls { + position: absolute; + list-style-type: none; + margin: 0; + padding: 0 10px; + bottom: 0; + left: 0; + height: 40px; + width: 100%; + z-index: 1; +} + +.mejs-controls:not([style*="display: none"]) { + background: rgba(255, 0, 0, 0.7); + background: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.35)); +} + +.mejs-button, +.mejs-time, +.mejs-time-rail { + float: left; + margin: 0; + width: 32px; + height: 40px; + font-size: 10px; + line-height: 10px; +} + +.mejs-button > button { + cursor: pointer; + display: block; + font-size: 0; + line-height: 0; + text-decoration: none; + margin: 10px 6px; + padding: 0; + position: absolute; + height: 20px; + width: 20px; + border: 0; + background: transparent url("mejs-controls.svg"); + overflow: hidden; +} + +/* :focus for accessibility */ +.mejs-button > button:focus { + outline: dotted 1px #999; +} + +.mejs-container-keyboard-inactive a, +.mejs-container-keyboard-inactive a:focus, +.mejs-container-keyboard-inactive button, +.mejs-container-keyboard-inactive button:focus, +.mejs-container-keyboard-inactive [role=slider], +.mejs-container-keyboard-inactive [role=slider]:focus { + outline: 0; +} + +/* End: CONTROL BAR */ + +/* Start: Time (Current / Duration) */ +.mejs-time { + color: #fff; + display: block; + height: 24px; + width: auto; + font-weight: bold; + font-size: 11px; + padding: 16px 6px 0 6px; + overflow: hidden; + text-align: center; + box-sizing: content-box; +} + +/* End: Time (Current / Duration) */ + +/* Start: Play/Pause/Stop */ +.mejs-play > button { + background-position: 0 0; +} + +.mejs-pause > button { + background-position: -20px 0; +} + +.mejs-replay > button { + background-position: -280px 0; +} + +/* End: Play/Pause/Stop */ + +/* Start: Progress Bar */ +.mejs-time-rail { + direction: ltr; + width: 200px; + padding-top: 10px; + height: 40px; + position: relative; + margin: 0 10px; +} + +.mejs-time-total, +.mejs-time-buffering, +.mejs-time-loaded, +.mejs-time-current, +.mejs-time-handle, +.mejs-time-float, +.mejs-time-float-current, +.mejs-time-float-corner, +.mejs-time-marker { + cursor: pointer; + display: block; + position: absolute; + height: 10px; + border-radius: 2px; +} + +.mejs-time-total { + margin: 5px 0 0 0; + background: rgba(255, 255, 255, 0.3); + width: 100%; +} + +.mejs-time-buffering { + width: 100%; + background: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 15px 15px; + animation: buffering-stripes 2s linear infinite; +} + +@keyframes buffering-stripes { + from { + background-position: 0 0; + } + to { + background-position: 30px 0; + } +} + +.mejs-time-loaded { + background: rgba(255, 255, 255, .3); + width: 0; +} + +.mejs-time-current { + background: rgba(255, 255, 255, 0.9); + width: 0; +} + +.mejs-time-handle { + display: none; + position: absolute; + margin: 0; + width: 10px; + background: #fff; + border-radius: 5px; + cursor: pointer; + border: solid 2px #333; + top: -2px; + text-align: center; +} + +.mejs-time-float { + position: absolute; + display: none; + background: #eee; + width: 36px; + height: 17px; + border: solid 1px #333; + top: -26px; + margin-left: -18px; + text-align: center; + color: #111; +} + +.mejs-time-float-current { + margin: 2px; + width: 30px; + display: block; + text-align: center; + left: 0; +} + +.mejs-time-float-corner { + position: absolute; + display: block; + width: 0; + height: 0; + line-height: 0; + border: solid 5px #eee; + border-color: #eee transparent transparent transparent; + border-radius: 0; + top: 15px; + left: 13px; +} + +.mejs-long-video .mejs-time-float { + width: 48px; +} + +.mejs-long-video .mejs-time-float-current { + width: 44px; +} + +.mejs-long-video .mejs-time-float-corner { + left: 18px; +} + +.mejs-broadcast { + color: #fff; + position: absolute; + width: 100%; + height: 10px; + top: 15px; +} + +/* End: Progress Bar */ + +/* Start: Fullscreen */ +.mejs-fullscreen-button > button { + background-position: -80px 0; +} + +.mejs-unfullscreen > button { + background-position: -100px 0; +} + +/* End: Fullscreen */ + +/* Start: Mute/Volume */ +.mejs-mute > button { + background-position: -60px 0; +} + +.mejs-unmute > button { + background-position: -40px 0; +} + +.mejs-volume-button { + position: relative; +} + +.mejs-volume-button > .mejs-volume-slider { + display: none; + height: 115px; + width: 25px; + background: rgba(50, 50, 50, 0.7); + border-radius: 0; + top: -115px; + left: 5px; + z-index: 1; + position: absolute; + margin: 0; +} + +.mejs-volume-button:hover { + border-radius: 0 0 4px 4px; +} + +.mejs-volume-total { + position: absolute; + left: 11px; + top: 8px; + width: 2px; + height: 100px; + background: rgba(255, 255, 255, 0.5); + margin: 0; +} + +.mejs-volume-current { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 100%; + background: rgba(255, 255, 255, 0.9); + margin: 0; +} + +.mejs-volume-handle { + position: absolute; + left: 0; + bottom: 100%; + width: 16px; + height: 6px; + margin: 0 0 -3px -7px; + background: rgba(255, 255, 255, 0.9); + cursor: ns-resize; + border-radius: 1px; +} + +.mejs-horizontal-volume-slider { + height: 36px; + width: 56px; + position: relative; + display: block; + float: left; + vertical-align: middle; +} + +.mejs-horizontal-volume-total { + position: absolute; + left: 0; + top: 16px; + width: 50px; + height: 8px; + margin: 0; + padding: 0; + font-size: 1px; + border-radius: 2px; + background: rgba(50, 50, 50, 0.8); +} + +.mejs-horizontal-volume-current { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + margin: 0; + padding: 0; + font-size: 1px; + border-radius: 2px; + background: rgba(255, 255, 255, 0.8); +} + +.mejs-horizontal-volume-handle { + display: none; +} + +/* End: Mute/Volume */ + +/* Start: Track (Captions and Chapters) */ +.mejs-captions-button, .mejs-chapters-button { + position: relative; +} + +.mejs-captions-button > button { + background-position: -140px 0; +} + +.mejs-chapters-button > button { + background-position: -302px 0; +} + +.mejs-captions-button > .mejs-captions-selector, .mejs-chapters-button > .mejs-chapters-selector { + visibility: hidden; + position: absolute; + bottom: 40px; + right: -51px; + width: 85px; + background: rgba(50, 50, 50, 0.7); + border: solid 1px transparent; + padding: 0; + overflow: hidden; + border-radius: 0; +} + +.mejs-chapters-button > .mejs-chapters-selector { + width: 110px; +} + +.mejs-captions-button > .mejs-captions-selector, .mejs-chapters-button > .mejs-chapters-selector { + visibility: visible; +} + +.mejs-captions-selector-list, .mejs-chapters-selector-list { + margin: 0; + padding: 0; + display: block; + list-style-type: none !important; + overflow: hidden; +} + +.mejs-captions-selector-list-item, .mejs-chapters-selector-list-item { + margin: 0 0 6px 0; + padding: 0 10px; + list-style-type: none !important; + display: block; + color: #fff; + overflow: hidden; + cursor: pointer; +} + +.mejs-captions-selector-list-item:hover, .mejs-chapters-selector-list-item:hover { + background-color: rgb(200, 200, 200) !important; + background-color: rgba(255, 255, 255, 0.4) !important; +} + +.mejs-captions-selector-input, .mejs-chapters-selector-input { + clear: both; + float: left; + margin: 3px 3px 0 5px; + position: absolute; + left: -1000px; +} + +.mejs-captions-selector-label, .mejs-chapters-selector-label { + width: 55px; + float: left; + padding: 4px 0 0 0; + line-height: 15px; + font-size: 10px; + cursor: pointer; +} + +.mejs-captions-selected, .mejs-chapters-selected { + color: rgba(33, 248, 248, 1); +} + +.mejs-captions-translations { + font-size: 10px; + margin: 0 0 5px 0; +} + +.mejs-captions-layer { + position: absolute; + bottom: 0; + left: 0; + text-align: center; + line-height: 20px; + font-size: 16px; + color: #fff; +} + +.mejs-captions-layer a { + color: #fff; + text-decoration: underline; +} + +.mejs-captions-layer[lang=ar] { + font-size: 20px; + font-weight: normal; +} + +.mejs-captions-position { + position: absolute; + width: 100%; + bottom: 15px; + left: 0; +} + +.mejs-captions-position-hover { + bottom: 35px; +} + +.mejs-captions-text, .mejs-captions-text * { + padding: 0; + background: rgba(20, 20, 20, 0.5); + white-space: pre-wrap; + box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5); +} + +/* End: Track (Captions and Chapters) */ + +/* Start: Error */ +.me_cannotplay a { + font-weight: bold; +} + +.mejs-container .me_cannotplay a { + color: #fff; +} + +.me_cannotplay span { + padding: 15px; + display: block; +} +/* End: Error */ \ No newline at end of file diff --git a/lib/mejs/mediaelementplayer-legacy.min.css b/lib/mejs/mediaelementplayer-legacy.min.css new file mode 100644 index 0000000000000000000000000000000000000000..0f6319002b8a62661c5fd67f590dc1a06b478f22 --- /dev/null +++ b/lib/mejs/mediaelementplayer-legacy.min.css @@ -0,0 +1 @@ +.mejs-offscreen{clip:rect(1px,1px,1px,1px);-webkit-clip-path:polygon(0 0,0 0,0 0,0 0);clip-path:polygon(0 0,0 0,0 0,0 0);position:absolute!important;height:1px;width:1px;overflow:hidden}.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial,serif;text-align:left;vertical-align:top;text-indent:0;box-sizing:border-box;min-width:250px}.mejs-container .mejs-video{min-height:140px}.mejs-container *{box-sizing:border-box}.mejs-container video::-webkit-media-controls-start-playback-button{display:none!important;-webkit-appearance:none}.mejs-fill-container,.mejs-fill-container .mejs-container{width:100%;height:100%}.mejs-fill-container{overflow:hidden;position:relative;margin:0 auto;background:transparent}.mejs-container:focus{outline:none}.mejs-iframe-overlay{position:absolute;width:100%;height:100%}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;overflow:hidden}.mejs-fullscreen{overflow:hidden!important}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:2}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%!important;height:100%!important}.mejs-clear{clear:both}.mejs-background,.mejs-mediaelement{position:absolute;top:0;left:0}.mejs-mediaelement{width:100%;height:100%;z-index:0}.mejs-poster{position:absolute;top:0;left:0;background-size:contain;background-position:50% 50%;background-repeat:no-repeat;z-index:1}:root .mejs-poster-img{display:none}.mejs-poster-img{border:0;padding:0}.mejs-overlay{position:absolute;top:0;left:0;z-index:1}.mejs-layer{z-index:1}.mejs-overlay-play{cursor:pointer}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:url(mejs-controls.svg) no-repeat;background-position:0 -39px;overflow:hidden;z-index:1}.mejs-overlay:hover>.mejs-overlay-button{background-position:-80px -39px}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px}.mejs-overlay-loading-bg-img{display:block;width:80px;height:80px;background:transparent url(mejs-controls.svg) -160px -40px no-repeat;animation:a 1s linear infinite;z-index:1}@keyframes a{to{transform:rotate(1turn)}}.mejs-controls{position:absolute;list-style-type:none;margin:0;padding:0 10px;bottom:0;left:0;height:40px;width:100%;z-index:1}.mejs-controls:not([style*="display: none"]){background:rgba(255,0,0,.7);background:linear-gradient(transparent,rgba(0,0,0,.35))}.mejs-button,.mejs-time,.mejs-time-rail{float:left;margin:0;width:32px;height:40px;font-size:10px;line-height:10px}.mejs-button>button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:10px 6px;padding:0;position:absolute;height:20px;width:20px;border:0;background:transparent url(mejs-controls.svg);overflow:hidden}.mejs-button>button:focus{outline:1px dotted #999}.mejs-container-keyboard-inactive [role=slider],.mejs-container-keyboard-inactive [role=slider]:focus,.mejs-container-keyboard-inactive a,.mejs-container-keyboard-inactive a:focus,.mejs-container-keyboard-inactive button,.mejs-container-keyboard-inactive button:focus{outline:0}.mejs-time{color:#fff;display:block;height:24px;width:auto;font-weight:700;font-size:11px;padding:16px 6px 0;overflow:hidden;text-align:center;box-sizing:content-box}.mejs-play>button{background-position:0 0}.mejs-pause>button{background-position:-20px 0}.mejs-replay>button{background-position:-280px 0}.mejs-time-rail{direction:ltr;width:200px;padding-top:10px;height:40px;position:relative;margin:0 10px}.mejs-time-buffering,.mejs-time-current,.mejs-time-float,.mejs-time-float-corner,.mejs-time-float-current,.mejs-time-handle,.mejs-time-loaded,.mejs-time-marker,.mejs-time-total{cursor:pointer;display:block;position:absolute;height:10px;border-radius:2px}.mejs-time-total{margin:5px 0 0;background:hsla(0,0%,100%,.3);width:100%}.mejs-time-buffering{width:100%;background:linear-gradient(-45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:15px 15px;animation:b 2s linear infinite}@keyframes b{0%{background-position:0 0}to{background-position:30px 0}}.mejs-time-loaded{background:hsla(0,0%,100%,.3);width:0}.mejs-time-current{background:hsla(0,0%,100%,.9);width:0}.mejs-time-handle{margin:0;width:10px;background:#fff;border-radius:5px;cursor:pointer;border:2px solid #333;top:-2px}.mejs-time-float,.mejs-time-handle{display:none;position:absolute;text-align:center}.mejs-time-float{background:#eee;width:36px;height:17px;border:1px solid #333;top:-26px;margin-left:-18px;color:#111}.mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0}.mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:5px solid #eee;border-color:#eee transparent transparent;border-radius:0;top:15px;left:13px}.mejs-long-video .mejs-time-float{width:48px}.mejs-long-video .mejs-time-float-current{width:44px}.mejs-long-video .mejs-time-float-corner{left:18px}.mejs-broadcast{color:#fff;position:absolute;width:100%;height:10px;top:15px}.mejs-fullscreen-button>button{background-position:-80px 0}.mejs-unfullscreen>button{background-position:-100px 0}.mejs-mute>button{background-position:-60px 0}.mejs-unmute>button{background-position:-40px 0}.mejs-volume-button{position:relative}.mejs-volume-button>.mejs-volume-slider{display:none;height:115px;width:25px;background:rgba(50,50,50,.7);border-radius:0;top:-115px;left:5px;z-index:1;position:absolute;margin:0}.mejs-volume-button:hover{border-radius:0 0 4px 4px}.mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:hsla(0,0%,100%,.5);margin:0}.mejs-volume-current{bottom:0;width:100%;height:100%;margin:0}.mejs-volume-current,.mejs-volume-handle{position:absolute;left:0;background:hsla(0,0%,100%,.9)}.mejs-volume-handle{bottom:100%;width:16px;height:6px;margin:0 0 -3px -7px;cursor:ns-resize;border-radius:1px}.mejs-horizontal-volume-slider{height:36px;width:56px;position:relative;display:block;float:left;vertical-align:middle}.mejs-horizontal-volume-total{top:16px;width:50px;height:8px;background:rgba(50,50,50,.8)}.mejs-horizontal-volume-current,.mejs-horizontal-volume-total{position:absolute;left:0;margin:0;padding:0;font-size:1px;border-radius:2px}.mejs-horizontal-volume-current{top:0;width:100%;height:100%;background:hsla(0,0%,100%,.8)}.mejs-horizontal-volume-handle{display:none}.mejs-captions-button,.mejs-chapters-button{position:relative}.mejs-captions-button>button{background-position:-140px 0}.mejs-chapters-button>button{background-position:-302px 0}.mejs-captions-button>.mejs-captions-selector,.mejs-chapters-button>.mejs-chapters-selector{visibility:hidden;position:absolute;bottom:40px;right:-51px;width:85px;background:rgba(50,50,50,.7);border:1px solid transparent;padding:0;overflow:hidden;border-radius:0}.mejs-chapters-button>.mejs-chapters-selector{width:110px}.mejs-captions-button>.mejs-captions-selector,.mejs-chapters-button>.mejs-chapters-selector{visibility:visible}.mejs-captions-selector-list,.mejs-chapters-selector-list{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-captions-selector-list-item,.mejs-chapters-selector-list-item{margin:0 0 6px;padding:0 10px;list-style-type:none!important;display:block;color:#fff;overflow:hidden;cursor:pointer}.mejs-captions-selector-list-item:hover,.mejs-chapters-selector-list-item:hover{background-color:#c8c8c8!important;background-color:hsla(0,0%,100%,.4)!important}.mejs-captions-selector-input,.mejs-chapters-selector-input{clear:both;float:left;margin:3px 3px 0 5px;position:absolute;left:-1000px}.mejs-captions-selector-label,.mejs-chapters-selector-label{width:55px;float:left;padding:4px 0 0;line-height:15px;font-size:10px;cursor:pointer}.mejs-captions-selected,.mejs-chapters-selected{color:#21f8f8}.mejs-captions-translations{font-size:10px;margin:0 0 5px}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:20px;font-size:16px;color:#fff}.mejs-captions-layer a{color:#fff;text-decoration:underline}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0}.mejs-captions-position-hover{bottom:35px}.mejs-captions-text,.mejs-captions-text *{padding:0;background:hsla(0,0%,8%,.5);white-space:pre-wrap;box-shadow:5px 0 0 hsla(0,0%,8%,.5),-5px 0 0 hsla(0,0%,8%,.5)}.me_cannotplay a{font-weight:700}.mejs-container .me_cannotplay a{color:#fff}.me_cannotplay span{padding:15px;display:block} \ No newline at end of file diff --git a/lib/mejs/renderers/dailymotion.js b/lib/mejs/renderers/dailymotion.js new file mode 100644 index 0000000000000000000000000000000000000000..e62cddb6ba2ebf3e98d24b817660efb41c6e82ff --- /dev/null +++ b/lib/mejs/renderers/dailymotion.js @@ -0,0 +1,513 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ +'use strict'; + +/** + * DailyMotion renderer + * + * Uses <iframe> approach and uses DailyMotion API to manipulate it. + * @see https://developer.dailymotion.com/player + * + */ + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var DailyMotionApi = { + /** + * @type {Boolean} + */ + isSDKStarted: false, + /** + * @type {Boolean} + */ + isSDKLoaded: false, + /** + * @type {Array} + */ + iframeQueue: [], + + /** + * Create a queue to prepare the creation of <iframe> + * + * @param {Object} settings - an object with settings needed to create <iframe> + */ + enqueueIframe: function enqueueIframe(settings) { + + if (DailyMotionApi.isLoaded) { + DailyMotionApi.createIframe(settings); + } else { + DailyMotionApi.loadIframeApi(); + DailyMotionApi.iframeQueue.push(settings); + } + }, + + /** + * Load DailyMotion API script on the header of the document + * + */ + loadIframeApi: function loadIframeApi() { + if (!DailyMotionApi.isSDKStarted) { + var e = document.createElement('script'); + e.async = true; + e.src = '//api.dmcdn.net/all.js'; + var s = document.getElementsByTagName('script')[0]; + s.parentNode.insertBefore(e, s); + DailyMotionApi.isSDKStarted = true; + } + }, + + /** + * Process queue of DailyMotion <iframe> element creation + * + */ + apiReady: function apiReady() { + + DailyMotionApi.isLoaded = true; + DailyMotionApi.isSDKLoaded = true; + + while (DailyMotionApi.iframeQueue.length > 0) { + var settings = DailyMotionApi.iframeQueue.pop(); + DailyMotionApi.createIframe(settings); + } + }, + + /** + * Create a new instance of DailyMotion API player and trigger a custom event to initialize it + * + * @param {Object} settings - an object with settings needed to create <iframe> + */ + createIframe: function createIframe(settings) { + + var player = DM.player(settings.container, { + height: settings.height || '100%', + width: settings.width || '100%', + video: settings.videoId, + params: Object.assign({ api: true }, settings.params), + origin: location.host + }); + + player.addEventListener('apiready', function () { + window['__ready__' + settings.id](player, { paused: true, ended: false }); + }); + }, + + /** + * Extract ID from DailyMotion's URL to be loaded through API + * Valid URL format(s): + * - http://www.dailymotion.com/embed/video/x35yawy + * - http://dai.ly/x35yawy + * + * @param {String} url + * @return {String} + */ + getDailyMotionId: function getDailyMotionId(url) { + var parts = url.split('/'), + lastPart = parts[parts.length - 1], + dashParts = lastPart.split('_'); + + return dashParts[0]; + } +}; + +var DailyMotionIframeRenderer = { + name: 'dailymotion_iframe', + + options: { + prefix: 'dailymotion_iframe', + + dailymotion: { + width: '100%', + height: '100%', + params: { + autoplay: false, + chromeless: 1, + info: 0, + logo: 0, + related: 0 + } + } + }, + + /** + * Determine if a specific element type can be played with this render + * + * @param {String} type + * @return {Boolean} + */ + canPlayType: function canPlayType(type) { + return ['video/dailymotion', 'video/x-dailymotion'].includes(type); + }, + + /** + * Create the player instance and add all native events/methods/properties as possible + * + * @param {MediaElement} mediaElement Instance of mejs.MediaElement already created + * @param {Object} options All the player configuration options passed through constructor + * @param {Object[]} mediaFiles List of sources with format: {src: url, type: x/y-z} + * @return {Object} + */ + create: function create(mediaElement, options, mediaFiles) { + + var dm = {}, + apiStack = [], + readyState = 4; + + var events = void 0, + dmPlayer = null, + dmIframe = null; + + dm.options = options; + dm.id = mediaElement.id + '_' + options.prefix; + dm.mediaElement = mediaElement; + + // wrappers for get/set + var props = mejs.html5media.properties, + assignGettersSetters = function assignGettersSetters(propName) { + + // add to flash state that we will store + + var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); + + dm['get' + capName] = function () { + if (dmPlayer !== null) { + var value = null; + + // figure out how to get dm dta here + + var _ret = function () { + switch (propName) { + case 'currentTime': + return { + v: dmPlayer.currentTime + }; + + case 'duration': + return { + v: isNaN(dmPlayer.duration) ? 0 : dmPlayer.duration + }; + + case 'volume': + return { + v: dmPlayer.volume + }; + + case 'paused': + return { + v: dmPlayer.paused + }; + + case 'ended': + return { + v: dmPlayer.ended + }; + + case 'muted': + return { + v: dmPlayer.muted + }; + + case 'buffered': + var percentLoaded = dmPlayer.bufferedTime, + duration = dmPlayer.duration; + return { + v: { + start: function start() { + return 0; + }, + end: function end() { + return percentLoaded / duration; + }, + length: 1 + } + }; + case 'src': + return { + v: mediaElement.originalNode.getAttribute('src') + }; + + case 'readyState': + return { + v: readyState + }; + } + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + return value; + } else { + return null; + } + }; + + dm['set' + capName] = function (value) { + if (dmPlayer !== null) { + + switch (propName) { + + case 'src': + var url = typeof value === 'string' ? value : value[0].src; + + dmPlayer.load(DailyMotionApi.getDailyMotionId(url)); + break; + + case 'currentTime': + dmPlayer.seek(value); + break; + + case 'muted': + if (value) { + dmPlayer.setMuted(true); + } else { + dmPlayer.setMuted(false); + } + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', dm); + mediaElement.dispatchEvent(event); + }, 50); + break; + + case 'volume': + dmPlayer.setVolume(value); + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', dm); + mediaElement.dispatchEvent(event); + }, 50); + break; + + case 'readyState': + var event = mejs.Utils.createEvent('canplay', dm); + mediaElement.dispatchEvent(event); + break; + + default: + + break; + } + } else { + // store for after "READY" event fires + apiStack.push({ type: 'set', propName: propName, value: value }); + } + }; + }; + + for (var i = 0, total = props.length; i < total; i++) { + assignGettersSetters(props[i]); + } + + // add wrappers for native methods + var methods = mejs.html5media.methods, + assignMethods = function assignMethods(methodName) { + + // run the method on the native HTMLMediaElement + dm[methodName] = function () { + if (dmPlayer !== null) { + + // DO method + switch (methodName) { + case 'play': + return dmPlayer.play(); + case 'pause': + return dmPlayer.pause(); + case 'load': + return null; + + } + } else { + apiStack.push({ type: 'call', methodName: methodName }); + } + }; + }; + + for (var _i = 0, _total = methods.length; _i < _total; _i++) { + assignMethods(methods[_i]); + } + + // Initial method to register all DailyMotion events when initializing <iframe> + window['__ready__' + dm.id] = function (_dmPlayer) { + + mediaElement.dmPlayer = dmPlayer = _dmPlayer; + + // do call stack + if (apiStack.length) { + for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) { + + var stackItem = apiStack[_i2]; + + if (stackItem.type === 'set') { + var propName = stackItem.propName, + capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); + + dm['set' + capName](stackItem.value); + } else if (stackItem.type === 'call') { + dm[stackItem.methodName](); + } + } + } + + dmIframe = document.getElementById(dm.id); + + // a few more events + events = ['mouseover', 'mouseout']; + var assignEvents = function assignEvents(e) { + var event = mejs.Utils.createEvent(e.type, dm); + mediaElement.dispatchEvent(event); + }; + + for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) { + dmIframe.addEventListener(events[_i3], assignEvents, false); + } + + // BUBBLE EVENTS up + events = mejs.html5media.events; + events = events.concat(['click', 'mouseover', 'mouseout']); + var assignNativeEvents = function assignNativeEvents(eventName) { + + // Deprecated event; not consider it + if (eventName !== 'ended') { + + dmPlayer.addEventListener(eventName, function (e) { + var event = mejs.Utils.createEvent(e.type, dmPlayer); + mediaElement.dispatchEvent(event); + }); + } + }; + + for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) { + assignNativeEvents(events[_i4]); + } + + // Custom DailyMotion events + dmPlayer.addEventListener('ad_start', function () { + var event = mejs.Utils.createEvent('play', dmPlayer); + mediaElement.dispatchEvent(event); + + event = mejs.Utils.createEvent('progress', dmPlayer); + mediaElement.dispatchEvent(event); + + event = mejs.Utils.createEvent('timeupdate', dmPlayer); + mediaElement.dispatchEvent(event); + }); + dmPlayer.addEventListener('ad_timeupdate', function () { + var event = mejs.Utils.createEvent('timeupdate', dmPlayer); + mediaElement.dispatchEvent(event); + }); + dmPlayer.addEventListener('ad_pause', function () { + var event = mejs.Utils.createEvent('pause', dmPlayer); + mediaElement.dispatchEvent(event); + }); + dmPlayer.addEventListener('ad_end', function () { + var event = mejs.Utils.createEvent('ended', dmPlayer); + mediaElement.dispatchEvent(event); + }); + dmPlayer.addEventListener('video_start', function () { + var event = mejs.Utils.createEvent('play', dmPlayer); + mediaElement.dispatchEvent(event); + + event = mejs.Utils.createEvent('timeupdate', dmPlayer); + mediaElement.dispatchEvent(event); + }); + dmPlayer.addEventListener('video_end', function () { + var event = mejs.Utils.createEvent('ended', dmPlayer); + mediaElement.dispatchEvent(event); + }); + dmPlayer.addEventListener('progress', function () { + var event = mejs.Utils.createEvent('timeupdate', dmPlayer); + mediaElement.dispatchEvent(event); + }); + dmPlayer.addEventListener('durationchange', function () { + var event = mejs.Utils.createEvent('timeupdate', dmPlayer); + mediaElement.dispatchEvent(event); + }); + + // give initial events + var initEvents = ['rendererready', 'loadeddata', 'loadedmetadata', 'canplay']; + + for (var _i5 = 0, _total5 = initEvents.length; _i5 < _total5; _i5++) { + var event = mejs.Utils.createEvent(initEvents[_i5], dm); + mediaElement.dispatchEvent(event); + } + }; + + var dmContainer = document.createElement('div'); + dmContainer.id = dm.id; + mediaElement.appendChild(dmContainer); + if (mediaElement.originalNode) { + dmContainer.style.width = mediaElement.originalNode.style.width; + dmContainer.style.height = mediaElement.originalNode.style.height; + } + mediaElement.originalNode.style.display = 'none'; + + var videoId = DailyMotionApi.getDailyMotionId(mediaFiles[0].src), + dmSettings = Object.assign({ + id: dm.id, + container: dmContainer, + videoId: videoId, + autoplay: mediaElement.originalNode.autoplay + }, dm.options.dailymotion); + + DailyMotionApi.enqueueIframe(dmSettings); + + dm.hide = function () { + dm.stopInterval(); + dm.pause(); + if (dmIframe) { + dmIframe.style.display = 'none'; + } + }; + dm.show = function () { + if (dmIframe) { + dmIframe.style.display = ''; + } + }; + dm.setSize = function (width, height) { + dmIframe.width = width; + dmIframe.height = height; + }; + dm.destroy = function () { + dmPlayer.destroy(); + }; + dm.interval = null; + + dm.startInterval = function () { + dm.interval = setInterval(function () { + DailyMotionApi.sendEvent(dm.id, dmPlayer, 'timeupdate', { + paused: false, + ended: false + }); + }, 250); + }; + dm.stopInterval = function () { + if (dm.interval) { + clearInterval(dm.interval); + } + }; + + return dm; + } +}; + +/* + * Register DailyMotion event globally + * + */ +mejs.Utils.typeChecks.push(function (url) { + url = url.toLowerCase(); + return url.includes('//dailymotion.com') || url.includes('www.dailymotion.com') || url.includes('//dai.ly') ? 'video/x-dailymotion' : null; +}); + +window.dmAsyncInit = function () { + DailyMotionApi.apiReady(); +}; + +mejs.Renderers.add(DailyMotionIframeRenderer); + +},{}]},{},[1]); diff --git a/lib/mejs/renderers/dailymotion.min.js b/lib/mejs/renderers/dailymotion.min.js new file mode 100644 index 0000000000000000000000000000000000000000..6fcfbd96061ed053b46e62fed37b6684d2a7ec61 --- /dev/null +++ b/lib/mejs/renderers/dailymotion.min.js @@ -0,0 +1,22 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + *//*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */ +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e={isSDKStarted:!1,isSDKLoaded:!1,iframeQueue:[],enqueueIframe:function(a){e.isLoaded?e.createIframe(a):(e.loadIframeApi(),e.iframeQueue.push(a))},loadIframeApi:function(){if(!e.isSDKStarted){var a=document.createElement("script");a.async=!0,a.src="//api.dmcdn.net/all.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b),e.isSDKStarted=!0}},apiReady:function(){for(e.isLoaded=!0,e.isSDKLoaded=!0;e.iframeQueue.length>0;){var a=e.iframeQueue.pop();e.createIframe(a)}},createIframe:function(a){var b=DM.player(a.container,{height:a.height||"100%",width:a.width||"100%",video:a.videoId,params:Object.assign({api:!0},a.params),origin:location.host});b.addEventListener("apiready",function(){window["__ready__"+a.id](b,{paused:!0,ended:!1})})},getDailyMotionId:function(a){var b=a.split("/"),c=b[b.length-1],d=c.split("_");return d[0]}},f={name:"dailymotion_iframe",options:{prefix:"dailymotion_iframe",dailymotion:{width:"100%",height:"100%",params:{autoplay:!1,chromeless:1,info:0,logo:0,related:0}}},canPlayType:function(a){return["video/dailymotion","video/x-dailymotion"].includes(a)},create:function(a,b,c){var f={},g=[],h=4,i=void 0,j=null,k=null;f.options=b,f.id=a.id+"_"+b.prefix,f.mediaElement=a;for(var l=mejs.html5media.properties,m=function(b){var c=""+b.substring(0,1).toUpperCase()+b.substring(1);f["get"+c]=function(){if(null!==j){var c=null,e=function(){switch(b){case"currentTime":return{v:j.currentTime};case"duration":return{v:isNaN(j.duration)?0:j.duration};case"volume":return{v:j.volume};case"paused":return{v:j.paused};case"ended":return{v:j.ended};case"muted":return{v:j.muted};case"buffered":var c=j.bufferedTime,d=j.duration;return{v:{start:function(){return 0},end:function(){return c/d},length:1}};case"src":return{v:a.originalNode.getAttribute("src")};case"readyState":return{v:h}}}();return"object"===("undefined"==typeof e?"undefined":d(e))?e.v:c}return null},f["set"+c]=function(c){if(null!==j)switch(b){case"src":var d="string"==typeof c?c:c[0].src;j.load(e.getDailyMotionId(d));break;case"currentTime":j.seek(c);break;case"muted":c?j.setMuted(!0):j.setMuted(!1),setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",f);a.dispatchEvent(b)},50);break;case"volume":j.setVolume(c),setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",f);a.dispatchEvent(b)},50);break;case"readyState":var h=mejs.Utils.createEvent("canplay",f);a.dispatchEvent(h)}else g.push({type:"set",propName:b,value:c})}},n=0,o=l.length;o>n;n++)m(l[n]);for(var p=mejs.html5media.methods,q=function(a){f[a]=function(){if(null!==j)switch(a){case"play":return j.play();case"pause":return j.pause();case"load":return null}else g.push({type:"call",methodName:a})}},r=0,s=p.length;s>r;r++)q(p[r]);window["__ready__"+f.id]=function(b){if(a.dmPlayer=j=b,g.length)for(var c=0,d=g.length;d>c;c++){var e=g[c];if("set"===e.type){var h=e.propName,l=""+h.substring(0,1).toUpperCase()+h.substring(1);f["set"+l](e.value)}else"call"===e.type&&f[e.methodName]()}k=document.getElementById(f.id),i=["mouseover","mouseout"];for(var m=function(b){var c=mejs.Utils.createEvent(b.type,f);a.dispatchEvent(c)},n=0,o=i.length;o>n;n++)k.addEventListener(i[n],m,!1);i=mejs.html5media.events,i=i.concat(["click","mouseover","mouseout"]);for(var p=function(b){"ended"!==b&&j.addEventListener(b,function(b){var c=mejs.Utils.createEvent(b.type,j);a.dispatchEvent(c)})},q=0,r=i.length;r>q;q++)p(i[q]);j.addEventListener("ad_start",function(){var b=mejs.Utils.createEvent("play",j);a.dispatchEvent(b),b=mejs.Utils.createEvent("progress",j),a.dispatchEvent(b),b=mejs.Utils.createEvent("timeupdate",j),a.dispatchEvent(b)}),j.addEventListener("ad_timeupdate",function(){var b=mejs.Utils.createEvent("timeupdate",j);a.dispatchEvent(b)}),j.addEventListener("ad_pause",function(){var b=mejs.Utils.createEvent("pause",j);a.dispatchEvent(b)}),j.addEventListener("ad_end",function(){var b=mejs.Utils.createEvent("ended",j);a.dispatchEvent(b)}),j.addEventListener("video_start",function(){var b=mejs.Utils.createEvent("play",j);a.dispatchEvent(b),b=mejs.Utils.createEvent("timeupdate",j),a.dispatchEvent(b)}),j.addEventListener("video_end",function(){var b=mejs.Utils.createEvent("ended",j);a.dispatchEvent(b)}),j.addEventListener("progress",function(){var b=mejs.Utils.createEvent("timeupdate",j);a.dispatchEvent(b)}),j.addEventListener("durationchange",function(){var b=mejs.Utils.createEvent("timeupdate",j);a.dispatchEvent(b)});for(var s=["rendererready","loadeddata","loadedmetadata","canplay"],t=0,u=s.length;u>t;t++){var v=mejs.Utils.createEvent(s[t],f);a.dispatchEvent(v)}};var t=document.createElement("div");t.id=f.id,a.appendChild(t),a.originalNode&&(t.style.width=a.originalNode.style.width,t.style.height=a.originalNode.style.height),a.originalNode.style.display="none";var u=e.getDailyMotionId(c[0].src),v=Object.assign({id:f.id,container:t,videoId:u,autoplay:a.originalNode.autoplay},f.options.dailymotion);return e.enqueueIframe(v),f.hide=function(){f.stopInterval(),f.pause(),k&&(k.style.display="none")},f.show=function(){k&&(k.style.display="")},f.setSize=function(a,b){k.width=a,k.height=b},f.destroy=function(){j.destroy()},f.interval=null,f.startInterval=function(){f.interval=setInterval(function(){e.sendEvent(f.id,j,"timeupdate",{paused:!1,ended:!1})},250)},f.stopInterval=function(){f.interval&&clearInterval(f.interval)},f}};mejs.Utils.typeChecks.push(function(a){return a=a.toLowerCase(),a.includes("//dailymotion.com")||a.includes("www.dailymotion.com")||a.includes("//dai.ly")?"video/x-dailymotion":null}),window.dmAsyncInit=function(){e.apiReady()},mejs.Renderers.add(f)},{}]},{},[1]); \ No newline at end of file diff --git a/lib/mejs/renderers/facebook.js b/lib/mejs/renderers/facebook.js new file mode 100644 index 0000000000000000000000000000000000000000..cff23362f1bd2bfa06a9f776580ae5758ee174f5 --- /dev/null +++ b/lib/mejs/renderers/facebook.js @@ -0,0 +1,429 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ +'use strict'; + +/** + * Facebook renderer + * + * It creates an <iframe> from a <div> with specific configuration. + * @see https://developers.facebook.com/docs/plugins/embedded-video-player + */ + +var FacebookRenderer = { + name: 'facebook', + + options: { + prefix: 'facebook', + facebook: { + appId: '{your-app-id}', + xfbml: true, + version: 'v2.6' + } + }, + + /** + * Determine if a specific element type can be played with this render + * + * @param {String} type + * @return {Boolean} + */ + canPlayType: function canPlayType(type) { + return ['video/facebook', 'video/x-facebook'].includes(type); + }, + + /** + * Create the player instance and add all native events/methods/properties as possible + * + * @param {MediaElement} mediaElement Instance of mejs.MediaElement already created + * @param {Object} options All the player configuration options passed through constructor + * @param {Object[]} mediaFiles List of sources with format: {src: url, type: x/y-z} + * @return {Object} + */ + create: function create(mediaElement, options, mediaFiles) { + + var fbWrapper = {}, + apiStack = [], + eventHandler = {}, + readyState = 4, + autoplay = mediaElement.originalNode.autoplay; + + var src = '', + paused = true, + ended = false, + hasStartedPlaying = false, + fbApi = null, + fbDiv = null; + + options = Object.assign(options, mediaElement.options); + fbWrapper.options = options; + fbWrapper.id = mediaElement.id + '_' + options.prefix; + fbWrapper.mediaElement = mediaElement; + + // wrappers for get/set + var props = mejs.html5media.properties, + assignGettersSetters = function assignGettersSetters(propName) { + + var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); + + fbWrapper['get' + capName] = function () { + + if (fbApi !== null) { + var value = null; + + // figure out how to get youtube dta here + switch (propName) { + case 'currentTime': + return fbApi.getCurrentPosition(); + + case 'duration': + return fbApi.getDuration(); + + case 'volume': + return fbApi.getVolume(); + + case 'paused': + return paused; + + case 'ended': + return ended; + + case 'muted': + return fbApi.isMuted(); + + case 'buffered': + return { + start: function start() { + return 0; + }, + end: function end() { + return 0; + }, + length: 1 + }; + case 'src': + return src; + + case 'readyState': + return readyState; + } + + return value; + } else { + return null; + } + }; + + fbWrapper['set' + capName] = function (value) { + + if (fbApi !== null) { + + switch (propName) { + + case 'src': + var url = typeof value === 'string' ? value : value[0].src; + + // Only way is to destroy instance and all the events fired, + // and create new one + fbDiv.remove(); + createFacebookEmbed(url, options.facebook); + + // This method reloads video on-demand + FB.XFBML.parse(); + + if (autoplay) { + fbApi.play(); + } + + break; + + case 'currentTime': + fbApi.seek(value); + break; + + case 'muted': + if (value) { + fbApi.mute(); + } else { + fbApi.unmute(); + } + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', fbWrapper); + mediaElement.dispatchEvent(event); + }, 50); + break; + + case 'volume': + fbApi.setVolume(value); + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', fbWrapper); + mediaElement.dispatchEvent(event); + }, 50); + break; + + case 'readyState': + var event = mejs.Utils.createEvent('canplay', fbWrapper); + mediaElement.dispatchEvent(event); + break; + + default: + + break; + } + } else { + // store for after "READY" event fires + apiStack.push({ type: 'set', propName: propName, value: value }); + } + }; + }; + + for (var i = 0, total = props.length; i < total; i++) { + assignGettersSetters(props[i]); + } + + // add wrappers for native methods + var methods = mejs.html5media.methods, + assignMethods = function assignMethods(methodName) { + + // run the method on the native HTMLMediaElement + fbWrapper[methodName] = function () { + + if (fbApi !== null) { + + // DO method + switch (methodName) { + case 'play': + return fbApi.play(); + case 'pause': + return fbApi.pause(); + case 'load': + return null; + + } + } else { + apiStack.push({ type: 'call', methodName: methodName }); + } + }; + }; + + for (var _i = 0, _total = methods.length; _i < _total; _i++) { + assignMethods(methods[_i]); + } + + /** + * Dispatch a list of events + * + * @private + * @param {Array} events + */ + function sendEvents(events) { + for (var _i2 = 0, _total2 = events.length; _i2 < _total2; _i2++) { + var event = mejs.Utils.createEvent(events[_i2], fbWrapper); + mediaElement.dispatchEvent(event); + } + } + + /** + * Create a new Facebook player and attach all its events + * + * This method creates a <div> element that, once the API is available, will generate an <iframe>. + * Valid URL format(s): + * - https://www.facebook.com/johndyer/videos/10107816243681884/ + * + * @param {String} url + * @param {Object} config + */ + function createFacebookEmbed(url, config) { + + // Append width and height if not detected + src = url; + + fbDiv = document.createElement('div'); + fbDiv.id = fbWrapper.id; + fbDiv.className = "fb-video"; + fbDiv.setAttribute("data-href", url); + fbDiv.setAttribute("data-allowfullscreen", "true"); + fbDiv.setAttribute("data-controls", "false"); + + mediaElement.originalNode.parentNode.insertBefore(fbDiv, mediaElement.originalNode); + mediaElement.originalNode.style.display = 'none'; + + /* + * Register Facebook API event globally + * + */ + window.fbAsyncInit = function () { + + FB.init(config); + + FB.Event.subscribe('xfbml.ready', function (msg) { + + if (msg.type === 'video') { + (function () { + + fbApi = msg.instance; + + // Set proper size since player dimensions are unknown before this event + var fbIframe = fbDiv.getElementsByTagName('iframe')[0], + width = fbIframe.offsetWidth, + height = fbIframe.offsetHeight, + events = ['mouseover', 'mouseout'], + assignEvents = function assignEvents(e) { + var event = mejs.Utils.createEvent(e.type, fbWrapper); + mediaElement.dispatchEvent(event); + }; + + fbWrapper.setSize(width, height); + + if (autoplay) { + fbApi.play(); + } + + for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) { + fbIframe.addEventListener(events[_i3], assignEvents, false); + } + + // remove previous listeners + var fbEvents = ['startedPlaying', 'paused', 'finishedPlaying', 'startedBuffering', 'finishedBuffering']; + for (var _i4 = 0, _total4 = fbEvents.length; _i4 < _total4; _i4++) { + var event = fbEvents[_i4], + handler = eventHandler[event]; + if (handler !== undefined && handler !== null && !mejs.Utils.isObjectEmpty(handler) && typeof handler.removeListener === 'function') { + handler.removeListener(event); + } + } + + // do call stack + if (apiStack.length) { + for (var _i5 = 0, _total5 = apiStack.length; _i5 < _total5; _i5++) { + + var stackItem = apiStack[_i5]; + + if (stackItem.type === 'set') { + var propName = stackItem.propName, + capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); + + fbWrapper['set' + capName](stackItem.value); + } else if (stackItem.type === 'call') { + fbWrapper[stackItem.methodName](); + } + } + } + + sendEvents(['rendererready', 'loadeddata', 'canplay', 'progress', 'loadedmetadata', 'timeupdate']); + + var timer = void 0; + + // Custom Facebook events + eventHandler.startedPlaying = fbApi.subscribe('startedPlaying', function () { + if (!hasStartedPlaying) { + hasStartedPlaying = true; + } + paused = false; + ended = false; + sendEvents(['play', 'playing', 'timeupdate']); + + // Workaround to update progress bar + timer = setInterval(function () { + fbApi.getCurrentPosition(); + sendEvents(['timeupdate']); + }, 250); + }); + eventHandler.paused = fbApi.subscribe('paused', function () { + paused = true; + ended = false; + sendEvents(['pause']); + }); + eventHandler.finishedPlaying = fbApi.subscribe('finishedPlaying', function () { + paused = true; + ended = true; + + sendEvents(['ended']); + clearInterval(timer); + timer = null; + }); + eventHandler.startedBuffering = fbApi.subscribe('startedBuffering', function () { + sendEvents(['progress', 'timeupdate']); + }); + eventHandler.finishedBuffering = fbApi.subscribe('finishedBuffering', function () { + sendEvents(['progress', 'timeupdate']); + }); + })(); + } + }); + }; + + (function (d, s, id) { + var fjs = d.getElementsByTagName(s)[0]; + if (d.getElementById(id)) { + return; + } + var js = d.createElement(s); + js.id = id; + js.src = '//connect.facebook.net/en_US/sdk.js'; + fjs.parentNode.insertBefore(js, fjs); + })(document, 'script', 'facebook-jssdk'); + } + + if (mediaFiles.length > 0) { + createFacebookEmbed(mediaFiles[0].src, fbWrapper.options.facebook); + } + + fbWrapper.hide = function () { + fbWrapper.stopInterval(); + fbWrapper.pause(); + if (fbDiv) { + fbDiv.style.display = 'none'; + } + }; + fbWrapper.show = function () { + if (fbDiv) { + fbDiv.style.display = ''; + } + }; + fbWrapper.setSize = function (width, height) { + if (fbApi !== null && !isNaN(width) && !isNaN(height)) { + fbDiv.style.width = width; + fbDiv.style.height = height; + } + }; + fbWrapper.destroy = function () {}; + fbWrapper.interval = null; + + fbWrapper.startInterval = function () { + // create timer + fbWrapper.interval = setInterval(function () { + var event = mejs.Utils.createEvent('timeupdate', fbWrapper); + mediaElement.dispatchEvent(event); + }, 250); + }; + fbWrapper.stopInterval = function () { + if (fbWrapper.interval) { + clearInterval(fbWrapper.interval); + } + }; + + return fbWrapper; + } +}; + +/** + * Register Facebook type based on URL structure + * + */ +mejs.Utils.typeChecks.push(function (url) { + url = url.toLowerCase(); + return url.includes('//www.facebook') ? 'video/x-facebook' : null; +}); + +mejs.Renderers.add(FacebookRenderer); + +},{}]},{},[1]); diff --git a/lib/mejs/renderers/facebook.min.js b/lib/mejs/renderers/facebook.min.js new file mode 100644 index 0000000000000000000000000000000000000000..246f377eb4cad69f4f35e04dd01eb5f5948a17ac --- /dev/null +++ b/lib/mejs/renderers/facebook.min.js @@ -0,0 +1,22 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + *//*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */ +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d={name:"facebook",options:{prefix:"facebook",facebook:{appId:"{your-app-id}",xfbml:!0,version:"v2.6"}},canPlayType:function(a){return["video/facebook","video/x-facebook"].includes(a)},create:function(a,b,c){function d(b){for(var c=0,d=b.length;d>c;c++){var e=mejs.Utils.createEvent(b[c],f);a.dispatchEvent(e)}}function e(b,c){k=b,p=document.createElement("div"),p.id=f.id,p.className="fb-video",p.setAttribute("data-href",b),p.setAttribute("data-allowfullscreen","true"),p.setAttribute("data-controls","false"),a.originalNode.parentNode.insertBefore(p,a.originalNode),a.originalNode.style.display="none",window.fbAsyncInit=function(){FB.init(c),FB.Event.subscribe("xfbml.ready",function(b){"video"===b.type&&!function(){o=b.instance;var c=p.getElementsByTagName("iframe")[0],e=c.offsetWidth,i=c.offsetHeight,k=["mouseover","mouseout"],q=function(b){var c=mejs.Utils.createEvent(b.type,f);a.dispatchEvent(c)};f.setSize(e,i),j&&o.play();for(var r=0,s=k.length;s>r;r++)c.addEventListener(k[r],q,!1);for(var t=["startedPlaying","paused","finishedPlaying","startedBuffering","finishedBuffering"],u=0,v=t.length;v>u;u++){var w=t[u],x=h[w];void 0===x||null===x||mejs.Utils.isObjectEmpty(x)||"function"!=typeof x.removeListener||x.removeListener(w)}if(g.length)for(var y=0,z=g.length;z>y;y++){var A=g[y];if("set"===A.type){var B=A.propName,C=""+B.substring(0,1).toUpperCase()+B.substring(1);f["set"+C](A.value)}else"call"===A.type&&f[A.methodName]()}d(["rendererready","loadeddata","canplay","progress","loadedmetadata","timeupdate"]);var D=void 0;h.startedPlaying=o.subscribe("startedPlaying",function(){n||(n=!0),l=!1,m=!1,d(["play","playing","timeupdate"]),D=setInterval(function(){o.getCurrentPosition(),d(["timeupdate"])},250)}),h.paused=o.subscribe("paused",function(){l=!0,m=!1,d(["pause"])}),h.finishedPlaying=o.subscribe("finishedPlaying",function(){l=!0,m=!0,d(["ended"]),clearInterval(D),D=null}),h.startedBuffering=o.subscribe("startedBuffering",function(){d(["progress","timeupdate"])}),h.finishedBuffering=o.subscribe("finishedBuffering",function(){d(["progress","timeupdate"])})}()})},function(a,b,c){var d=a.getElementsByTagName(b)[0];if(!a.getElementById(c)){var e=a.createElement(b);e.id=c,e.src="//connect.facebook.net/en_US/sdk.js",d.parentNode.insertBefore(e,d)}}(document,"script","facebook-jssdk")}var f={},g=[],h={},i=4,j=a.originalNode.autoplay,k="",l=!0,m=!1,n=!1,o=null,p=null;b=Object.assign(b,a.options),f.options=b,f.id=a.id+"_"+b.prefix,f.mediaElement=a;for(var q=mejs.html5media.properties,r=function(c){var d=""+c.substring(0,1).toUpperCase()+c.substring(1);f["get"+d]=function(){if(null!==o){var a=null;switch(c){case"currentTime":return o.getCurrentPosition();case"duration":return o.getDuration();case"volume":return o.getVolume();case"paused":return l;case"ended":return m;case"muted":return o.isMuted();case"buffered":return{start:function(){return 0},end:function(){return 0},length:1};case"src":return k;case"readyState":return i}return a}return null},f["set"+d]=function(d){if(null!==o)switch(c){case"src":var h="string"==typeof d?d:d[0].src;p.remove(),e(h,b.facebook),FB.XFBML.parse(),j&&o.play();break;case"currentTime":o.seek(d);break;case"muted":d?o.mute():o.unmute(),setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",f);a.dispatchEvent(b)},50);break;case"volume":o.setVolume(d),setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",f);a.dispatchEvent(b)},50);break;case"readyState":var i=mejs.Utils.createEvent("canplay",f);a.dispatchEvent(i)}else g.push({type:"set",propName:c,value:d})}},s=0,t=q.length;t>s;s++)r(q[s]);for(var u=mejs.html5media.methods,v=function(a){f[a]=function(){if(null!==o)switch(a){case"play":return o.play();case"pause":return o.pause();case"load":return null}else g.push({type:"call",methodName:a})}},w=0,x=u.length;x>w;w++)v(u[w]);return c.length>0&&e(c[0].src,f.options.facebook),f.hide=function(){f.stopInterval(),f.pause(),p&&(p.style.display="none")},f.show=function(){p&&(p.style.display="")},f.setSize=function(a,b){null===o||isNaN(a)||isNaN(b)||(p.style.width=a,p.style.height=b)},f.destroy=function(){},f.interval=null,f.startInterval=function(){f.interval=setInterval(function(){var b=mejs.Utils.createEvent("timeupdate",f);a.dispatchEvent(b)},250)},f.stopInterval=function(){f.interval&&clearInterval(f.interval)},f}};mejs.Utils.typeChecks.push(function(a){return a=a.toLowerCase(),a.includes("//www.facebook")?"video/x-facebook":null}),mejs.Renderers.add(d)},{}]},{},[1]); \ No newline at end of file diff --git a/lib/mejs/renderers/soundcloud.js b/lib/mejs/renderers/soundcloud.js new file mode 100644 index 0000000000000000000000000000000000000000..e9043d52b6cfa1670e5c1d35e5adda3223d7b610 --- /dev/null +++ b/lib/mejs/renderers/soundcloud.js @@ -0,0 +1,444 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ +'use strict'; + +/** + * SoundCloud renderer + * + * Uses <iframe> approach and uses SoundCloud Widget API to manipulate it. + * @see https://developers.soundcloud.com/docs/api/html5-widget + */ + +var SoundCloudApi = { + /** + * @type {Boolean} + */ + isSDKStarted: false, + /** + * @type {Boolean} + */ + isSDKLoaded: false, + /** + * @type {Array} + */ + iframeQueue: [], + + /** + * Create a queue to prepare the creation of <iframe> + * + * @param {Object} settings - an object with settings needed to create <iframe> + */ + enqueueIframe: function enqueueIframe(settings) { + + if (SoundCloudApi.isLoaded) { + SoundCloudApi.createIframe(settings); + } else { + SoundCloudApi.loadIframeApi(); + SoundCloudApi.iframeQueue.push(settings); + } + }, + + /** + * Load SoundCloud API script on the header of the document + * + */ + loadIframeApi: function loadIframeApi() { + if (!SoundCloudApi.isSDKStarted) { + (function () { + + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + var done = false; + + script.src = '//w.soundcloud.com/player/api.js'; + + // Attach handlers for all browsers + // Is onload enough now? do IE9 support it? + script.onload = script.onreadystatechange = function () { + if (!done && (!SoundCloudApi.readyState || SoundCloudApi.readyState === "loaded" || SoundCloudApi.readyState === "complete")) { + done = true; + SoundCloudApi.apiReady(); + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + script.remove(); + } + }; + head.appendChild(script); + SoundCloudApi.isSDKStarted = true; + })(); + } + }, + + /** + * Process queue of SoundCloud <iframe> element creation + * + */ + apiReady: function apiReady() { + SoundCloudApi.isLoaded = true; + SoundCloudApi.isSDKLoaded = true; + + while (SoundCloudApi.iframeQueue.length > 0) { + var settings = SoundCloudApi.iframeQueue.pop(); + SoundCloudApi.createIframe(settings); + } + }, + + /** + * Create a new instance of SoundCloud Widget player and trigger a custom event to initialize it + * + * @param {Object} settings - an object with settings needed to create <iframe> + */ + createIframe: function createIframe(settings) { + var player = SC.Widget(settings.iframe); + window['__ready__' + settings.id](player); + } +}; + +var SoundCloudIframeRenderer = { + name: 'soundcloud_iframe', + + options: { + prefix: 'soundcloud_iframe' + }, + + /** + * Determine if a specific element type can be played with this render + * + * @param {String} type + * @return {Boolean} + */ + canPlayType: function canPlayType(type) { + return ['video/soundcloud', 'video/x-soundcloud'].includes(type); + }, + + /** + * Create the player instance and add all native events/methods/properties as possible + * + * @param {MediaElement} mediaElement Instance of mejs.MediaElement already created + * @param {Object} options All the player configuration options passed through constructor + * @param {Object[]} mediaFiles List of sources with format: {src: url, type: x/y-z} + * @return {Object} + */ + create: function create(mediaElement, options, mediaFiles) { + + // create our fake element that allows events and such to work + var sc = {}, + apiStack = [], + readyState = 4, + autoplay = mediaElement.originalNode.autoplay; + + var duration = 0, + currentTime = 0, + bufferedTime = 0, + volume = 1, + muted = false, + paused = true, + ended = false, + scPlayer = null, + scIframe = null; + + // store main variable + sc.options = options; + sc.id = mediaElement.id + '_' + options.prefix; + sc.mediaElement = mediaElement; + + // wrappers for get/set + var props = mejs.html5media.properties, + assignGettersSetters = function assignGettersSetters(propName) { + + // add to flash state that we will store + + var capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1); + + sc["get" + capName] = function () { + if (scPlayer !== null) { + var value = null; + + // figure out how to get dm dta here + switch (propName) { + case 'currentTime': + return currentTime; + + case 'duration': + return duration; + + case 'volume': + return volume; + + case 'paused': + return paused; + + case 'ended': + return ended; + + case 'muted': + return muted; // ? + + case 'buffered': + return { + start: function start() { + return 0; + }, + end: function end() { + return bufferedTime * duration; + }, + length: 1 + }; + case 'src': + return scIframe ? scIframe.src : ''; + + case 'readyState': + return readyState; + } + + return value; + } else { + return null; + } + }; + + sc["set" + capName] = function (value) { + + if (scPlayer !== null) { + + // do something + switch (propName) { + + case 'src': + var url = typeof value === 'string' ? value : value[0].src; + + scPlayer.load(url); + + if (autoplay) { + scPlayer.play(); + } + break; + + case 'currentTime': + scPlayer.seekTo(value * 1000); + break; + + case 'muted': + if (value) { + scPlayer.setVolume(0); // ? + } else { + scPlayer.setVolume(1); // ? + } + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', sc); + mediaElement.dispatchEvent(event); + }, 50); + break; + + case 'volume': + scPlayer.setVolume(value); + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', sc); + mediaElement.dispatchEvent(event); + }, 50); + break; + + case 'readyState': + var event = mejs.Utils.createEvent('canplay', sc); + mediaElement.dispatchEvent(event); + break; + + default: + + break; + } + } else { + // store for after "READY" event fires + apiStack.push({ type: 'set', propName: propName, value: value }); + } + }; + }; + + for (var i = 0, total = props.length; i < total; i++) { + assignGettersSetters(props[i]); + } + + // add wrappers for native methods + var methods = mejs.html5media.methods, + assignMethods = function assignMethods(methodName) { + + // run the method on the Soundcloud API + sc[methodName] = function () { + + if (scPlayer !== null) { + + // DO method + switch (methodName) { + case 'play': + return scPlayer.play(); + case 'pause': + return scPlayer.pause(); + case 'load': + return null; + + } + } else { + apiStack.push({ type: 'call', methodName: methodName }); + } + }; + }; + + for (var _i = 0, _total = methods.length; _i < _total; _i++) { + assignMethods(methods[_i]); + } + + // add a ready method that SC can fire + window['__ready__' + sc.id] = function (_scPlayer) { + + mediaElement.scPlayer = scPlayer = _scPlayer; + + if (autoplay) { + scPlayer.play(); + } + + // do call stack + if (apiStack.length) { + for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) { + + var stackItem = apiStack[_i2]; + + if (stackItem.type === 'set') { + var propName = stackItem.propName, + capName = "" + propName.substring(0, 1).toUpperCase() + propName.substring(1); + + sc["set" + capName](stackItem.value); + } else if (stackItem.type === 'call') { + sc[stackItem.methodName](); + } + } + } + + // SoundCloud properties are async, so we don't fire the event until the property callback fires + scPlayer.bind(SC.Widget.Events.PLAY_PROGRESS, function () { + paused = false; + ended = false; + + scPlayer.getPosition(function (_currentTime) { + currentTime = _currentTime / 1000; + var event = mejs.Utils.createEvent('timeupdate', sc); + mediaElement.dispatchEvent(event); + }); + }); + + scPlayer.bind(SC.Widget.Events.PAUSE, function () { + paused = true; + + var event = mejs.Utils.createEvent('pause', sc); + mediaElement.dispatchEvent(event); + }); + scPlayer.bind(SC.Widget.Events.PLAY, function () { + paused = false; + ended = false; + + var event = mejs.Utils.createEvent('play', sc); + mediaElement.dispatchEvent(event); + }); + scPlayer.bind(SC.Widget.Events.FINISHED, function () { + paused = false; + ended = true; + + var event = mejs.Utils.createEvent('ended', sc); + mediaElement.dispatchEvent(event); + }); + scPlayer.bind(SC.Widget.Events.READY, function () { + scPlayer.getDuration(function (_duration) { + duration = _duration / 1000; + + var event = mejs.Utils.createEvent('loadedmetadata', sc); + mediaElement.dispatchEvent(event); + }); + }); + scPlayer.bind(SC.Widget.Events.LOAD_PROGRESS, function () { + scPlayer.getDuration(function (loadProgress) { + if (duration > 0) { + bufferedTime = duration * loadProgress; + + var event = mejs.Utils.createEvent('progress', sc); + mediaElement.dispatchEvent(event); + } + }); + scPlayer.getDuration(function (_duration) { + duration = _duration; + + var event = mejs.Utils.createEvent('loadedmetadata', sc); + mediaElement.dispatchEvent(event); + }); + }); + + // give initial events + var initEvents = ['rendererready', 'loadeddata', 'loadedmetadata', 'canplay']; + + for (var _i3 = 0, _total3 = initEvents.length; _i3 < _total3; _i3++) { + var event = mejs.Utils.createEvent(initEvents[_i3], sc); + mediaElement.dispatchEvent(event); + } + }; + + // container for API API + scIframe = document.createElement('iframe'); + scIframe.id = sc.id; + scIframe.width = 10; + scIframe.height = 10; + scIframe.frameBorder = 0; + scIframe.style.visibility = 'hidden'; + scIframe.src = mediaFiles[0].src; + scIframe.scrolling = 'no'; + + mediaElement.appendChild(scIframe); + mediaElement.originalNode.style.display = 'none'; + + var scSettings = { + iframe: scIframe, + id: sc.id + }; + + SoundCloudApi.enqueueIframe(scSettings); + + sc.setSize = function () {}; + sc.hide = function () { + sc.pause(); + if (scIframe) { + scIframe.style.display = 'none'; + } + }; + sc.show = function () { + if (scIframe) { + scIframe.style.display = ''; + } + }; + sc.destroy = function () { + scPlayer.destroy(); + }; + + return sc; + } +}; + +/** + * Register SoundCloud type based on URL structure + * + */ +mejs.Utils.typeChecks.push(function (url) { + url = url.toLowerCase(); + return url.includes('//soundcloud.com') || url.includes('//w.soundcloud.com') ? 'video/x-soundcloud' : null; +}); + +mejs.Renderers.add(SoundCloudIframeRenderer); + +},{}]},{},[1]); diff --git a/lib/mejs/renderers/soundcloud.min.js b/lib/mejs/renderers/soundcloud.min.js new file mode 100644 index 0000000000000000000000000000000000000000..dbd7bffcb649fec27e8d46b65664fbd114f08d02 --- /dev/null +++ b/lib/mejs/renderers/soundcloud.min.js @@ -0,0 +1,22 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + *//*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */ +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d={isSDKStarted:!1,isSDKLoaded:!1,iframeQueue:[],enqueueIframe:function(a){d.isLoaded?d.createIframe(a):(d.loadIframeApi(),d.iframeQueue.push(a))},loadIframeApi:function(){d.isSDKStarted||!function(){var a=document.getElementsByTagName("head")[0]||document.documentElement,b=document.createElement("script"),c=!1;b.src="//w.soundcloud.com/player/api.js",b.onload=b.onreadystatechange=function(){c||d.readyState&&"loaded"!==d.readyState&&"complete"!==d.readyState||(c=!0,d.apiReady(),b.onload=b.onreadystatechange=null,b.remove())},a.appendChild(b),d.isSDKStarted=!0}()},apiReady:function(){for(d.isLoaded=!0,d.isSDKLoaded=!0;d.iframeQueue.length>0;){var a=d.iframeQueue.pop();d.createIframe(a)}},createIframe:function(a){var b=SC.Widget(a.iframe);window["__ready__"+a.id](b)}},e={name:"soundcloud_iframe",options:{prefix:"soundcloud_iframe"},canPlayType:function(a){return["video/soundcloud","video/x-soundcloud"].includes(a)},create:function(a,b,c){var e={},f=[],g=4,h=a.originalNode.autoplay,i=0,j=0,k=0,l=1,m=!1,n=!0,o=!1,p=null,q=null;e.options=b,e.id=a.id+"_"+b.prefix,e.mediaElement=a;for(var r=mejs.html5media.properties,s=function(b){var c=""+b.substring(0,1).toUpperCase()+b.substring(1);e["get"+c]=function(){if(null!==p){var a=null;switch(b){case"currentTime":return j;case"duration":return i;case"volume":return l;case"paused":return n;case"ended":return o;case"muted":return m;case"buffered":return{start:function(){return 0},end:function(){return k*i},length:1};case"src":return q?q.src:"";case"readyState":return g}return a}return null},e["set"+c]=function(c){if(null!==p)switch(b){case"src":var d="string"==typeof c?c:c[0].src;p.load(d),h&&p.play();break;case"currentTime":p.seekTo(1e3*c);break;case"muted":c?p.setVolume(0):p.setVolume(1),setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",e);a.dispatchEvent(b)},50);break;case"volume":p.setVolume(c),setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",e);a.dispatchEvent(b)},50);break;case"readyState":var g=mejs.Utils.createEvent("canplay",e);a.dispatchEvent(g)}else f.push({type:"set",propName:b,value:c})}},t=0,u=r.length;u>t;t++)s(r[t]);for(var v=mejs.html5media.methods,w=function(a){e[a]=function(){if(null!==p)switch(a){case"play":return p.play();case"pause":return p.pause();case"load":return null}else f.push({type:"call",methodName:a})}},x=0,y=v.length;y>x;x++)w(v[x]);window["__ready__"+e.id]=function(b){if(a.scPlayer=p=b,h&&p.play(),f.length)for(var c=0,d=f.length;d>c;c++){var g=f[c];if("set"===g.type){var l=g.propName,m=""+l.substring(0,1).toUpperCase()+l.substring(1);e["set"+m](g.value)}else"call"===g.type&&e[g.methodName]()}p.bind(SC.Widget.Events.PLAY_PROGRESS,function(){n=!1,o=!1,p.getPosition(function(b){j=b/1e3;var c=mejs.Utils.createEvent("timeupdate",e);a.dispatchEvent(c)})}),p.bind(SC.Widget.Events.PAUSE,function(){n=!0;var b=mejs.Utils.createEvent("pause",e);a.dispatchEvent(b)}),p.bind(SC.Widget.Events.PLAY,function(){n=!1,o=!1;var b=mejs.Utils.createEvent("play",e);a.dispatchEvent(b)}),p.bind(SC.Widget.Events.FINISHED,function(){n=!1,o=!0;var b=mejs.Utils.createEvent("ended",e);a.dispatchEvent(b)}),p.bind(SC.Widget.Events.READY,function(){p.getDuration(function(b){i=b/1e3;var c=mejs.Utils.createEvent("loadedmetadata",e);a.dispatchEvent(c)})}),p.bind(SC.Widget.Events.LOAD_PROGRESS,function(){p.getDuration(function(b){if(i>0){k=i*b;var c=mejs.Utils.createEvent("progress",e);a.dispatchEvent(c)}}),p.getDuration(function(b){i=b;var c=mejs.Utils.createEvent("loadedmetadata",e);a.dispatchEvent(c)})});for(var q=["rendererready","loadeddata","loadedmetadata","canplay"],r=0,s=q.length;s>r;r++){var t=mejs.Utils.createEvent(q[r],e);a.dispatchEvent(t)}},q=document.createElement("iframe"),q.id=e.id,q.width=10,q.height=10,q.frameBorder=0,q.style.visibility="hidden",q.src=c[0].src,q.scrolling="no",a.appendChild(q),a.originalNode.style.display="none";var z={iframe:q,id:e.id};return d.enqueueIframe(z),e.setSize=function(){},e.hide=function(){e.pause(),q&&(q.style.display="none")},e.show=function(){q&&(q.style.display="")},e.destroy=function(){p.destroy()},e}};mejs.Utils.typeChecks.push(function(a){return a=a.toLowerCase(),a.includes("//soundcloud.com")||a.includes("//w.soundcloud.com")?"video/x-soundcloud":null}),mejs.Renderers.add(e)},{}]},{},[1]); \ No newline at end of file diff --git a/lib/mejs/renderers/twitch.js b/lib/mejs/renderers/twitch.js new file mode 100644 index 0000000000000000000000000000000000000000..b2c46ed036cadcc5f842c66379e843fe58bf0703 --- /dev/null +++ b/lib/mejs/renderers/twitch.js @@ -0,0 +1,539 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ +'use strict'; + +/** + * Twitch renderer + * + * Uses <iframe> approach and uses Twitch API to manipulate it. + * @see https://github.com/justintv/Twitch-API/blob/master/embed-video.md + */ + +var twitchApi = { + /** + * @type {Boolean} + */ + isIframeStarted: false, + /** + * @type {Boolean} + */ + isIframeLoaded: false, + /** + * @type {Array} + */ + iframeQueue: [], + + /** + * Create a queue to prepare the creation of <iframe> + * + * @param {Object} settings - an object with settings needed to create <iframe> + */ + enqueueIframe: function enqueueIframe(settings) { + + // Check whether Twitch API is already loaded. + twitchApi.isLoaded = typeof Twitch !== 'undefined'; + + if (twitchApi.isLoaded) { + twitchApi.createIframe(settings); + } else { + twitchApi.loadIframeApi(); + twitchApi.iframeQueue.push(settings); + } + }, + + /** + * Load Twitch API script on the header of the document + * + */ + loadIframeApi: function loadIframeApi() { + if (!twitchApi.isIframeStarted) { + (function () { + + var script = document.createElement('script'), + firstScriptTag = document.getElementsByTagName('script')[0]; + + var done = false; + + script.src = '//player.twitch.tv/js/embed/v1.js'; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function () { + if (!done && (!twitchApi.readyState || twitchApi.readyState === undefined || twitchApi.readyState === "loaded" || twitchApi.readyState === "complete")) { + done = true; + twitchApi.iFrameReady(); + script.onload = script.onreadystatechange = null; + } + }; + firstScriptTag.parentNode.insertBefore(script, firstScriptTag); + twitchApi.isIframeStarted = true; + })(); + } + }, + + /** + * Process queue of Twitch <iframe> element creation + * + */ + iFrameReady: function iFrameReady() { + + twitchApi.isLoaded = true; + twitchApi.isIframeLoaded = true; + + while (twitchApi.iframeQueue.length > 0) { + var settings = twitchApi.iframeQueue.pop(); + twitchApi.createIframe(settings); + } + }, + + /** + * Create a new instance of Twitch API player and trigger a custom event to initialize it + * + * @param {Object} settings - an object with settings needed to create <iframe> + */ + createIframe: function createIframe(settings) { + var player = new Twitch.Player(settings.id, settings); + window['__ready__' + settings.id](player); + }, + + /** + * Extract ID from Twitch to be loaded through API + * Valid URL format(s): + * - https://player.twitch.tv/?video=40464143 + * - https://www.twitch.tv/40464143 + * - https://player.twitch.tv/?channel=monserrat + * - https://www.twitch.tv/monserrat + * + * @param {String} url - Twitch full URL to grab the number Id of the source + * @return {int} + */ + getTwitchId: function getTwitchId(url) { + + var twitchId = ''; + + if (url.indexOf('?') > 0) { + twitchId = twitchApi.getTwitchIdFromParam(url); + if (twitchId === '') { + twitchId = twitchApi.getTwitchIdFromUrl(url); + } + } else { + twitchId = twitchApi.getTwitchIdFromUrl(url); + } + + return twitchId; + }, + + /** + * Get ID from URL with format: + * - https://player.twitch.tv/?channel=monserrat + * - https://player.twitch.tv/?video=40464143 + * + * @param {String} url + * @returns {string} + */ + getTwitchIdFromParam: function getTwitchIdFromParam(url) { + + if (url === undefined || url === null || !url.trim().length) { + return null; + } + + var parts = url.split('?'), + parameters = parts[1].split('&'); + + var twitchId = ''; + + for (var i = 0, total = parameters.length; i < total; i++) { + var paramParts = parameters[i].split('='); + if (paramParts[0].includes('channel=')) { + twitchId = paramParts[1]; + break; + } else if (paramParts[0].includes('video=')) { + twitchId = 'v' + paramParts[1]; + break; + } + } + + return twitchId; + }, + + /** + * Get ID from URL with formats: + * - https://www.twitch.tv/40464143 + * - https://www.twitch.tv/monserrat + * + * @param {String} url + * @return {?String} + */ + getTwitchIdFromUrl: function getTwitchIdFromUrl(url) { + + if (url === undefined || url === null || !url.trim().length) { + return null; + } + + var parts = url.split('?'); + url = parts[0]; + var id = url.substring(url.lastIndexOf('/') + 1); + return id.match(/^\d+$/i) !== null ? 'v' + id : id; + }, + + /** + * Determine whether media is channel or video based on Twitch ID + * + * @see getTwitchId() + * @param {String} id + * @returns {String} + */ + getTwitchType: function getTwitchType(id) { + return id.match(/^v\d+/i) !== null ? 'video' : 'channel'; + } +}; + +var TwitchIframeRenderer = { + name: 'twitch_iframe', + + options: { + prefix: 'twitch_iframe' + }, + + /** + * Determine if a specific element type can be played with this render + * + * @param {String} type + * @return {Boolean} + */ + canPlayType: function canPlayType(type) { + return ['video/twitch', 'video/x-twitch'].includes(type); + }, + + /** + * Create the player instance and add all native events/methods/properties as possible + * + * @param {MediaElement} mediaElement Instance of mejs.MediaElement already created + * @param {Object} options All the player configuration options passed through constructor + * @param {Object[]} mediaFiles List of sources with format: {src: url, type: x/y-z} + * @return {Object} + */ + create: function create(mediaElement, options, mediaFiles) { + + // API objects + var twitch = {}, + apiStack = [], + readyState = 4, + twitchId = twitchApi.getTwitchId(mediaFiles[0].src); + + var twitchPlayer = null, + paused = true, + ended = false, + hasStartedPlaying = false, + volume = 1, + duration = Infinity, + time = 0; + + twitch.options = options; + twitch.id = mediaElement.id + '_' + options.prefix; + twitch.mediaElement = mediaElement; + + // wrappers for get/set + var props = mejs.html5media.properties, + assignGettersSetters = function assignGettersSetters(propName) { + + // add to flash state that we will store + + var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); + + twitch['get' + capName] = function () { + if (twitchPlayer !== null) { + var value = null; + + // figure out how to get Twitch dta here + switch (propName) { + case 'currentTime': + time = twitchPlayer.getCurrentTime(); + return time; + + case 'duration': + duration = twitchPlayer.getDuration(); + return duration; + + case 'volume': + volume = twitchPlayer.getVolume(); + return volume; + + case 'paused': + paused = twitchPlayer.isPaused(); + return paused; + + case 'ended': + ended = twitchPlayer.getEnded(); + return ended; + + case 'muted': + return twitchPlayer.getMuted(); + + case 'buffered': + return { + start: function start() { + return 0; + }, + end: function end() { + return 0; + }, + length: 1 + }; + case 'src': + + return twitchApi.getTwitchType(twitchId) === 'channel' ? twitchPlayer.getChannel() : twitchPlayer.getVideo(); + + case 'readyState': + return readyState; + } + + return value; + } else { + return null; + } + }; + + twitch['set' + capName] = function (value) { + + if (twitchPlayer !== null) { + + // do something + switch (propName) { + + case 'src': + var url = typeof value === 'string' ? value : value[0].src, + videoId = twitchApi.getTwitchId(url); + + if (twitchApi.getTwitchType(twitchId) === 'channel') { + twitchPlayer.setChannel(videoId); + } else { + twitchPlayer.setVideo(videoId); + } + break; + + case 'currentTime': + twitchPlayer.seek(value); + setTimeout(function () { + var event = mejs.Utils.createEvent('timeupdate', twitch); + mediaElement.dispatchEvent(event); + }, 50); + break; + + case 'muted': + twitchPlayer.setMuted(value); + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', twitch); + mediaElement.dispatchEvent(event); + }, 50); + break; + + case 'volume': + volume = value; + twitchPlayer.setVolume(value); + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', twitch); + mediaElement.dispatchEvent(event); + }, 50); + break; + case 'readyState': + var event = mejs.Utils.createEvent('canplay', twitch); + mediaElement.dispatchEvent(event); + break; + + default: + + break; + } + } else { + // store for after "READY" event fires + apiStack.push({ type: 'set', propName: propName, value: value }); + } + }; + }; + + for (var i = 0, total = props.length; i < total; i++) { + assignGettersSetters(props[i]); + } + + // add wrappers for native methods + var methods = mejs.html5media.methods, + assignMethods = function assignMethods(methodName) { + + // run the method on the native HTMLMediaElement + twitch[methodName] = function () { + + if (twitchPlayer !== null) { + + // DO method + switch (methodName) { + case 'play': + paused = false; + return twitchPlayer.play(); + case 'pause': + paused = true; + return twitchPlayer.pause(); + case 'load': + return null; + + } + } else { + apiStack.push({ type: 'call', methodName: methodName }); + } + }; + }; + + for (var _i = 0, _total = methods.length; _i < _total; _i++) { + assignMethods(methods[_i]); + } + + /** + * Dispatch a list of events + * + * @private + * @param {Array} events + */ + function sendEvents(events) { + for (var _i2 = 0, _total2 = events.length; _i2 < _total2; _i2++) { + var event = mejs.Utils.createEvent(events[_i2], twitch); + mediaElement.dispatchEvent(event); + } + } + + // Initial method to register all Twitch events when initializing <iframe> + window['__ready__' + twitch.id] = function (_twitchPlayer) { + + mediaElement.twitchPlayer = twitchPlayer = _twitchPlayer; + + // do call stack + if (apiStack.length) { + for (var _i3 = 0, _total3 = apiStack.length; _i3 < _total3; _i3++) { + + var stackItem = apiStack[_i3]; + + if (stackItem.type === 'set') { + var propName = stackItem.propName, + capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); + + twitch['set' + capName](stackItem.value); + } else if (stackItem.type === 'call') { + twitch[stackItem.methodName](); + } + } + } + + var twitchIframe = document.getElementById(twitch.id).firstChild; + twitchIframe.style.width = '100%'; + twitchIframe.style.height = '100%'; + + // a few more events + var events = ['mouseover', 'mouseout']; + + var assignEvents = function assignEvents(e) { + var event = createEvent(e.type, twitch); + mediaElement.dispatchEvent(event); + }; + + for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) { + twitchIframe.addEventListener(events[_i4], assignEvents, false); + } + + var timer = void 0; + + // Twitch events + twitchPlayer.addEventListener('ready', function () { + paused = false; + ended = false; + sendEvents(['rendererready', 'loadedmetadata', 'loadeddata', 'canplay']); + }); + twitchPlayer.addEventListener('play', function () { + if (!hasStartedPlaying) { + hasStartedPlaying = true; + } + paused = false; + ended = false; + sendEvents(['play', 'playing', 'progress']); + + // Workaround to update progress bar + timer = setInterval(function () { + twitchPlayer.getCurrentTime(); + sendEvents(['timeupdate']); + }, 250); + }); + twitchPlayer.addEventListener('pause', function () { + paused = true; + ended = false; + if (!twitchPlayer.getEnded()) { + sendEvents(['pause']); + } + }); + twitchPlayer.addEventListener('ended', function () { + paused = true; + ended = true; + sendEvents(['ended']); + clearInterval(timer); + hasStartedPlaying = false; + timer = null; + }); + }; + + // CREATE Twitch + var height = mediaElement.originalNode.height, + width = mediaElement.originalNode.width, + twitchContainer = document.createElement('div'), + type = twitchApi.getTwitchType(twitchId), + twitchSettings = { + id: twitch.id, + width: width, + height: height, + playsinline: false, + autoplay: mediaElement.originalNode.autoplay + }; + + twitchSettings[type] = twitchId; + twitchContainer.id = twitch.id; + twitchContainer.style.width = '100%'; + twitchContainer.style.height = '100%'; + + mediaElement.originalNode.parentNode.insertBefore(twitchContainer, mediaElement.originalNode); + mediaElement.originalNode.style.display = 'none'; + mediaElement.originalNode.autoplay = false; + + // send it off for async loading and creation + twitchApi.enqueueIframe(twitchSettings); + + twitch.setSize = function (width, height) { + if (twitchApi !== null && !isNaN(width) && !isNaN(height)) { + twitchContainer.setAttribute('width', width); + twitchContainer.setAttribute('height', height); + } + }; + twitch.hide = function () { + twitch.pause(); + twitchContainer.style.display = 'none'; + }; + twitch.show = function () { + twitchContainer.style.display = ''; + }; + twitch.destroy = function () {}; + + return twitch; + } +}; + +mejs.Utils.typeChecks.push(function (url) { + url = url.toLowerCase(); + return url.includes('//www.twitch.tv') || url.includes('//player.twitch.tv') ? 'video/x-twitch' : null; +}); + +mejs.Renderers.add(TwitchIframeRenderer); + +},{}]},{},[1]); diff --git a/lib/mejs/renderers/twitch.min.js b/lib/mejs/renderers/twitch.min.js new file mode 100644 index 0000000000000000000000000000000000000000..5a5645f1650eabe98b61a9cda8a0f5f270bdb20c --- /dev/null +++ b/lib/mejs/renderers/twitch.min.js @@ -0,0 +1,22 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + *//*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */ +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d={isIframeStarted:!1,isIframeLoaded:!1,iframeQueue:[],enqueueIframe:function(a){d.isLoaded="undefined"!=typeof Twitch,d.isLoaded?d.createIframe(a):(d.loadIframeApi(),d.iframeQueue.push(a))},loadIframeApi:function(){d.isIframeStarted||!function(){var a=document.createElement("script"),b=document.getElementsByTagName("script")[0],c=!1;a.src="//player.twitch.tv/js/embed/v1.js",a.onload=a.onreadystatechange=function(){c||d.readyState&&void 0!==d.readyState&&"loaded"!==d.readyState&&"complete"!==d.readyState||(c=!0,d.iFrameReady(),a.onload=a.onreadystatechange=null)},b.parentNode.insertBefore(a,b),d.isIframeStarted=!0}()},iFrameReady:function(){for(d.isLoaded=!0,d.isIframeLoaded=!0;d.iframeQueue.length>0;){var a=d.iframeQueue.pop();d.createIframe(a)}},createIframe:function(a){var b=new Twitch.Player(a.id,a);window["__ready__"+a.id](b)},getTwitchId:function(a){var b="";return a.indexOf("?")>0?(b=d.getTwitchIdFromParam(a),""===b&&(b=d.getTwitchIdFromUrl(a))):b=d.getTwitchIdFromUrl(a),b},getTwitchIdFromParam:function(a){if(void 0===a||null===a||!a.trim().length)return null;for(var b=a.split("?"),c=b[1].split("&"),d="",e=0,f=c.length;f>e;e++){var g=c[e].split("=");if(g[0].includes("channel=")){d=g[1];break}if(g[0].includes("video=")){d="v"+g[1];break}}return d},getTwitchIdFromUrl:function(a){if(void 0===a||null===a||!a.trim().length)return null;var b=a.split("?");a=b[0];var c=a.substring(a.lastIndexOf("/")+1);return null!==c.match(/^\d+$/i)?"v"+c:c},getTwitchType:function(a){return null!==a.match(/^v\d+/i)?"video":"channel"}},e={name:"twitch_iframe",options:{prefix:"twitch_iframe"},canPlayType:function(a){return["video/twitch","video/x-twitch"].includes(a)},create:function(a,b,c){function e(b){for(var c=0,d=b.length;d>c;c++){var e=mejs.Utils.createEvent(b[c],f);a.dispatchEvent(e)}}var f={},g=[],h=4,i=d.getTwitchId(c[0].src),j=null,k=!0,l=!1,m=!1,n=1,o=1/0,p=0;f.options=b,f.id=a.id+"_"+b.prefix,f.mediaElement=a;for(var q=mejs.html5media.properties,r=function(b){var c=""+b.substring(0,1).toUpperCase()+b.substring(1);f["get"+c]=function(){if(null!==j){var a=null;switch(b){case"currentTime":return p=j.getCurrentTime();case"duration":return o=j.getDuration();case"volume":return n=j.getVolume();case"paused":return k=j.isPaused();case"ended":return l=j.getEnded();case"muted":return j.getMuted();case"buffered":return{start:function(){return 0},end:function(){return 0},length:1};case"src":return"channel"===d.getTwitchType(i)?j.getChannel():j.getVideo();case"readyState":return h}return a}return null},f["set"+c]=function(c){if(null!==j)switch(b){case"src":var e="string"==typeof c?c:c[0].src,h=d.getTwitchId(e);"channel"===d.getTwitchType(i)?j.setChannel(h):j.setVideo(h);break;case"currentTime":j.seek(c),setTimeout(function(){var b=mejs.Utils.createEvent("timeupdate",f);a.dispatchEvent(b)},50);break;case"muted":j.setMuted(c),setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",f);a.dispatchEvent(b)},50);break;case"volume":n=c,j.setVolume(c),setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",f);a.dispatchEvent(b)},50);break;case"readyState":var k=mejs.Utils.createEvent("canplay",f);a.dispatchEvent(k)}else g.push({type:"set",propName:b,value:c})}},s=0,t=q.length;t>s;s++)r(q[s]);for(var u=mejs.html5media.methods,v=function(a){f[a]=function(){if(null!==j)switch(a){case"play":return k=!1,j.play();case"pause":return k=!0,j.pause();case"load":return null}else g.push({type:"call",methodName:a})}},w=0,x=u.length;x>w;w++)v(u[w]);window["__ready__"+f.id]=function(b){if(a.twitchPlayer=j=b,g.length)for(var c=0,d=g.length;d>c;c++){var h=g[c];if("set"===h.type){var i=h.propName,n=""+i.substring(0,1).toUpperCase()+i.substring(1);f["set"+n](h.value)}else"call"===h.type&&f[h.methodName]()}var o=document.getElementById(f.id).firstChild;o.style.width="100%",o.style.height="100%";for(var p=["mouseover","mouseout"],q=function(b){var c=createEvent(b.type,f);a.dispatchEvent(c)},r=0,s=p.length;s>r;r++)o.addEventListener(p[r],q,!1);var t=void 0;j.addEventListener("ready",function(){k=!1,l=!1,e(["rendererready","loadedmetadata","loadeddata","canplay"])}),j.addEventListener("play",function(){m||(m=!0),k=!1,l=!1,e(["play","playing","progress"]),t=setInterval(function(){j.getCurrentTime(),e(["timeupdate"])},250)}),j.addEventListener("pause",function(){k=!0,l=!1,j.getEnded()||e(["pause"])}),j.addEventListener("ended",function(){k=!0,l=!0,e(["ended"]),clearInterval(t),m=!1,t=null})};var y=a.originalNode.height,z=a.originalNode.width,A=document.createElement("div"),B=d.getTwitchType(i),C={id:f.id,width:z,height:y,playsinline:!1,autoplay:a.originalNode.autoplay};return C[B]=i,A.id=f.id,A.style.width="100%",A.style.height="100%",a.originalNode.parentNode.insertBefore(A,a.originalNode),a.originalNode.style.display="none",a.originalNode.autoplay=!1,d.enqueueIframe(C),f.setSize=function(a,b){null===d||isNaN(a)||isNaN(b)||(A.setAttribute("width",a),A.setAttribute("height",b))},f.hide=function(){f.pause(),A.style.display="none"},f.show=function(){A.style.display=""},f.destroy=function(){},f}};mejs.Utils.typeChecks.push(function(a){return a=a.toLowerCase(),a.includes("//www.twitch.tv")||a.includes("//player.twitch.tv")?"video/x-twitch":null}),mejs.Renderers.add(e)},{}]},{},[1]); \ No newline at end of file diff --git a/lib/mejs/renderers/vimeo.js b/lib/mejs/renderers/vimeo.js new file mode 100644 index 0000000000000000000000000000000000000000..aed2362f9c3a3fc79970aa26bab51198ea704e4a --- /dev/null +++ b/lib/mejs/renderers/vimeo.js @@ -0,0 +1,531 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ +'use strict'; + +/** + * Vimeo renderer + * + * Uses <iframe> approach and uses Vimeo API to manipulate it. + * All Vimeo calls return a Promise so this renderer accounts for that + * to update all the necessary values to interact with MediaElement player. + * Note: IE8 implements ECMAScript 3 that does not allow bare keywords in dot notation; + * that's why instead of using .catch ['catch'] is being used. + * @see https://github.com/vimeo/player.js + * + */ + +var vimeoApi = { + + /** + * @type {Boolean} + */ + isIframeStarted: false, + /** + * @type {Boolean} + */ + isIframeLoaded: false, + /** + * @type {Array} + */ + iframeQueue: [], + + /** + * Create a queue to prepare the creation of <iframe> + * + * @param {Object} settings - an object with settings needed to create <iframe> + */ + enqueueIframe: function enqueueIframe(settings) { + + if (vimeoApi.isLoaded) { + vimeoApi.createIframe(settings); + } else { + vimeoApi.loadIframeApi(); + vimeoApi.iframeQueue.push(settings); + } + }, + + /** + * Load Vimeo API script on the header of the document + * + */ + loadIframeApi: function loadIframeApi() { + + if (!vimeoApi.isIframeStarted) { + (function () { + + var script = document.createElement('script'), + firstScriptTag = document.getElementsByTagName('script')[0]; + + var done = false; + + script.src = '//player.vimeo.com/api/player.js'; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function () { + if (!done && (!vimeoApi.readyState || vimeoApi.readyState === undefined || vimeoApi.readyState === "loaded" || vimeoApi.readyState === "complete")) { + done = true; + vimeoApi.iFrameReady(); + script.onload = script.onreadystatechange = null; + } + }; + firstScriptTag.parentNode.insertBefore(script, firstScriptTag); + vimeoApi.isIframeStarted = true; + })(); + } + }, + + /** + * Process queue of Vimeo <iframe> element creation + * + */ + iFrameReady: function iFrameReady() { + + vimeoApi.isLoaded = true; + vimeoApi.isIframeLoaded = true; + + while (vimeoApi.iframeQueue.length > 0) { + var settings = vimeoApi.iframeQueue.pop(); + vimeoApi.createIframe(settings); + } + }, + + /** + * Create a new instance of Vimeo API player and trigger a custom event to initialize it + * + * @param {Object} settings - an object with settings needed to create <iframe> + */ + createIframe: function createIframe(settings) { + var player = new Vimeo.Player(settings.iframe); + window['__ready__' + settings.id](player); + }, + + /** + * Extract numeric value from Vimeo to be loaded through API + * Valid URL format(s): + * - https://player.vimeo.com/video/59777392 + * - https://vimeo.com/59777392 + * + * @param {String} url - Vimeo full URL to grab the number Id of the source + * @return {int} + */ + getVimeoId: function getVimeoId(url) { + if (url === undefined || url === null) { + return null; + } + + var parts = url.split('?'); + + url = parts[0]; + + return parseInt(url.substring(url.lastIndexOf('/') + 1)); + } +}; + +var vimeoIframeRenderer = { + + name: 'vimeo_iframe', + + options: { + prefix: 'vimeo_iframe' + }, + /** + * Determine if a specific element type can be played with this render + * + * @param {String} type + * @return {Boolean} + */ + canPlayType: function canPlayType(type) { + return ['video/vimeo', 'video/x-vimeo'].includes(type); + }, + + /** + * Create the player instance and add all native events/methods/properties as possible + * + * @param {MediaElement} mediaElement Instance of mejs.MediaElement already created + * @param {Object} options All the player configuration options passed through constructor + * @param {Object[]} mediaFiles List of sources with format: {src: url, type: x/y-z} + * @return {Object} + */ + create: function create(mediaElement, options, mediaFiles) { + + // exposed object + var apiStack = [], + vimeo = {}, + readyState = 4; + + var paused = true, + volume = 1, + oldVolume = volume, + currentTime = 0, + bufferedTime = 0, + ended = false, + duration = 0, + vimeoPlayer = null, + url = ''; + + vimeo.options = options; + vimeo.id = mediaElement.id + '_' + options.prefix; + vimeo.mediaElement = mediaElement; + + /** + * Generate custom errors for Vimeo based on the API specifications + * + * @see https://github.com/vimeo/player.js#error + * @param {Object} error + * @param {Object} target + */ + var errorHandler = function errorHandler(error, target) { + var event = mejs.Utils.createEvent('error', target); + event.message = error.name + ': ' + error.message; + mediaElement.dispatchEvent(event); + }; + + // wrappers for get/set + var props = mejs.html5media.properties, + assignGettersSetters = function assignGettersSetters(propName) { + + var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); + + vimeo['get' + capName] = function () { + if (vimeoPlayer !== null) { + var value = null; + + switch (propName) { + case 'currentTime': + return currentTime; + + case 'duration': + return duration; + + case 'volume': + return volume; + case 'muted': + return volume === 0; + case 'paused': + return paused; + case 'ended': + return ended; + + case 'src': + vimeoPlayer.getVideoUrl().then(function (_url) { + url = _url; + }); + + return url; + case 'buffered': + return { + start: function start() { + return 0; + }, + end: function end() { + return bufferedTime * duration; + }, + length: 1 + }; + case 'readyState': + return readyState; + } + + return value; + } else { + return null; + } + }; + + vimeo['set' + capName] = function (value) { + + if (vimeoPlayer !== null) { + + // do something + switch (propName) { + + case 'src': + var _url2 = typeof value === 'string' ? value : value[0].src, + videoId = vimeoApi.getVimeoId(_url2); + + vimeoPlayer.loadVideo(videoId).then(function () { + if (mediaElement.originalNode.autoplay) { + vimeoPlayer.play(); + } + })['catch'](function (error) { + errorHandler(error, vimeo); + }); + break; + + case 'currentTime': + vimeoPlayer.setCurrentTime(value).then(function () { + currentTime = value; + setTimeout(function () { + var event = mejs.Utils.createEvent('timeupdate', vimeo); + mediaElement.dispatchEvent(event); + }, 50); + })['catch'](function (error) { + errorHandler(error, vimeo); + }); + break; + + case 'volume': + vimeoPlayer.setVolume(value).then(function () { + volume = value; + oldVolume = volume; + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', vimeo); + mediaElement.dispatchEvent(event); + }, 50); + })['catch'](function (error) { + errorHandler(error, vimeo); + }); + break; + + case 'loop': + vimeoPlayer.setLoop(value)['catch'](function (error) { + errorHandler(error, vimeo); + }); + break; + case 'muted': + if (value) { + vimeoPlayer.setVolume(0).then(function () { + volume = 0; + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', vimeo); + mediaElement.dispatchEvent(event); + }, 50); + })['catch'](function (error) { + errorHandler(error, vimeo); + }); + } else { + vimeoPlayer.setVolume(oldVolume).then(function () { + volume = oldVolume; + setTimeout(function () { + var event = mejs.Utils.createEvent('volumechange', vimeo); + mediaElement.dispatchEvent(event); + }, 50); + })['catch'](function (error) { + errorHandler(error, vimeo); + }); + } + break; + case 'readyState': + var event = mejs.Utils.createEvent('canplay', vimeo); + mediaElement.dispatchEvent(event); + break; + default: + + break; + } + } else { + // store for after "READY" event fires + apiStack.push({ type: 'set', propName: propName, value: value }); + } + }; + }; + + for (var i = 0, total = props.length; i < total; i++) { + assignGettersSetters(props[i]); + } + + // add wrappers for native methods + var methods = mejs.html5media.methods, + assignMethods = function assignMethods(methodName) { + vimeo[methodName] = function () { + + if (vimeoPlayer !== null) { + + // DO method + switch (methodName) { + case 'play': + paused = false; + return vimeoPlayer.play(); + case 'pause': + paused = true; + return vimeoPlayer.pause(); + case 'load': + return null; + + } + } else { + apiStack.push({ type: 'call', methodName: methodName }); + } + }; + }; + + for (var _i = 0, _total = methods.length; _i < _total; _i++) { + assignMethods(methods[_i]); + } + + // Initial method to register all Vimeo events when initializing <iframe> + window['__ready__' + vimeo.id] = function (_vimeoPlayer) { + + mediaElement.vimeoPlayer = vimeoPlayer = _vimeoPlayer; + + // do call stack + if (apiStack.length) { + for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) { + + var stackItem = apiStack[_i2]; + + if (stackItem.type === 'set') { + var propName = stackItem.propName, + capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); + + vimeo['set' + capName](stackItem.value); + } else if (stackItem.type === 'call') { + vimeo[stackItem.methodName](); + } + } + } + + var vimeoIframe = document.getElementById(vimeo.id); + var events = void 0; + + // a few more events + events = ['mouseover', 'mouseout']; + + var assignEvents = function assignEvents(e) { + var event = mejs.Utils.createEvent(e.type, vimeo); + mediaElement.dispatchEvent(event); + }; + + for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) { + vimeoIframe.addEventListener(events[_i3], assignEvents, false); + } + + // Vimeo events + vimeoPlayer.on('loaded', function () { + + vimeoPlayer.getDuration().then(function (loadProgress) { + + duration = loadProgress; + + if (duration > 0) { + bufferedTime = duration * loadProgress; + } + + var event = mejs.Utils.createEvent('loadedmetadata', vimeo); + mediaElement.dispatchEvent(event); + })['catch'](function (error) { + errorHandler(error, vimeo); + }); + }); + + vimeoPlayer.on('progress', function () { + vimeoPlayer.getDuration().then(function (loadProgress) { + + duration = loadProgress; + + if (duration > 0) { + bufferedTime = duration * loadProgress; + } + + var event = mejs.Utils.createEvent('progress', vimeo); + mediaElement.dispatchEvent(event); + })['catch'](function (error) { + errorHandler(error, vimeo); + }); + }); + vimeoPlayer.on('timeupdate', function () { + vimeoPlayer.getCurrentTime().then(function (seconds) { + currentTime = seconds; + + var event = mejs.Utils.createEvent('timeupdate', vimeo); + mediaElement.dispatchEvent(event); + })['catch'](function (error) { + errorHandler(error, vimeo); + }); + }); + vimeoPlayer.on('play', function () { + paused = false; + ended = false; + var event = mejs.Utils.createEvent('play', vimeo); + mediaElement.dispatchEvent(event); + }); + vimeoPlayer.on('pause', function () { + paused = true; + ended = false; + + var event = mejs.Utils.createEvent('pause', vimeo); + mediaElement.dispatchEvent(event); + }); + vimeoPlayer.on('ended', function () { + paused = false; + ended = true; + + var event = mejs.Utils.createEvent('ended', vimeo); + mediaElement.dispatchEvent(event); + }); + + // give initial events + events = ['rendererready', 'loadeddata', 'loadedmetadata', 'canplay']; + + for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) { + var event = mejs.Utils.createEvent(events[_i4], vimeo); + mediaElement.dispatchEvent(event); + } + }; + + var height = mediaElement.originalNode.height, + width = mediaElement.originalNode.width, + vimeoContainer = document.createElement('iframe'), + standardUrl = '//player.vimeo.com/video/' + vimeoApi.getVimeoId(mediaFiles[0].src), + queryArgs = mediaFiles[0].src.includes('?') ? '?' + mediaFiles[0].src.slice(mediaFiles[0].src.indexOf('?') + 1) : ''; + + // Create Vimeo <iframe> markup + vimeoContainer.setAttribute('id', vimeo.id); + vimeoContainer.setAttribute('width', width); + vimeoContainer.setAttribute('height', height); + vimeoContainer.setAttribute('frameBorder', '0'); + vimeoContainer.setAttribute('src', '' + standardUrl + queryArgs); + vimeoContainer.setAttribute('webkitallowfullscreen', ''); + vimeoContainer.setAttribute('mozallowfullscreen', ''); + vimeoContainer.setAttribute('allowfullscreen', ''); + + mediaElement.originalNode.parentNode.insertBefore(vimeoContainer, mediaElement.originalNode); + mediaElement.originalNode.style.display = 'none'; + + vimeoApi.enqueueIframe({ + iframe: vimeoContainer, + id: vimeo.id + }); + + vimeo.hide = function () { + vimeo.pause(); + if (vimeoPlayer) { + vimeoContainer.style.display = 'none'; + } + }; + vimeo.setSize = function (width, height) { + vimeoContainer.setAttribute('width', width); + vimeoContainer.setAttribute('height', height); + }; + vimeo.show = function () { + if (vimeoPlayer) { + vimeoContainer.style.display = ''; + } + }; + + return vimeo; + } + +}; + +/** + * Register Vimeo type based on URL structure + * + */ +mejs.Utils.typeChecks.push(function (url) { + url = url.toLowerCase(); + return url.includes('//player.vimeo') || url.includes('vimeo.com') ? 'video/x-vimeo' : null; +}); + +mejs.Renderers.add(vimeoIframeRenderer); + +},{}]},{},[1]); diff --git a/lib/mejs/renderers/vimeo.min.js b/lib/mejs/renderers/vimeo.min.js new file mode 100644 index 0000000000000000000000000000000000000000..75f0898257e56867317d96885a92d98e8b4b3486 --- /dev/null +++ b/lib/mejs/renderers/vimeo.min.js @@ -0,0 +1,22 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + *//*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */ +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d={isIframeStarted:!1,isIframeLoaded:!1,iframeQueue:[],enqueueIframe:function(a){d.isLoaded?d.createIframe(a):(d.loadIframeApi(),d.iframeQueue.push(a))},loadIframeApi:function(){d.isIframeStarted||!function(){var a=document.createElement("script"),b=document.getElementsByTagName("script")[0],c=!1;a.src="//player.vimeo.com/api/player.js",a.onload=a.onreadystatechange=function(){c||d.readyState&&void 0!==d.readyState&&"loaded"!==d.readyState&&"complete"!==d.readyState||(c=!0,d.iFrameReady(),a.onload=a.onreadystatechange=null)},b.parentNode.insertBefore(a,b),d.isIframeStarted=!0}()},iFrameReady:function(){for(d.isLoaded=!0,d.isIframeLoaded=!0;d.iframeQueue.length>0;){var a=d.iframeQueue.pop();d.createIframe(a)}},createIframe:function(a){var b=new Vimeo.Player(a.iframe);window["__ready__"+a.id](b)},getVimeoId:function(a){if(void 0===a||null===a)return null;var b=a.split("?");return a=b[0],parseInt(a.substring(a.lastIndexOf("/")+1))}},e={name:"vimeo_iframe",options:{prefix:"vimeo_iframe"},canPlayType:function(a){return["video/vimeo","video/x-vimeo"].includes(a)},create:function(a,b,c){var e=[],f={},g=4,h=!0,i=1,j=i,k=0,l=0,m=!1,n=0,o=null,p="";f.options=b,f.id=a.id+"_"+b.prefix,f.mediaElement=a;for(var q=function(b,c){var d=mejs.Utils.createEvent("error",c);d.message=b.name+": "+b.message,a.dispatchEvent(d)},r=mejs.html5media.properties,s=function(b){var c=""+b.substring(0,1).toUpperCase()+b.substring(1);f["get"+c]=function(){if(null!==o){var a=null;switch(b){case"currentTime":return k;case"duration":return n;case"volume":return i;case"muted":return 0===i;case"paused":return h;case"ended":return m;case"src":return o.getVideoUrl().then(function(a){p=a}),p;case"buffered":return{start:function(){return 0},end:function(){return l*n},length:1};case"readyState":return g}return a}return null},f["set"+c]=function(c){if(null!==o)switch(b){case"src":var g="string"==typeof c?c:c[0].src,h=d.getVimeoId(g);o.loadVideo(h).then(function(){a.originalNode.autoplay&&o.play()})["catch"](function(a){q(a,f)});break;case"currentTime":o.setCurrentTime(c).then(function(){k=c,setTimeout(function(){var b=mejs.Utils.createEvent("timeupdate",f);a.dispatchEvent(b)},50)})["catch"](function(a){q(a,f)});break;case"volume":o.setVolume(c).then(function(){i=c,j=i,setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",f);a.dispatchEvent(b)},50)})["catch"](function(a){q(a,f)});break;case"loop":o.setLoop(c)["catch"](function(a){q(a,f)});break;case"muted":c?o.setVolume(0).then(function(){i=0,setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",f);a.dispatchEvent(b)},50)})["catch"](function(a){q(a,f)}):o.setVolume(j).then(function(){i=j,setTimeout(function(){var b=mejs.Utils.createEvent("volumechange",f);a.dispatchEvent(b)},50)})["catch"](function(a){q(a,f)});break;case"readyState":var l=mejs.Utils.createEvent("canplay",f);a.dispatchEvent(l)}else e.push({type:"set",propName:b,value:c})}},t=0,u=r.length;u>t;t++)s(r[t]);for(var v=mejs.html5media.methods,w=function(a){f[a]=function(){if(null!==o)switch(a){case"play":return h=!1,o.play();case"pause":return h=!0,o.pause();case"load":return null}else e.push({type:"call",methodName:a})}},x=0,y=v.length;y>x;x++)w(v[x]);window["__ready__"+f.id]=function(b){if(a.vimeoPlayer=o=b,e.length)for(var c=0,d=e.length;d>c;c++){var g=e[c];if("set"===g.type){var i=g.propName,j=""+i.substring(0,1).toUpperCase()+i.substring(1);f["set"+j](g.value)}else"call"===g.type&&f[g.methodName]()}var p=document.getElementById(f.id),r=void 0;r=["mouseover","mouseout"];for(var s=function(b){var c=mejs.Utils.createEvent(b.type,f);a.dispatchEvent(c)},t=0,u=r.length;u>t;t++)p.addEventListener(r[t],s,!1);o.on("loaded",function(){o.getDuration().then(function(b){n=b,n>0&&(l=n*b);var c=mejs.Utils.createEvent("loadedmetadata",f);a.dispatchEvent(c)})["catch"](function(a){q(a,f)})}),o.on("progress",function(){o.getDuration().then(function(b){n=b,n>0&&(l=n*b);var c=mejs.Utils.createEvent("progress",f);a.dispatchEvent(c)})["catch"](function(a){q(a,f)})}),o.on("timeupdate",function(){o.getCurrentTime().then(function(b){k=b;var c=mejs.Utils.createEvent("timeupdate",f);a.dispatchEvent(c)})["catch"](function(a){q(a,f)})}),o.on("play",function(){h=!1,m=!1;var b=mejs.Utils.createEvent("play",f);a.dispatchEvent(b)}),o.on("pause",function(){h=!0,m=!1;var b=mejs.Utils.createEvent("pause",f);a.dispatchEvent(b)}),o.on("ended",function(){h=!1,m=!0;var b=mejs.Utils.createEvent("ended",f);a.dispatchEvent(b)}),r=["rendererready","loadeddata","loadedmetadata","canplay"];for(var v=0,w=r.length;w>v;v++){var x=mejs.Utils.createEvent(r[v],f);a.dispatchEvent(x)}};var z=a.originalNode.height,A=a.originalNode.width,B=document.createElement("iframe"),C="//player.vimeo.com/video/"+d.getVimeoId(c[0].src),D=c[0].src.includes("?")?"?"+c[0].src.slice(c[0].src.indexOf("?")+1):"";return B.setAttribute("id",f.id),B.setAttribute("width",A),B.setAttribute("height",z),B.setAttribute("frameBorder","0"),B.setAttribute("src",""+C+D),B.setAttribute("webkitallowfullscreen",""),B.setAttribute("mozallowfullscreen",""),B.setAttribute("allowfullscreen",""),a.originalNode.parentNode.insertBefore(B,a.originalNode),a.originalNode.style.display="none",d.enqueueIframe({iframe:B,id:f.id}),f.hide=function(){f.pause(),o&&(B.style.display="none")},f.setSize=function(a,b){B.setAttribute("width",a),B.setAttribute("height",b)},f.show=function(){o&&(B.style.display="")},f}};mejs.Utils.typeChecks.push(function(a){return a=a.toLowerCase(),a.includes("//player.vimeo")||a.includes("vimeo.com")?"video/x-vimeo":null}),mejs.Renderers.add(e)},{}]},{},[1]); \ No newline at end of file diff --git a/paquet.xml b/paquet.xml index 7ad9c916f9291717b3142e9a1fc21c6dd047d63f..e9401b33e00bc5b4f070f6a87fa24dbe5cd8537d 100644 --- a/paquet.xml +++ b/paquet.xml @@ -1,7 +1,7 @@ <paquet prefix="medias" categorie="multimedia" - version="2.18.12" + version="2.18.13" etat="stable" compatibilite="[3.2.0-dev;3.2.*]" logo="prive/themes/spip/images/portfolio-32.png"