From bff5b710b1fea55b8884be92d1d788d6b8a9dcf8 Mon Sep 17 00:00:00 2001 From: DmitriyMX Date: Tue, 12 Dec 2017 13:01:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=BE=20=D0=BE=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B0=D1=8E=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B0=D0=B2=D1=82=D0=BE-=D1=81=D0=BE=D1=85=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=D1=80=D0=B5=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=20=D0=BF=D1=80=D0=BE=D1=81=D0=BC=D0=BE=D1=82?= =?UTF-8?q?=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/kinosearch/webapp/static/js/player.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/resources/kinosearch/webapp/static/js/player.js b/src/main/resources/kinosearch/webapp/static/js/player.js index 92aa3b5..06065ee 100644 --- a/src/main/resources/kinosearch/webapp/static/js/player.js +++ b/src/main/resources/kinosearch/webapp/static/js/player.js @@ -5,6 +5,7 @@ const PlayerCore = function(playerObj, titleObj, videoData) { const _this = this; +/* временно отключаю возможность авто-сохранения времени просмотра // сохранение времени просмотра playerObj.bind('play', function() { _this.timeLast = $.now(); @@ -15,7 +16,7 @@ const PlayerCore = function(playerObj, titleObj, videoData) { let sec = Math.floor((timeCurrent - _this.timeLast)/1000); if (sec >= 5) { let playerCurrentTime = playerObj[0].currentTime; - if (Math.floor(playerCurrentTime) <= 10) + if (Math.floor(playerCurrentTime) <= 10) return; let save_data = { 'time': playerCurrentTime }; Cookies.set(_this.path, save_data, { 'expires': 30 }); @@ -26,7 +27,7 @@ const PlayerCore = function(playerObj, titleObj, videoData) { }); //TODO убрать на продакшене } }); - +*/ this.getType = function() { return videoData.type; }; @@ -130,6 +131,7 @@ function msToTime(ms) { }; } +/* function loadPlayerCookieData(playerCore) { let data = Cookies.getJSON(playerCore.path); @@ -172,12 +174,13 @@ function loadPlayerCookieData(playerCore) { $('#modal').modal('show'); } } +*/ function initPlayer(video_data) { const playerCore = new PlayerCore($('#player'), $('#title'), video_data); // загрузка ранее сохранённых данных - loadPlayerCookieData(playerCore); + //loadPlayerCookieData(playerCore); if (playerCore.getType() == 'one_film') { playerCore.setTitle();