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();