diff --git a/.gitignore b/.gitignore
index b9d71a77..bb5b6bab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,8 +50,8 @@ import_data/
pod_project/media/
*pods/fixtures/
## Lang files
-locale/
-*.mo
+#locale/
+#*.mo
## Others
jwplayer/
pod_project/static/
diff --git a/pod_project/core/migrations/0004_remove_south_data.py b/pod_project/core/migrations/0004_remove_south_data.py
index d0d08a65..28ce17d6 100644
--- a/pod_project/core/migrations/0004_remove_south_data.py
+++ b/pod_project/core/migrations/0004_remove_south_data.py
@@ -11,5 +11,5 @@ class Migration(migrations.Migration):
]
operations = [
- migrations.RunSQL("DROP TABLE IF EXISTS `south_migrationhistory`;")
+ migrations.RunSQL("DROP TABLE IF EXISTS south_migrationhistory;")
]
diff --git a/pod_project/core/models.py b/pod_project/core/models.py
index ea0181cb..62071cf6 100755
--- a/pod_project/core/models.py
+++ b/pod_project/core/models.py
@@ -166,6 +166,7 @@ class Video(models.Model):
_('Video'), upload_to=get_storage_path, max_length=255)
allow_downloading = models.BooleanField(
_('allow downloading'), default=False)
+ is_360 = models.BooleanField(_('video 360'), default=False)
title = models.CharField(_('Title'), max_length=250)
slug = models.SlugField(_('Slug'), unique=True, max_length=255,
help_text=_(
@@ -205,6 +206,8 @@ class Video(models.Model):
duration = models.IntegerField(
_('Duration'), default=0, editable=False, blank=True)
infoVideo = models.TextField(null=True, blank=True, editable=False)
+
+
class Meta:
ordering = ['-date_added', '-id']
diff --git a/pod_project/core/static/js/player.js b/pod_project/core/static/js/player.js
index 002c0460..8e24785e 100755
--- a/pod_project/core/static/js/player.js
+++ b/pod_project/core/static/js/player.js
@@ -39,6 +39,7 @@ var videozindex = 1000;
var isPlaying = false;
var increase_view_count = false;
var start;
+var is_360 = false;
/* check bandwidth */
var previoustime = 0;
var previousuploaded = 0;
@@ -53,6 +54,12 @@ $(document).ready(function() {
});
/******* FUNCTION ********/
+function isMobile() {
+ var check = false;
+ (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
+ return check;
+}
+
function loadVideo() {
//reinitialize somes var :
currentslide = '';
@@ -62,6 +69,30 @@ function loadVideo() {
videojs('player_video').ready(function() {
// PLAYER READY
myPlayer = this;
+
+ //if video 360
+ if(is_360) {
+ window.addEventListener("resize", function () {
+ var canvas = myPlayer.getChild('Canvas');
+ if(canvas) canvas.handleResize();
+ });
+
+ var videoElement = document.getElementById("player_video");
+ var width = videoElement.offsetWidth;
+ var height = videoElement.offsetHeight;
+ myPlayer.width(width), myPlayer.height(height);
+ myPlayer.panorama({
+ clickToToggle: (!isMobile()),
+ clickAndDrag: true,
+ autoMobileOrientation: true,
+ initFov: 100,
+ NoticeMessage: (isMobile())? "please move your phone" : "please use your mouse drag and drop the video",
+ callback: function () {
+ //if(!isMobile()) myPlayer.play();
+ }
+ });
+ }
+ //end if video 360
myPlayer.on('loadstart', loadstart);
myPlayer.on('loadedmetadata', loadedmetadata);
@@ -206,7 +237,7 @@ function loadVideo() {
myPlayer.info({});
}
/*************************************************************************/
- if (IS_MOBILE) {
+ if (isMobile()) {
if (is_iframe === false && ($('ul#slides li[data-type!="None"]').length > 0 || $('ul#chapters li').length > 0)) {
$('#player').after('');
if ($('ul#slides li[data-type!="None"]').length > 0) {
@@ -659,4 +690,4 @@ function error(err) {
// this works only in some browsers
// line and stack are not supported by all vendors
console.log(err.line, err.stack);
-}
\ No newline at end of file
+}
diff --git a/pod_project/core/static/video-js/font/vjs.woff b/pod_project/core/static/video-js/font/vjs.woff
index de982064..a79d0fa0 100644
Binary files a/pod_project/core/static/video-js/font/vjs.woff and b/pod_project/core/static/video-js/font/vjs.woff differ
diff --git a/pod_project/core/static/video-js/lang/ar.js b/pod_project/core/static/video-js/lang/ar.js
new file mode 100644
index 00000000..4c38b0d5
--- /dev/null
+++ b/pod_project/core/static/video-js/lang/ar.js
@@ -0,0 +1,26 @@
+videojs.addLanguage("ar",{
+ "Play": "تشغيل",
+ "Pause": "ايقاف",
+ "Current Time": "الوقت الحالي",
+ "Duration Time": "Dauer",
+ "Remaining Time": "الوقت المتبقي",
+ "Stream Type": "نوع التيار",
+ "LIVE": "مباشر",
+ "Loaded": "تم التحميل",
+ "Progress": "التقدم",
+ "Fullscreen": "ملء الشاشة",
+ "Non-Fullscreen": "غير ملء الشاشة",
+ "Mute": "صامت",
+ "Unmuted": "غير الصامت",
+ "Playback Rate": "معدل التشغيل",
+ "Subtitles": "الترجمة",
+ "subtitles off": "ايقاف الترجمة",
+ "Captions": "التعليقات",
+ "captions off": "ايقاف التعليقات",
+ "Chapters": "فصول",
+ "You aborted the video playback": "لقد ألغيت تشغيل الفيديو",
+ "A network error caused the video download to fail part-way.": "تسبب خطأ في الشبكة بفشل تحميل الفيديو بالكامل.",
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "لا يمكن تحميل الفيديو بسبب فشل في الخادم أو الشبكة ، أو فشل بسبب عدم امكانية قراءة تنسيق الفيديو.",
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "تم ايقاف تشغيل الفيديو بسبب مشكلة فساد أو لأن الفيديو المستخدم يستخدم ميزات غير مدعومة من متصفحك.",
+ "No compatible source was found for this video.": "فشل العثور على أي مصدر متوافق مع هذا الفيديو."
+});
\ No newline at end of file
diff --git a/pod_project/core/static/video-js/lang/bg.js b/pod_project/core/static/video-js/lang/bg.js
new file mode 100644
index 00000000..610b3936
--- /dev/null
+++ b/pod_project/core/static/video-js/lang/bg.js
@@ -0,0 +1,26 @@
+videojs.addLanguage("bg",{
+ "Play": "Възпроизвеждане",
+ "Pause": "Пауза",
+ "Current Time": "Текущо време",
+ "Duration Time": "Продължителност",
+ "Remaining Time": "Оставащо време",
+ "Stream Type": "Тип на потока",
+ "LIVE": "НА ЖИВО",
+ "Loaded": "Заредено",
+ "Progress": "Прогрес",
+ "Fullscreen": "Цял екран",
+ "Non-Fullscreen": "Спиране на цял екран",
+ "Mute": "Без звук",
+ "Unmuted": "Със звук",
+ "Playback Rate": "Скорост на възпроизвеждане",
+ "Subtitles": "Субтитри",
+ "subtitles off": "Спряни субтитри",
+ "Captions": "Аудио надписи",
+ "captions off": "Спряни аудио надписи",
+ "Chapters": "Глави",
+ "You aborted the video playback": "Спряхте възпроизвеждането на видеото",
+ "A network error caused the video download to fail part-way.": "Грешка в мрежата провали изтеглянето на видеото.",
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "Видеото не може да бъде заредено заради проблем със сървъра или мрежата или защото този формат не е поддържан.",
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Възпроизвеждането на видеото беше прекъснато заради проблем с файла или защото видеото използва опции които браузърът Ви не поддържа.",
+ "No compatible source was found for this video.": "Не беше намерен съвместим източник за това видео."
+});
\ No newline at end of file
diff --git a/pod_project/core/static/video-js/lang/ca.js b/pod_project/core/static/video-js/lang/ca.js
new file mode 100644
index 00000000..6ebc3791
--- /dev/null
+++ b/pod_project/core/static/video-js/lang/ca.js
@@ -0,0 +1,26 @@
+videojs.addLanguage("ca",{
+ "Play": "Reproducció",
+ "Pause": "Pausa",
+ "Current Time": "Temps reproduït",
+ "Duration Time": "Durada total",
+ "Remaining Time": "Temps restant",
+ "Stream Type": "Tipus de seqüència",
+ "LIVE": "EN DIRECTE",
+ "Loaded": "Carregat",
+ "Progress": "Progrés",
+ "Fullscreen": "Pantalla completa",
+ "Non-Fullscreen": "Pantalla no completa",
+ "Mute": "Silencia",
+ "Unmuted": "Amb so",
+ "Playback Rate": "Velocitat de reproducció",
+ "Subtitles": "Subtítols",
+ "subtitles off": "Subtítols desactivats",
+ "Captions": "Llegendes",
+ "captions off": "Llegendes desactivades",
+ "Chapters": "Capítols",
+ "You aborted the video playback": "Heu interromput la reproducció del vídeo.",
+ "A network error caused the video download to fail part-way.": "Un error de la xarxa ha interromput la baixada del vídeo.",
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "No s'ha pogut carregar el vídeo perquè el servidor o la xarxa han fallat, o bé perquè el seu format no és compatible.",
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La reproducció de vídeo s'ha interrumput per un problema de corrupció de dades o bé perquè el vídeo demanava funcions que el vostre navegador no ofereix.",
+ "No compatible source was found for this video.": "No s'ha trobat cap font compatible amb el vídeo."
+});
\ No newline at end of file
diff --git a/pod_project/core/static/video-js/lang/cs.js b/pod_project/core/static/video-js/lang/cs.js
new file mode 100644
index 00000000..c2c8377b
--- /dev/null
+++ b/pod_project/core/static/video-js/lang/cs.js
@@ -0,0 +1,26 @@
+videojs.addLanguage("cs",{
+ "Play": "Přehrát",
+ "Pause": "Pauza",
+ "Current Time": "Aktuální čas",
+ "Duration Time": "Doba trvání",
+ "Remaining Time": "Zbývající čas",
+ "Stream Type": "Stream Type",
+ "LIVE": "ŽIVĚ",
+ "Loaded": "Načteno",
+ "Progress": "Stav",
+ "Fullscreen": "Celá obrazovka",
+ "Non-Fullscreen": "Zmenšená obrazovka",
+ "Mute": "Ztlumit zvuk",
+ "Unmuted": "Přehrát zvuk",
+ "Playback Rate": "Rychlost přehrávání",
+ "Subtitles": "Titulky",
+ "subtitles off": "Titulky vypnuty",
+ "Captions": "Popisky",
+ "captions off": "Popisky vypnuty",
+ "Chapters": "Kapitoly",
+ "You aborted the video playback": "Přehrávání videa je přerušeno.",
+ "A network error caused the video download to fail part-way.": "Video nemohlo být načteno, kvůli chybě v síti.",
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "Video nemohlo být načteno, buď kvůli chybě serveru nebo sítě nebo proto, že daný formát není podporován.",
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Váš prohlížeč nepodporuje formát videa.",
+ "No compatible source was found for this video.": "Špatně zadaný zdroj videa."
+});
\ No newline at end of file
diff --git a/pod_project/core/static/video-js/lang/hu.js b/pod_project/core/static/video-js/lang/hu.js
new file mode 100644
index 00000000..cf685ee0
--- /dev/null
+++ b/pod_project/core/static/video-js/lang/hu.js
@@ -0,0 +1,26 @@
+videojs.addLanguage("hu",{
+ "Play": "Lejátszás",
+ "Pause": "Szünet",
+ "Current Time": "Aktuális időpont",
+ "Duration Time": "Hossz",
+ "Remaining Time": "Hátralévő idő",
+ "Stream Type": "Adatfolyam típusa",
+ "LIVE": "ÉLŐ",
+ "Loaded": "Betöltve",
+ "Progress": "Állapot",
+ "Fullscreen": "Teljes képernyő",
+ "Non-Fullscreen": "Normál méret",
+ "Mute": "Némítás",
+ "Unmuted": "Némítás kikapcsolva",
+ "Playback Rate": "Lejátszási sebesség",
+ "Subtitles": "Feliratok",
+ "subtitles off": "Feliratok kikapcsolva",
+ "Captions": "Magyarázó szöveg",
+ "captions off": "Magyarázó szöveg kikapcsolva",
+ "Chapters": "Fejezetek",
+ "You aborted the video playback": "Leállította a lejátszást",
+ "A network error caused the video download to fail part-way.": "Hálózati hiba miatt a videó részlegesen töltődött le.",
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "A videó nem tölthető be hálózati vagy kiszolgálói hiba miatt, vagy a formátuma nem támogatott.",
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "A lejátszás adatsérülés miatt leállt, vagy a videó egyes tulajdonságait a böngészője nem támogatja.",
+ "No compatible source was found for this video.": "Nincs kompatibilis forrás ehhez a videóhoz."
+});
\ No newline at end of file
diff --git a/pod_project/core/static/video-js/lang/tr.js b/pod_project/core/static/video-js/lang/tr.js
new file mode 100644
index 00000000..d370fc18
--- /dev/null
+++ b/pod_project/core/static/video-js/lang/tr.js
@@ -0,0 +1,26 @@
+videojs.addLanguage("tr",{
+ "Play": "Oynat",
+ "Pause": "Duraklat",
+ "Current Time": "Süre",
+ "Duration Time": "Toplam Süre",
+ "Remaining Time": "Kalan Süre",
+ "Stream Type": "Yayın Tipi",
+ "LIVE": "CANLI",
+ "Loaded": "Yüklendi",
+ "Progress": "Yükleniyor",
+ "Fullscreen": "Tam Ekran",
+ "Non-Fullscreen": "Küçük Ekran",
+ "Mute": "Ses Kapa",
+ "Unmuted": "Ses Aç",
+ "Playback Rate": "Oynatma Hızı",
+ "Subtitles": "Altyazı",
+ "subtitles off": "Altyazı Kapat",
+ "Captions": "Ek Açıklamalar",
+ "captions off": "Ek Açıklamalar Kapalı",
+ "Chapters": "Bölümler",
+ "You aborted the video playback": "Video oynatmayı iptal ettiniz",
+ "A network error caused the video download to fail part-way.": "Video indirilirken bağlantı sorunu oluştu.",
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "Video oynatılamadı, Ağ yada sunucu hattası veya belirtilen format desteklenmiyor.",
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Tarayıcınız desteklemediği için videoda hata oluştu.",
+ "No compatible source was found for this video.": "Video için kaynak bulunamadı."
+});
\ No newline at end of file
diff --git a/pod_project/core/static/video-js/lang/vi.js b/pod_project/core/static/video-js/lang/vi.js
new file mode 100644
index 00000000..6e126d71
--- /dev/null
+++ b/pod_project/core/static/video-js/lang/vi.js
@@ -0,0 +1,26 @@
+videojs.addLanguage("vi",{
+ "Play": "Phát",
+ "Pause": "Tạm dừng",
+ "Current Time": "Thời gian hiện tại",
+ "Duration Time": "Độ dài",
+ "Remaining Time": "Thời gian còn lại",
+ "Stream Type": "Kiểu Stream",
+ "LIVE": "TRỰC TIẾP",
+ "Loaded": "Đã tải",
+ "Progress": "Tiến trình",
+ "Fullscreen": "Toàn màn hình",
+ "Non-Fullscreen": "Thoát toàn màn hình",
+ "Mute": "Tắt tiếng",
+ "Unmuted": "Bật âm thanh",
+ "Playback Rate": "Tốc độ phát",
+ "Subtitles": "Phụ đề",
+ "subtitles off": "Tắt phụ đề",
+ "Captions": "Chú thích",
+ "captions off": "Tắt chú thích",
+ "Chapters": "Chương",
+ "You aborted the video playback": "Bạn đã hủy việc phát video.",
+ "A network error caused the video download to fail part-way.": "Một lỗi mạng dẫn đến việc tải video bị lỗi.",
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "Video không tải được, mạng hay server có lỗi hoặc định dạng không được hỗ trợ.",
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Phát video đã bị hủy do một sai lỗi hoặc video sử dụng những tính năng trình duyệt không hỗ trợ.",
+ "No compatible source was found for this video.": "Không có nguồn tương thích cho video này."
+});
\ No newline at end of file
diff --git a/pod_project/core/static/video-js/lang/zh.js b/pod_project/core/static/video-js/lang/zh-CN.js
similarity index 97%
rename from pod_project/core/static/video-js/lang/zh.js
rename to pod_project/core/static/video-js/lang/zh-CN.js
index 604cf9ed..fc8b72ce 100644
--- a/pod_project/core/static/video-js/lang/zh.js
+++ b/pod_project/core/static/video-js/lang/zh-CN.js
@@ -1,4 +1,4 @@
-videojs.addLanguage("zh",{
+videojs.addLanguage("zh-CN",{
"Play": "播放",
"Pause": "暂停",
"Current Time": "当前时间",
diff --git a/pod_project/core/static/video-js/lang/zh-TW.js b/pod_project/core/static/video-js/lang/zh-TW.js
new file mode 100644
index 00000000..6e3736dc
--- /dev/null
+++ b/pod_project/core/static/video-js/lang/zh-TW.js
@@ -0,0 +1,27 @@
+videojs.addLanguage("zh-TW",{
+ "Play": "播放",
+ "Pause": "暫停",
+ "Current Time": "目前時間",
+ "Duration Time": "總共時間",
+ "Remaining Time": "剩餘時間",
+ "Stream Type": "串流類型",
+ "LIVE": "直播",
+ "Loaded": "載入完畢",
+ "Progress": "進度",
+ "Fullscreen": "全螢幕",
+ "Non-Fullscreen": "退出全螢幕",
+ "Mute": "靜音",
+ "Unmuted": "取消靜音",
+ "Playback Rate": " 播放速率",
+ "Subtitles": "字幕",
+ "subtitles off": "關閉字幕",
+ "Captions": "內嵌字幕",
+ "captions off": "關閉內嵌字幕",
+ "Chapters": "章節",
+ "You aborted the video playback": "影片播放已終止",
+ "A network error caused the video download to fail part-way.": "網路錯誤導致影片下載失敗。",
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "影片因格式不支援或者伺服器或網路的問題無法載入。",
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能,播放終止。",
+ "No compatible source was found for this video.": "無法找到相容此影片的來源。",
+ "The video is encrypted and we do not have the keys to decrypt it.": "影片已加密,無法解密。"
+});
\ No newline at end of file
diff --git a/pod_project/core/static/video-js/video-js.css b/pod_project/core/static/video-js/video-js.css
index b87afe78..472a21b5 100644
--- a/pod_project/core/static/video-js/video-js.css
+++ b/pod_project/core/static/video-js/video-js.css
@@ -1,12 +1,12 @@
/*!
Video.js Default Styles (http://videojs.com)
-Version 4.10.2
+Version 4.12.15
Create your own skin at http://designer.videojs.com
*/
/* SKIN
================================================================================
The main class name for all skin-specific styles. To make your own skin,
-replace all occurances of 'vjs-default-skin' with a new name. Then add your new
+replace all occurrences of 'vjs-default-skin' with a new name. Then add your new
skin name to your video tag instead of the default skin.
e.g.