var showPleaseWaitTimeOut = 1000; #lds-62926b4c2cea8avideoLoader-wrapper { position: fixed; left: 0 !important; width: 100% !important; height: 100% !important; z-index: 1000; margin: 0 !important; } #lds-62926b4c2cea8avideoLoader { display: block; position: relative; left: 50%; top: 50%; width: 150px; height: 150px; margin: -175px 0 0 -75px; border-radius: 50%; border: 3px solid transparent; border-top-color: #3498db; -webkit-animation: spin 2s linear infinite; /* Chrome, Opera 15+, Safari 5+ */ animation: spin 2s linear infinite; /* Chrome, Firefox 16+, IE 10+, Opera */ z-index: 1001; -webkit-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; } #lds-62926b4c2cea8avideoLoader:before { content: ""; position: absolute; top: 5px; left: 5px; right: 5px; bottom: 5px; border-radius: 50%; border: 3px solid transparent; border-top-color: #e74c3c; -webkit-animation: spin 3s linear infinite; /* Chrome, Opera 15+, Safari 5+ */ animation: spin 3s linear infinite; /* Chrome, Firefox 16+, IE 10+, Opera */ } #lds-62926b4c2cea8avideoLoader:after { content: ""; position: absolute; top: 15px; left: 15px; right: 15px; bottom: 15px; border-radius: 50%; border: 3px solid transparent; border-top-color: #f9c922; -webkit-animation: spin 1.5s linear infinite; /* Chrome, Opera 15+, Safari 5+ */ animation: spin 1.5s linear infinite; /* Chrome, Firefox 16+, IE 10+, Opera */ } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); /* Chrome, Opera 15+, Safari 3.1+ */ -ms-transform: rotate(0deg); /* IE 9 */ transform: rotate(0deg); /* Firefox 16+, IE 10+, Opera */ } 100% { -webkit-transform: rotate(360deg); /* Chrome, Opera 15+, Safari 3.1+ */ -ms-transform: rotate(360deg); /* IE 9 */ transform: rotate(360deg); /* Firefox 16+, IE 10+, Opera */ } } @keyframes spin { 0% { -webkit-transform: rotate(0deg); /* Chrome, Opera 15+, Safari 3.1+ */ -ms-transform: rotate(0deg); /* IE 9 */ transform: rotate(0deg); /* Firefox 16+, IE 10+, Opera */ } 100% { -webkit-transform: rotate(360deg); /* Chrome, Opera 15+, Safari 3.1+ */ -ms-transform: rotate(360deg); /* IE 9 */ transform: rotate(360deg); /* Firefox 16+, IE 10+, Opera */ } } #lds-62926b4c2cea8avideoLoader-wrapper .lds-62926b4c2cea8avideoLoader-section { position: fixed; top: 0; width: 50%; height: 100%; background: #00000077; z-index: 1000; -webkit-transform: translateX(0); /* Chrome, Opera 15+, Safari 3.1+ */ -ms-transform: translateX(0); /* IE 9 */ transform: translateX(0); /* Firefox 16+, IE 10+, Opera */ } #lds-62926b4c2cea8avideoLoader-wrapper .lds-62926b4c2cea8avideoLoader-section.section-left { left: 0; } #lds-62926b4c2cea8avideoLoader-wrapper .lds-62926b4c2cea8avideoLoader-section.section-right { right: 0; } #lds-62926b4c2cea8avideoLoader-wrapper .lds-62926b4c2cea8avideoLoader-section.section-left { -webkit-transform: translateX(0); /* Chrome, Opera 15+, Safari 3.1+ */ -ms-transform: translateX(0); /* IE 9 */ transform: translateX(0); /* Firefox 16+, IE 10+, Opera */ -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); } #lds-62926b4c2cea8avideoLoader-wrapper .lds-62926b4c2cea8avideoLoader-section.section-right { -webkit-transform: translateX(0); /* Chrome, Opera 15+, Safari 3.1+ */ -ms-transform: translateX(0); /* IE 9 */ transform: translateX(0); /* Firefox 16+, IE 10+, Opera */ -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); } /* Loaded */ .loaded #lds-62926b4c2cea8avideoLoader-wrapper .lds-62926b4c2cea8avideoLoader-section.section-left { -webkit-transform: translateX(-100%); /* Chrome, Opera 15+, Safari 3.1+ */ -ms-transform: translateX(-100%); /* IE 9 */ transform: translateX(-100%); /* Firefox 16+, IE 10+, Opera */ } .loaded #lds-62926b4c2cea8avideoLoader-wrapper .lds-62926b4c2cea8avideoLoader-section.section-right { -webkit-transform: translateX(100%); /* Chrome, Opera 15+, Safari 3.1+ */ -ms-transform: translateX(100%); /* IE 9 */ transform: translateX(100%); /* Firefox 16+, IE 10+, Opera */ } .loaded #lds-62926b4c2cea8avideoLoader { opacity: 0; } .loaded #lds-62926b4c2cea8avideoLoader-wrapper { visibility: hidden; -webkit-transform: translateY(-100%); /* Chrome, Opera 15+, Safari 3.1+ */ -ms-transform: translateY(-100%); /* IE 9 */ transform: translateY(-100%); /* Firefox 16+, IE 10+, Opera */ -webkit-transition: all 0.3s 1s ease-out; transition: all 0.3s 1s ease-out; } var avideoLoader = '
'; var webSiteRootURL = 'https://ffctv.net/'; var my_users_id = 0; var my_identification = "Unknown User"; var player; var _serverTime = "1653762892"; var _serverDBTime = "1653777292"; var _serverTimeString = "2022-05-28 14:34:52"; var _serverDBTimeString = "2022-05-28 18:34:52"; var _serverTimezone = "America/New_York"; var avideoModalIframeFullScreenCloseButton = " $(document).ready(function () { YPTHidenavbar(); });
  • .categoriesTobButtons{ border: none; } .categoriesTobButtons li a{ border-radius:23px; }
    $(function () { /** showAlertMessage **/ /** showAlertMessage END **/ });
    $(document).ready(function () { }); function onlineLabelOnline(selector) { selector = selector.replace(/[&=]/g, ''); console.log("Change video to Online ", selector); //console.trace(); $(selector).removeClass('label-warning'); $(selector).removeClass('label-danger'); $(selector).addClass('label-success'); $(selector).text("ONLINE"); if ($('#indexCol1 div.panel-heading .label-success').length) { isOnlineLabel = true; } } function onlineLabelPleaseWait(selector) { selector = selector.replace(/[&=]/g, ''); //console.log("Change video to please wait"); if (!$('#indexCol1 div.panel-heading .label-success').length) { isOnlineLabel = false; } $(selector).removeClass('label-success'); $(selector).removeClass('label-danger'); $(selector).addClass('label-warning'); $(selector).text("Please Wait ..."); if (!$('#indexCol1 div.panel-heading .label-success').length) { isOnlineLabel = false; } } function onlineLabelOffline(selector) { selector = selector.replace(/[&=]/g, ''); //console.log("Change video to offline"); $(selector).removeClass('label-warning'); $(selector).removeClass('label-success'); $(selector).addClass('label-danger'); $(selector).text("OFFLINE"); if (!$('#indexCol1 div.panel-heading .label-success').length) { isOnlineLabel = false; } } function onlineLabelFinishing(selector) { selector = selector.replace(/[&=]/g, ''); //console.log("Change video to finishing"); $(selector).removeClass('label-warning'); $(selector).removeClass('label-success'); $(selector).addClass('label-danger'); $(selector).text("Finishing Live..."); if (!$('#indexCol1 div.panel-heading .label-success').length) { isOnlineLabel = false; } } var playListsAdding = false; var playList = []; function reloadPlayLists() { //console.log('reloadPlayLists'); $.ajax({ url: webSiteRootURL + 'objects/playlists.json.php', success: function (response) { playList = response; reloadPlayListButtons(); } }); } function reloadPlayListButtons() { //console.log('reloadPlayListButtons'); $('.watchLaterBtnAdded').hide(); $('.favoriteBtnAdded').hide(); $('.watchLaterBtn').show(); $('.favoriteBtn').show(); for (var i in playList) { if (!playList[i].id || (playList[i].status !== 'watch_later' && playList[i].status !== 'favorite')) { continue; } for (var x in playList[i].videos) { if (typeof (playList[i].videos[x]) === 'object') { if (playList[i].status === 'watch_later') { $('.watchLaterBtn' + playList[i].videos[x].videos_id).hide(); $('.watchLaterBtnAdded' + playList[i].videos[x].videos_id).show(); } else if (playList[i].status === 'favorite') { $('.favoriteBtn' + playList[i].videos[x].videos_id).hide(); $('.favoriteBtnAdded' + playList[i].videos[x].videos_id).show(); } } } } } loadPlayListsResponseObject = {timestamp: 0, response: false}; function loadPlayLists(videos_id, crc) { //console.log('loadPlayLists'); if (loadPlayListsResponseObject.timestamp + 5000 < Date.now()) { loadPlayListsResponseObject.timestamp = Date.now(); loadPlayListsResponseObject.response = []; setTimeout(function () { $.ajax({ url: 'https://ffctv.net/objects/playlists.json.php', cache: true, success: function (response) { loadPlayListsResponseObject.response = response; loadPlayListsResponse(loadPlayListsResponseObject.response, videos_id, crc); } }); ; }, 500); } else { if (loadPlayListsResponseObject.response) { loadPlayListsResponse(loadPlayListsResponseObject.response, videos_id, crc); } else { setTimeout(function () { loadPlayLists(videos_id, crc); }, 1500); } } } function loadPlayListsResponse(response, videos_id, crc) { //console.log('loadPlayListsResponse'); //console.log(response, videos_id, crc); $('.searchlist' + videos_id + crc).html(''); for (var i in response) { if (!response[i].id) { continue; } var icon = "fa fa-lock" if (response[i].status == "public") { icon = "fa fa-globe" } else if (response[i].status == "watch_later") { icon = "fas fa-clock" } else if (response[i].status == "favorite") { icon = "fas fa-heart" } var checked = ""; for (var x in response[i].videos) { if (typeof (response[i].videos[x]) === 'object' && response[i].videos[x].videos_id == videos_id) { checked = "checked"; } } var randId = (("_" + response[i].id) + videos_id) + Math.random(); $(".searchlist" + videos_id + crc).append(' ' + response[i].name_translated + '
    '); } $('.searchlist' + videos_id + crc).btsListFilter('#searchinput' + videos_id + crc, {itemChild: 'span'}); $('.playListsVideosIds' + videos_id).change(function () { if (playListsAdding) { return false; } playListsAdding = true; addVideoToPlayList(videos_id, $(this).is(":checked"), $(this).val()); return false; }); } function addVideoToPlayList(videos_id, isChecked, playlists_id) { //console.log('addVideoToPlayList'); modal.showPleaseWait(); $.ajax({ url: 'https://ffctv.net/objects/playListAddVideo.json.php', method: 'POST', data: { 'videos_id': videos_id, 'add': isChecked, 'playlists_id': playlists_id }, success: function (response) { reloadPlayLists(); //console.log(".playListsIds_" + playlists_id + '_videos_id_' + videos_id); $(".playListsIds_" + playlists_id + '_videos_id_' + videos_id).prop("checked", isChecked); modal.hidePleaseWait(); setTimeout(function () { playListsAdding = false }, 500); } }); } $(document).ready(function () { reloadPlayLists(); }); function getBeatJSSelector(key, live_servers_id){ live_servers_id = parseInt(live_servers_id); if(isNaN(live_servers_id)){ live_servers_id = 0; } var selector = '.liveUsersViews_' + key + ', .liveUsersViews_' + key + '_' + live_servers_id + ', .views_on_total_on_live_' + key + '_' + live_servers_id; console.log('getBeatJSSelector', selector); return selector; } function updateViewsLiveUsersBeat(key, live_servers_id, total) { console.log('updateViewsLiveUsersBeat', key, live_servers_id, total); $(getBeatJSSelector(key, live_servers_id)).text(total); } function socketLiveUsersBeat(json) { console.log('socketLiveUsersBeat', json.users); var total = json.total; if (!total && json.views) { total = json.views; }else if (!total && json.users && json.users.views) { total = json.users.views; } var key = json.transmition_key; if (!key && json.users && json.users.key) { key = json.users.key; }else if (!key && json.key) { key = json.key; } var live_servers_id = json.live_servers_id; if (!live_servers_id && json.users && json.users.live_servers_id) { live_servers_id = json.users.live_servers_id; } updateViewsLiveUsersBeat(key, live_servers_id, total); } .isRecordingIcon{ opacity: 0.2; } .isRecording.isRecordingIcon{ opacity: 1; animation: isRecordingGlowing 1s infinite alternate; } @keyframes isRecordingGlowing { from { text-shadow: 0 0 1px #500, 0 0 2px #700, 0 0 3px #760, 0 0 4px #760; } to { color: #F00; text-shadow: 0 0 2px #200, 0 0 4px #900, 0 0 8px #F00, 0 0 12px #F00, 0 0 16px #FFB600; } } function startRecorderCallback(json){ setIsRecording(json.key); } function stopRecorderCallback(json){ setIsNotRecording(json.key); } function setIsRecording(key) { $('.isRecordingIcon'+key).addClass('isRecording'); } function setIsNotRecording(key) { $('.isRecordingIcon'+key).removeClass('isRecording'); } var webSocketSelfURI = 'https://ffctv.net/view/'; var webSocketVideos_id = '0'; var webSocketLiveKey = 'false'; var webSocketServerVersion = '3.0'; var webSocketToken = ''; var webSocketURL = ''; var webSocketTypes = {"NEW_CONNECTION":"NEW_CONNECTION","NEW_DISCONNECTION":"NEW_DISCONNECTION","DEFAULT_MESSAGE":"DEFAULT_MESSAGE","ON_VIDEO_MSG":"ON_VIDEO_MSG","ON_LIVE_MSG":"ON_LIVE_MSG","TESTING":"TESTING"}; function onUserSocketConnect(response) { try { if(typeof changeChat2UserStatus === 'function'){changeChat2UserStatus(response.msg.users_id, 'o');}callerNewConnection(response);socketNewConnection(response); } catch (e) { console.log('onUserSocketConnect:error', e.message); } } function onUserSocketDisconnect(response) { try { if(typeof changeChat2UserStatus === 'function'){changeChat2UserStatus(response.msg.users_id, 'f');}callerDisconnection(response);socketDisconnection(response); } catch (e) { console.log('onUserSocketConnect:error', e.message); } } var liveLinkAppsCalled = {}; function liveLinkApps($liveLi, className, live_starts) { if (new Date(live_starts).getTime() < new Date().getTime()) { return false; } if (typeof liveLinkAppsCalled[className] !== 'undefined') { // do not call it twice //return false; } //console.log('liveLinkApps', $liveLi, className, live_starts, $liveLi.find('.liveNow')); liveLinkAppsCalled[className] = live_starts; $liveLi.find('.liveNow').html("Starts in " + live_starts + ""); $liveLi.find('.liveNow').attr("class", 'label label-primary liveFuture'); //console.log('liveLinkApps', '.'+className+' '+live_starts); startTimerToDate(live_starts, '.Timer_' + className, false); return $liveLi; } #liveSearchResult{ position: fixed; display: none; z-index: 9999; margin-right: 10px; width: 400px; } #liveSearchResult li:last-child { margin-right: 0 !important; } .ui-autocomplete{ z-index: 2000 !important; width: 300px; overflow-y: auto; overflow-x: hidden; max-height: 75%; } .ui-autocomplete .srow{ padding: 5px; margin: 0; } .ui-autocomplete div{ font-size: 11px; } .ui-autocomplete .col{ padding: 2px; margin: 0; } .ui-autocomplete .col .btn{ color: #FFF; } $(document).ready(function () { $("#searchForm").attr("onsubmit", "return false;"); // tu="off" $("#searchForm input[name=search]").click(function () { if ($("#searchForm input[name=search]").val() != "") { $("#liveSearchResult").show(); } else { $("#liveSearchResult").hide(); } }); $("#searchForm input[name=search]").focus(function () { if ($("#searchForm input[name=search]").val() != "") { $("#liveSearchResult").show(); } else { $("#liveSearchResult").hide(); } }); $(document).mouseup(function (e) { var container = $("#liveSearchResult"); if (!container.is(e.target) && container.has(e.target).length === 0) { container.hide(); } }); //$("#searchForm").append("
      "); $("#searchForm input[name=search]").on("input", function () { if ($("#searchForm input[name=search]").val() == "") { $("#liveSearchResult").hide(); } }); }); var linksToFullscreenAutocompleteTimeout; var livesearchAutocompleteSelected = false; var livesearchAutocompleteCliked = false; $(function () { $("#searchForm input[name=search]").autocomplete({ minLength: 0, source: function (req, res) { $.ajax({ url: webSiteRootURL + 'plugin/Livesearch/myVideos.json.php', type: "GET", data: { search: req.term }, success: function (data) { console.log("autocomplete data received"); res(data.rows); if (typeof linksToFullscreen == 'function') { clearTimeout(linksToFullscreenAutocompleteTimeout); linksToFullscreenAutocompleteTimeout = setTimeout(function () { console.log('autocomplete linksToFullscreen .ui-autocomplete a'); }, 50); } } }); }, focus: function (event, ui) { //$("#searchForm input[name=search]").val(ui.item.title); return false; }, select: function (event, ui) { console.log("autocomplete select"); if (livesearchAutocompleteCliked) { console.log("autocomplete select already clicked"); return true; } livesearchAutocompleteSelected = true; clearTimeout(linksToFullscreenAutocompleteTimeout); linksToFullscreenAutocompleteTimeout = setTimeout(function () { console.log("autocomplete trigger click"); livesearchAutocompleteCliked = true; if (!$('#livesearch_autocomplete_' + ui.item.id).hasClass('linksToFullscreen')) { document.location = $('#livesearch_autocomplete_' + ui.item.id).attr('href'); } else { $('#livesearch_autocomplete_' + ui.item.id).trigger('click'); } setTimeout(function () { livesearchAutocompleteCliked = false; }, 1000); }, 50); return false; }, search: function (event, ui) { //$("#liveSearchResult").empty(); console.log("autocomplete search"); } }).autocomplete("instance")._renderItem = function (ul, item) { var sr = $("#searchRow").clone(); sr.css("display", "block"); var html = sr.html(); html = html.replace(new RegExp("{id}", 'g'), item.id); html = html.replace(new RegExp("{href}", 'g'), item.href); html = html.replace(new RegExp("{embed}", 'g'), item.hrefembed); html = html.replace(new RegExp("{filename}", 'g'), item.filename); html = html.replace(new RegExp("{imgURL}", 'g'), ''); html = html.replace(new RegExp("{clean_category}", 'g'), item.clean_category); html = html.replace(new RegExp("{category}", 'g'), item.category); html = html.replace(new RegExp("{title}", 'g'), item.title); html = html.replace(new RegExp("{description}", 'g'), item.description); //$("#liveSearchResult").show(); var append = $("
    • ").append(html).appendTo(ul); return append; }; $("#searchForm input[name=search]").keydown(function (event) { if (event.keyCode == 13) { if (livesearchAutocompleteSelected) { console.log("autocomplete keydown already selected"); livesearchAutocompleteSelected = false; return false; } if ($("#searchForm input[name=search]").val().length == 0) { event.preventDefault(); return false; } else { clearTimeout(linksToFullscreenAutocompleteTimeout); linksToFullscreenAutocompleteTimeout = setTimeout(function () { console.log("autocomplete trigger keydown"); $("#searchForm").submit(); }, 50); } } }); }); /*selected=en_US*/function getLangSelectformatStateResult (state) { if (!state.id) { return state.text; } if(state.text!==' -- '){ json = JSON.parse(state.text); var $state = $( ''+ ' - ' + json.text + '' ); return $state; } return state.text; };function getLangFlagsOnlySelectformatStateResult (state) { if (!state.id) { return state.text; } if(state.text!==' -- '){ json = JSON.parse(state.text); var $state = $( '' ); return $state; } return state.text; }; $(document).ready(function() {$('#navBarFlag').select2({templateSelection: getLangFlagsOnlySelectformatStateResult, templateResult: getLangFlagsOnlySelectformatStateResult,width: '100%'});});
    • var checkFooterTimout; $(function () { checkFooter(); $(window).scroll(function () { clearTimeout(checkFooterTimout); checkFooterTimout = setTimeout(function () { checkFooter(); }, 100); }); $(window).resize(function () { clearTimeout(checkFooterTimout); checkFooterTimout = setTimeout(function () { checkFooter(); }, 100); }); $(window).mouseup(function () { clearTimeout(checkFooterTimout); checkFooterTimout = setTimeout(function () { checkFooter(); }, 100); }); }); function checkFooter() { $("#mainFooter").fadeIn(); if (getPageHeight() <= $(window).height()) { clearTimeout(checkFooterTimout); checkFooterTimout = setTimeout(function () { checkFooter(); }, 1000); $("#mainFooter").css("position", "fixed"); } else { $("#mainFooter").css("position", "relative"); } } function getPageHeight() { var mainNavBarH = 0; if ($('#mainNavBar').length) { mainNavBarH = $('#mainNavBar').height(); } var mainFooterH = 0; if ($('#mainFooter').length) { mainFooterH = $('#mainFooter').height(); } var containerH = getLargerContainerHeight(); return mainNavBarH + mainFooterH + containerH; } function getLargerContainerHeight() { var conteiners = $('body > .container,body > .container-fluid'); var height = 0; for (var item in conteiners) { if (isNaN(item)) { continue; } var h = $(conteiners[item]).height(); if (h > height) { height = h; } } return height; } function showTrailer(iframe) { avideoModalIframe(iframe); } $('#TrailerModal').on('hidden.bs.modal', function () { $('#TrailerModal iframe').attr('src', ''); }); $('#bigVideoCarousel').bind('slide.bs.carousel', function (e) { setTimeout(function(){ lazyImage(); },500); });