From eb88f1ef94948a3f163274f18ec545f4c825e295 Mon Sep 17 00:00:00 2001 From: jforbes Date: Fri, 11 Nov 2016 16:26:04 -0500 Subject: [PATCH] 1.1.1 --- dist/lang/ar.js | 12 ++ dist/lang/de.js | 9 ++ dist/lang/en.js | 12 ++ dist/lang/es.js | 9 ++ dist/lang/fr.js | 9 ++ dist/lang/it.js | 12 ++ dist/lang/ja.js | 9 ++ dist/lang/ko.js | 9 ++ dist/lang/ru.js | 12 ++ dist/lang/tr.js | 12 ++ dist/lang/zh-CN.js | 12 ++ dist/lang/zh-TW.js | 12 ++ dist/videojs-errors.css | 7 + dist/videojs-errors.js | 281 +++++++++++++++++++++++++++++++++++++ dist/videojs-errors.min.js | 7 + 15 files changed, 424 insertions(+) create mode 100644 dist/lang/ar.js create mode 100644 dist/lang/de.js create mode 100644 dist/lang/en.js create mode 100644 dist/lang/es.js create mode 100644 dist/lang/fr.js create mode 100644 dist/lang/it.js create mode 100644 dist/lang/ja.js create mode 100644 dist/lang/ko.js create mode 100644 dist/lang/ru.js create mode 100644 dist/lang/tr.js create mode 100644 dist/lang/zh-CN.js create mode 100644 dist/lang/zh-TW.js create mode 100644 dist/videojs-errors.css create mode 100644 dist/videojs-errors.js create mode 100644 dist/videojs-errors.min.js diff --git a/dist/lang/ar.js b/dist/lang/ar.js new file mode 100644 index 0000000..454cc33 --- /dev/null +++ b/dist/lang/ar.js @@ -0,0 +1,12 @@ +videojs.addLanguage('ar', { + "No video has been loaded": "لم يتم تحميل أي فيديو", + "Could not download the video": "لا يمكن تحميل الفيديو", + "The video connection was lost, please confirm you are connected to the internet": "فقد الاتصال بالفيديو، يرجى التأكد من الاتصال بالإنترنت", + "The video is bad or in a format that cannot be played on your browser": "جودة الفيديو سيئة أو في صيغة لا يمكن للمتصفحك تشغيلها", + "This video is either unavailable or not supported in this browser": "هذا الفيديو غير متوفر أو غير معتمد في هذا المتصفح", + "Error Code": "كود الخطأ", + "Technical details": "تفاصيل تقنية", + "The video download was cancelled": "تم إلغاء تحميل الفيديو", + "The video you are trying to watch is encrypted and we do not know how to decrypt it": "تم تشفير الفيديو الذي تحاول مشاهدته و لا نعرف كيفية فك تشفيرها", + "An unanticipated problem was encountered, check back soon and try again": "نواجه مشكلة غير متوقعة، تحقق وحاول مرة أخرى بعد قليل" +}); \ No newline at end of file diff --git a/dist/lang/de.js b/dist/lang/de.js new file mode 100644 index 0000000..c780be8 --- /dev/null +++ b/dist/lang/de.js @@ -0,0 +1,9 @@ +videojs.addLanguage('de', { + "No video has been loaded": "Es wurde kein Video geladen.", + "Could not download the video": "Das Video konnte nicht heruntergeladen werden.", + "The video connection was lost, please confirm you are connected to the internet": "Die Videoverbindung wurde abgebrochen, überprüfen Sie, ob eine Internetverbindung besteht.", + "The video is bad or in a format that cannot be played on your browser": "Dieses Video ist beschädigt, oder das Format ist mit Ihrem Browser nicht abspielbar.", + "This video is either unavailable or not supported in this browser": "Dieses Video ist entweder nicht verfügbar, oder es wird in diesem Browser nicht unterstützt.", + "Error Code": "Fehlercode", + "Technical details": "Technische Details" +}); \ No newline at end of file diff --git a/dist/lang/en.js b/dist/lang/en.js new file mode 100644 index 0000000..42663cc --- /dev/null +++ b/dist/lang/en.js @@ -0,0 +1,12 @@ +videojs.addLanguage('en', { + "No video has been loaded": "No video has been loaded", + "Could not download the video": "Could not download the video", + "The video connection was lost, please confirm you are connected to the internet": "The video connection was lost, please confirm you are connected to the internet", + "The video is bad or in a format that cannot be played on your browser": "The video is bad or in a format that cannot be played on your browser", + "This video is either unavailable or not supported in this browser": "This video is either unavailable or not supported in this browser", + "Error Code": "Error Code", + "Technical details": "Technical details", + "The video download was cancelled": "The video download was cancelled", + "The video you are trying to watch is encrypted and we do not know how to decrypt it": "The video you are trying to watch is encrypted and we do not know how to decrypt it", + "An unanticipated problem was encountered, check back soon and try again": "An unanticipated problem was encountered, check back soon and try again" +}); \ No newline at end of file diff --git a/dist/lang/es.js b/dist/lang/es.js new file mode 100644 index 0000000..9de69c9 --- /dev/null +++ b/dist/lang/es.js @@ -0,0 +1,9 @@ +videojs.addLanguage('es', { + "No video has been loaded": "No hay ningún vídeo cargado.", + "Could not download the video": "No se ha podido descargar el vídeo.", + "The video connection was lost, please confirm you are connected to the internet": "Se ha perdido la conexión al vídeo. Compruebe si su equipo está conectado a internet.", + "The video is bad or in a format that cannot be played on your browser": "El vídeo está dañado o tiene un formato no reproducible en su navegador.", + "This video is either unavailable or not supported in this browser": "Este vídeo no está disponible o es incompatible con este navegador.", + "Error Code": "Código de error", + "Technical details": "Detalles técnicos" +}); \ No newline at end of file diff --git a/dist/lang/fr.js b/dist/lang/fr.js new file mode 100644 index 0000000..b0a9b5b --- /dev/null +++ b/dist/lang/fr.js @@ -0,0 +1,9 @@ +videojs.addLanguage('fr', { + "No video has been loaded": "Aucune vidéo n'a été chargée.", + "Could not download the video": "Impossible de télécharger la vidéo.", + "The video connection was lost, please confirm you are connected to the internet": "La connexion à la vidéo a été perdue, vérifiez que vous êtes bien connecté à Internet.", + "The video is bad or in a format that cannot be played on your browser": "La vidéo est de mauvaise qualité ou dans un format incompatible avec votre navigateur.", + "This video is either unavailable or not supported in this browser": "Cette vidéo est indisponible ou non prise en charge par ce navigateur.", + "Error Code": "Code d'erreur", + "Technical details": "Détails techniques" +}); \ No newline at end of file diff --git a/dist/lang/it.js b/dist/lang/it.js new file mode 100644 index 0000000..374a66d --- /dev/null +++ b/dist/lang/it.js @@ -0,0 +1,12 @@ +videojs.addLanguage('it', { + "No video has been loaded": "Nessun video caricato", + "Could not download the video": "Impossibile eseguire il download dei video", + "The video connection was lost, please confirm you are connected to the internet": "La connessione al video è andata persa. Verificare di essere connessi a Internet", + "The video is bad or in a format that cannot be played on your browser": "Il video è corrotto oppure è in un formato non riproducibile dal browser in uso", + "This video is either unavailable or not supported in this browser": "Questo video non è disponibile oppure non è supportato dal browser in uso", + "Error Code": "Codice di Errore", + "Technical details": "Dettagli tecnici", + "The video download was cancelled": "Nessun video caricato", + "The video you are trying to watch is encrypted and we do not know how to decrypt it": "Il video che si sta cercando di riprodurre è codificato in un formato non riconosciuto", + "An unanticipated problem was encountered, check back soon and try again": "Si è verificato un problema imprevisto. Riprovare più tardi" +}); \ No newline at end of file diff --git a/dist/lang/ja.js b/dist/lang/ja.js new file mode 100644 index 0000000..7a0db62 --- /dev/null +++ b/dist/lang/ja.js @@ -0,0 +1,9 @@ +videojs.addLanguage('ja', { + "No video has been loaded": "動画がロードされませんでした", + "Could not download the video": "動画をダウンロードできませんでした", + "The video connection was lost, please confirm you are connected to the internet": "動画の接続が失われました。インターネットに接続していることを確認してください", + "The video is bad or in a format that cannot be played on your browser": "動画が悪いか、お役様のブラウザで再生できない動画フォーマットです。", + "This video is either unavailable or not supported in this browser": "この動画は利用できないか、このブラウザによってサポートされていません", + "Error Code": "エラー コード", + "Technical details": "技術面の詳細" +}); \ No newline at end of file diff --git a/dist/lang/ko.js b/dist/lang/ko.js new file mode 100644 index 0000000..59f08ea --- /dev/null +++ b/dist/lang/ko.js @@ -0,0 +1,9 @@ +videojs.addLanguage('ko', { + "No video has been loaded": "비디오가 로드되지 않았습니다.", + "Could not download the video": "비디오를 다운로드하지 못 했습니다.", + "The video connection was lost, please confirm you are connected to the internet": "비디오 연결이 끊겼습니다. 인터넷 연결 상태를 확인하십시오.", + "The video is bad or in a format that cannot be played on your browser": "비디오 상태가 불량이거나 브라우저에서 재생할 수 없는 형식입니다.", + "This video is either unavailable or not supported in this browser": "브라우저에서 이 비디오를 사용할 수 없거나 지원하지 않습니다.", + "Error Code": "오류 코드", + "Technical details": "기술 세부사항" +}); \ No newline at end of file diff --git a/dist/lang/ru.js b/dist/lang/ru.js new file mode 100644 index 0000000..9a91e7a --- /dev/null +++ b/dist/lang/ru.js @@ -0,0 +1,12 @@ +videojs.addLanguage('ru', { + "No video has been loaded": "Видео не загружено", + "Could not download the video": "Не удалось загрузить видео", + "The video connection was lost, please confirm you are connected to the internet": "Видеосоединение потеряно; проверьте подключение к интернету", + "The video is bad or in a format that cannot be played on your browser": "Видео некачественное или имеет формат, который не воспроизводится вашим браузером", + "This video is either unavailable or not supported in this browser": "Указанное видео недоступно или не поддерживается браузером", + "Error Code": "Код ошибки", + "Technical details": "Технические подробности", + "The video download was cancelled": "Загрузка видео отменена", + "The video you are trying to watch is encrypted and we do not know how to decrypt it": "Видео, которое вы пытаетесь воспроизвести, зашифровано; метод его расшифровки неизвестен", + "An unanticipated problem was encountered, check back soon and try again": "Возникла неожиданная проблема; повторите попытку через некоторое время" +}); \ No newline at end of file diff --git a/dist/lang/tr.js b/dist/lang/tr.js new file mode 100644 index 0000000..a9e5e2c --- /dev/null +++ b/dist/lang/tr.js @@ -0,0 +1,12 @@ +videojs.addLanguage('tr', { + "No video has been loaded": "Video yüklenmedi", + "Could not download the video": "Video indirilemedi", + "The video connection was lost, please confirm you are connected to the internet": "Bağlantı kesildi. Lütfen internet bağlantınızı kontrol edin", + "The video is bad or in a format that cannot be played on your browser": "Bozuk veya bu tarayıcıda oynatılmayacak bir video formatıdır", + "This video is either unavailable or not supported in this browser": "Video kullanım dışı veya tarayıcı tarafından desteklenmemektedir", + "Error Code": "Hata Kodu", + "Technical details": "Teknik Detaylar", + "The video download was cancelled": "Video'nun indirimi iptal edildi", + "The video you are trying to watch is encrypted and we do not know how to decrypt it": "Şifresi çözülenemeyen bir video izlemeye çalışıyorsunuz", + "An unanticipated problem was encountered, check back soon and try again": "Beklenmedik bir hata oluştu. Lütfen daha sonra deneyin." +}); \ No newline at end of file diff --git a/dist/lang/zh-CN.js b/dist/lang/zh-CN.js new file mode 100644 index 0000000..628fdae --- /dev/null +++ b/dist/lang/zh-CN.js @@ -0,0 +1,12 @@ +videojs.addLanguage('zh-CN', { + "No video has been loaded": "未加载视频", + "Could not download the video": "无法下载视频", + "The video connection was lost, please confirm you are connected to the internet": "视频连接丢失,请确认已连接至互联网", + "The video is bad or in a format that cannot be played on your browser": "视频已损坏,或使用无法在浏览器中播放的格式", + "This video is either unavailable or not supported in this browser": "此视频不可用或不受此浏览器支持", + "Error Code": "错误代码", + "Technical details": "技术细节", + "The video download was cancelled": "视频下载已取消", + "The video you are trying to watch is encrypted and we do not know how to decrypt it": "您尝试观看的视频已加密,而且解密方法未知", + "An unanticipated problem was encountered, check back soon and try again": "发生意外问题,稍后请检查并重试" +}); \ No newline at end of file diff --git a/dist/lang/zh-TW.js b/dist/lang/zh-TW.js new file mode 100644 index 0000000..56fbd63 --- /dev/null +++ b/dist/lang/zh-TW.js @@ -0,0 +1,12 @@ +videojs.addLanguage('zh-TW', { + "No video has been loaded": "未載入任何影片", + "Could not download the video": "無法載入影片", + "The video connection was lost, please confirm you are connected to the internet": "影片連線已中斷,請確認您已連線至網際網路", + "The video is bad or in a format that cannot be played on your browser": "影片錯誤或使用無法在瀏覽器上播放的格式", + "This video is either unavailable or not supported in this browser": "此影片無法使用或在此瀏覽器中不受支援", + "Error Code": "錯誤代碼", + "Technical details": "技術細節", + "The video download was cancelled": "已取消下載影片", + "The video you are trying to watch is encrypted and we do not know how to decrypt it": "您嘗試觀看的影片已加密,而且解密方法未知", + "An unanticipated problem was encountered, check back soon and try again": "發生未預期的問題,請稍後查看並再試一次" +}); \ No newline at end of file diff --git a/dist/videojs-errors.css b/dist/videojs-errors.css new file mode 100644 index 0000000..50f210b --- /dev/null +++ b/dist/videojs-errors.css @@ -0,0 +1,7 @@ +/** + * videojs-errors + * @version 1.1.1 + * @copyright 2016 Brightcove + * @license Apache-2.0 + */ +.vjs-error-display{color:#fff;display:none;font-family:Helvetica, Arial, sans serif;font-size:16px;line-height:1.428}.vjs-error .vjs-error-display{display:block;position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5)}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:14px}.vjs-errors-dialog{text-align:left;border:1px #999 solid;overflow:hidden;position:absolute;top:2%;bottom:2%;left:5%;right:5%;padding-left:1%;padding-right:1%;background:rgba(24,24,24,0.8);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#CC000000, endColorstr=#CC000000)"}.vjs-errors-details{margin-top:15px}.vjs-errors-message{border:1px #999 solid;background-color:#2c2c2c;overflow:auto;margin-top:15px;padding:15px}.vjs-errors-ok-button-container{display:block;position:absolute;bottom:15px;left:15px;right:15px;text-align:center}.vjs-errors-ok-button{display:block;margin:0 auto;width:80px;height:36px;background-color:#000;border:1px #999 solid;border-radius:5px;color:#999;font-size:14px;cursor:pointer}.vjs-errors-ok-button:hover{border:1px #FFF solid;color:#CCC}.vjs-errors-content-container{overflow:auto;position:absolute;padding-bottom:15px;top:0;left:15px;right:15px;bottom:61px}.vjs-errors-headline{font-size:14px;font-weight:bold;padding-right:3em}.vjs-errors-dialog .vjs-control.vjs-close-button{width:3em;height:3em;top:0}.vjs-errors-flashmessage{float:right;font-size:9px;font-style:italic}.vjs-xs.vjs-error-display{font-size:14px;background-color:#000}.vjs-xs.vjs-error-display .vjs-errors-details,.vjs-xs.vjs-error-display .vjs-errors-message{display:none}.vjs-xs .vjs-errors-content-container{top:0}.vjs-xs .vjs-errors-headline{font-size:16px;font-weight:bold}.vjs-xs .vjs-errors-dialog{border:none;top:0;bottom:0;left:0;right:0}.vjs-xs.vjs-errors-flashmessage{display:none}@media (max-width: 600px), (max-height: 250px){.vjs-error-display{font-size:14px;background-color:#000}.vjs-error-display .vjs-errors-details,.vjs-error-display .vjs-errors-message{display:none}.vjs-error-display .vjs-errors-content-container{top:15px}.vjs-error-display .vjs-errors-headline{font-size:16px;font-weight:bold}.vjs-error-display .vjs-errors-dialog{border:none;top:0;bottom:0;left:0;right:0}.vjs-errors-flashmessage{display:none}} diff --git a/dist/videojs-errors.js b/dist/videojs-errors.js new file mode 100644 index 0000000..0bf3c01 --- /dev/null +++ b/dist/videojs-errors.js @@ -0,0 +1,281 @@ +/** + * videojs-errors + * @version 1.1.1 + * @copyright 2016 Brightcove + * @license Apache-2.0 + */ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.videojsErrors = f()}})(function(){var define,module,exports;return (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' + player.localize(error.message) + '\n '; + } + if (error.code === 4 && !FlashObj.isSupported()) { + var flashMessage = player.localize(' * If you are using an older browser' + ' please try upgrading or installing Flash.'); + + details += '' + flashMessage + ''; + } + display = player.getChild('errorDisplay'); + // The code snippet below is to make sure we dispose any child closeButtons before + // making the display closeable + if (display.getChild('closeButton')) { + display.removeChild('closeButton'); + } + // Make the error display closeable, and we should get a close button + display.closeable(true); + content.className = 'vjs-errors-dialog'; + content.id = 'vjs-errors-dialog'; + content.innerHTML = '
\n

' + this.localize(error.headline) + '

\n
' + this.localize('Error Code') + ': ' + (error.type || error.code) + '
\n ' + details + '\n
\n
\n \n
'; + display.fillWith(content); + // Get the close button inside the error display + display.contentEl().firstChild.appendChild(display.getChild('closeButton').el()); + if (player.width() <= 600 || player.height() <= 250) { + display.addClass('vjs-xs'); + } + + var okButton = display.el().querySelector('.vjs-errors-ok-button'); + + _videoJs2['default'].on(okButton, 'click', function () { + display.close(); + }); + }; + + var onDisposeHandler = function onDisposeHandler() { + cleanup(); + + player.removeClass('vjs-errors'); + player.off('play', onPlayStartMonitor); + player.off('play', onPlayNoSource); + player.off('dispose', onDisposeHandler); + player.off('error', onErrorHandler); + }; + + var reInitPlugin = function reInitPlugin(newOptions) { + onDisposeHandler(); + initPlugin(player, _videoJs2['default'].mergeOptions(defaults, newOptions)); + }; + + player.on('play', onPlayStartMonitor); + player.on('play', onPlayNoSource); + player.on('dispose', onDisposeHandler); + player.on('error', onErrorHandler); + + player.ready(function () { + player.addClass('vjs-errors'); + }); + + player.errors = reInitPlugin; +}; + +/** + * Initialize the plugin. Waits until the player is ready to do anything. + */ +var errors = function errors(options) { + initPlugin(this, _videoJs2['default'].mergeOptions(defaults, options)); +}; + +// Register the plugin with video.js. +_videoJs2['default'].plugin('errors', errors); + +exports['default'] = errors; +module.exports = exports['default']; +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"global/document":2,"global/window":3}]},{},[4])(4) +}); \ No newline at end of file diff --git a/dist/videojs-errors.min.js b/dist/videojs-errors.min.js new file mode 100644 index 0000000..bb9452e --- /dev/null +++ b/dist/videojs-errors.min.js @@ -0,0 +1,7 @@ +/** + * videojs-errors + * @version 1.1.1 + * @copyright 2016 Brightcove + * @license Apache-2.0 + */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o;o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,o.videojsErrors=e()}}(function(){return function e(o,n,t){function i(d,l){if(!n[d]){if(!o[d]){var s="function"==typeof require&&require;if(!l&&s)return s(d,!0);if(r)return r(d,!0);var a=new Error("Cannot find module '"+d+"'");throw a.code="MODULE_NOT_FOUND",a}var f=n[d]={exports:{}};o[d][0].call(f.exports,function(e){var n=o[d][1][e];return i(n?n:e)},f,f.exports,e,o,n,t)}return n[d].exports}for(var r="function"==typeof require&&require,d=0;d'+o.localize("Technical details")+'\n :
'+o.localize(i.message)+"
\n "),4===i.code&&!u.isSupported()){var l=o.localize(" * If you are using an older browser please try upgrading or installing Flash.");t+=''+l+""}e=o.getChild("errorDisplay"),e.getChild("closeButton")&&e.removeChild("closeButton"),e.closeable(!0),r.className="vjs-errors-dialog",r.id="vjs-errors-dialog",r.innerHTML='
\n

'+this.localize(i.headline)+"

\n
"+this.localize("Error Code")+": "+(i.type||i.code)+"
\n "+t+'\n
\n
\n \n
",e.fillWith(r),e.contentEl().firstChild.appendChild(e.getChild("closeButton").el()),(o.width()<=600||o.height()<=250)&&e.addClass("vjs-xs");var s=e.el().querySelector(".vjs-errors-ok-button");d.default.on(s,"click",function(){e.close()})}},y=function e(){l(),o.removeClass("vjs-errors"),o.off("play",p),o.off("play",v),o.off("dispose",e),o.off("error",h)},w=function(n){y(),e(o,d.default.mergeOptions(c,n))};o.on("play",p),o.on("play",v),o.on("dispose",y),o.on("error",h),o.ready(function(){o.addClass("vjs-errors")}),o.errors=w},v=function(e){p(this,d.default.mergeOptions(c,e))};d.default.plugin("errors",v),n.default=v,o.exports=n.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"global/document":2,"global/window":3}]},{},[4])(4)}); \ No newline at end of file