function loadSilentVideo(n){$.get("/Api/News/GetSilentVideoFeed",{newsId:n}).done(function(t){if(t.HasError){alert(t.Message&&t.Message.length>0?t.Message:"Bir hata oldu ve işlem tamamlanamadı.");console.log(t);return}$("[data-silent-video-news-id="+n+"]").html(t.Data);setTimeout(function(){getActivePlayer().play()},100)}).fail(function(n){alert("Bir hata oldu ve işlem tamamlanamadı.");console.log(n)})}function setVideoWatch(n){remainingWatch>0&&(remainingWatch--,remainingWatch===0&&(googleActionEvent("Haber Detay","Sessiz Video Modülü","Oynat"),$.post("/Api/Videos/UpdateStats/"+n).done(function(n){n.HasError&&console.log(n)}).fail(function(n){console.log(n)})))}function pauseAllPlayers(){$(".instagram-feed-carousel .owl-item").each(function(n,t){var i=getPlayerFromOwlItem(t);i&&i.pause()})}function getPlayerFromOwlItem(n){var i=$(n).find("div.item")[0],r=$(i).attr("data-silent-video-news-id"),u=document.getElementById("instagram-feed-"+r),t;if(u)return t=$(n).find("video").attr("id"),document.getElementById(t)}function getActivePlayer(){var n=$(".instagram-feed-carousel .owl-item.active");return getPlayerFromOwlItem(n)}instagramFeedCarousel&&$(".instagram-feed-carousel.owl-loaded").remove();var instagramFeedCarousel=$('div[class^="instagram-feed-carousel"]:not(.owl-loaded)'),feedCommentManager=new FeedCommentManager;instagramFeedCarousel.owlCarousel({loop:!1,nav:!0,responsive:{0:{items:1}}});instagramFeedCarousel.on("changed.owl.carousel",function(n){var i;showEventTriggered=!1;remainingWatch=10;var r=n.item.index,t=$(".instagram-feed-carousel [data-index="+r+"]")[0],u=t.firstElementChild,f=t.getAttribute("data-silent-video-news-id");pauseAllPlayers();$(u).hasClass("silent-video-feed-loading")?loadSilentVideo(f):(i=t.parentElement,silentVideoPlayLog[getPlayerFromOwlItem(i).id]=0,getPlayerFromOwlItem(i).play());googleActionEvent("Haber Detay","Sessiz Video Modülü","Navigasyon")});$(window).scroll(function(){var n=$(".instagram-feed-carousel .owl-item.active"),t=getActivePlayer();$(window).scrollTop()+$(window).innerHeight()>=n.offset().top&&$(window).scrollTop()<=n.offset().top+n.outerHeight()?t.play():t.pause()})