").removeClass("vimeo").addClass("yt"); $(".nav",context).addClass("yt"); player = new YT.Player($(".video div",context)[0],{ videoId : id, playerVars: { 'autoplay': autoplay ? 1 : 0, 'controls': 0, "showinfo" : 0, 'rel' : 0, 'fs' : 0, "modestbranding" : 1, "playsinline" : 1, "allowfullscreen" : 1 }, events : { "onStateChange" : ytStateChange, "onReady" : ()=>{ if(isMuted) player.mute(); onLoaded(); playerTimer = setInterval(ytTimeUpdate,100); } } }); player.playerType="yt"; youTubePlayers.push(player); bindControls(); showPlayer(); }, ytTimeUpdate=()=>{ var currentTime = !player.getCurrentTime ? 0.0 : player.getCurrentTime(), duration = !player.getDuration ? 0.0 : player.getDuration(), percent = currentTime / duration; updatePosition(percent); if(player.getPlayerState()==2) $(".nav .play",context).removeClass("playing"); else $(".nav .play",context).addClass("playing"); $(".nav .loaded",context).width((player.getVideoLoadedFraction() * 100) + "%"); updateTime(duration - currentTime); }, ytStateChange=(e)=>{ if(e.data==0) playNext(); }, createVimeoPlayer=(data)=>{ dataArray=data.split(","); $(".video",context).html("
").removeClass("yt").addClass("vimeo"); $(".nav",context).removeClass("yt"); player = new Vimeo.Player($(".video div",context)[0], { id : dataArray[0], autoplay : autoplay, controls : false, transparent : false, playsinline : true }); player.playerType="vimeo"; player.on("timeupdate", vimeoTimeUpdate); player.on("ended", vimeoEnded); player.on("progress", vimeoProgress); player.on("loaded", onLoaded); player.on("play", hideLoading); playerTimer = setInterval(vimeoStatusUpdate,100); player.thumbs=dataArray[1]; if(isMuted){ player.setVolume(0); } else{ player.setVolume(vimeoVolumeLevel); } renderVimeoTextTracks(); initThumbs(); bindControls(); showPlayer(); }, setSubtitleLanguage=()=>{ let currentLang = getCookie("language"); $(".nav .subtitle li", context).removeClass("active"); if(getCookie("language")!=="en"){ player.enableTextTrack(getCookie("language")); $(".nav .subtitle li[data-language=" + currentLang + "]",context).addClass("active"); }else{ player.disableTextTrack(); $(".nav .subtitle li[data-language='']",context).addClass("active"); } }, renderVimeoTextTracks=()=>{ $(".nav",context).removeClass("subtitle"); $(".nav .subtitle ul",context).html(""); player.getTextTracks().then(data=>{ if(data.length>0){ $(".nav",context).addClass("subtitle"); //create 'None' language in text tracks list // data.push({ data.unshift({ label: "NO SUBTITLES", language: "", mode : data.filter(e=>{return e.mode=="showing"}).length==0 ? "showing" : "none" }); data.forEach(e=>{ $(".nav .subtitle ul",context).append(`
  • ${e.label}
  • `); }); $(".nav .subtitle li",context).click(subtitleLanguageClickHandler); //Remove English Auto generated text if($('li[data-language="en-x-autogen"]').length !== 0){ var autoGen = $('li[data-language="en-x-autogen"]')[0].innerHTML.split(" ")[0]; $('li[data-language="en-x-autogen"]').html(autoGen); } $(".nav .subtitle",context).css("display", "block"); }else{ $(".nav .subtitle",context).css("display", "none"); } setSubtitleLanguage(); }); }, subtitleClickHandler=e=>{ $(".nav .subtitle ul",context).toggle(); }, subtitleLanguageClickHandler=e=>{ if(e.currentTarget.dataset.language.length>0) player.enableTextTrack(e.currentTarget.dataset.language); else player.disableTextTrack(); $(".nav .subtitle li", context).removeClass("active"); $(".nav .subtitle ul",context).toggle(); subtitleClickHandler(); $(e.currentTarget).addClass("active"); }, vimeoTimeUpdate=(e)=>{ updatePosition(e.percent); updateTime(e.duration - e.seconds); }, vimeoStatusUpdate=()=>{ player.getPaused().then(paused=>{ if(paused){ $(context).removeClass("playing"); } else{ hideLoading(); $(context).addClass("playing"); $(context).addClass("show"); } }); }, vimeoEnded=()=>{ if(assets==undefined) vimeoRestart(); else playNext(); }, vimeoProgress=e=>{ $(".nav .loaded",context).width((e.percent * 100) + "%"); }, vimeoRestart=()=>{ player.setCurrentTime(0); resetControls(); showBigPlay(); }, updateLabels=(asset)=>{ $(".name",context).html(asset.Name?.toUpperCase()); $(".description",context).html(asset?.Content); $(".sub",context).html(asset?.Var2); $(window).resize(); }, updatePosition=(percent)=>{ $(".seek .position",context).width((percent * 100) + "%"); }, updateTime=seconds=>{ if(seconds { return { minutes : Math.floor(seconds / 60), seconds : seconds % 60 }; }, getTimeText=seconds=>{ var time=getTime(seconds); return time.minutes + ":" + Math.floor(time.seconds).toString().padStart(2,"0"); }, bigPlayTimer = 0, playPauseMorph=()=>{ var tl = new TimelineMax(); var playR = $(".playR",context), playL = $(".playL",context), pauseR = $(".pauseR",context), pauseL = $(".pauseL",context); showBigPlay(); hideClickPlay(); tl .to(playL, 0.5, {morphSVG:{shape: pauseL,shapeIndex:4},delay:0.5}) .to(playR, 0.5, {morphSVG:{shape:pauseR,shapeIndex:4},delay:0.5},0); $(".play.bigPlay .arrow",context).show(); $(".play.bigPlay .pause",context).hide(); setTimeout(()=>{ hideBigPlay(); bigPlayTimer=1500; }, bigPlayTimer); }, pausePlayMorph=()=>{ var tl = new TimelineMax(); var playR = $(".playR",context), playL = $(".playL",context), pauseR = $(".pauseR",context), pauseL = $(".pauseL",context); playLRef= $(".playLRef",context); playRRef= $(".playRRef",context); showBigPlay(); tl .to(playL, 0.5, {morphSVG:{shape: playLRef,shapeIndex:4}, delay:0.5}) .to(playR, 0.5, {morphSVG:{shape:playRRef,shapeIndex:4},delay:0.5},0); $(".play.bigPlay .arrow",context).hide(); $(".play.bigPlay .pause",context).show(); setTimeout(()=>{ hideBigPlay(); }, 1500); }, resetMorph=()=>{ var tl = new TimelineMax(); var playR = $(".playR"), playL = $(".playL"), pauseR = $(".pauseR"), pauseL = $(".pauseL"); playLRef= $(".playLRef"); playRRef= $(".playRRef"); tl .to(playL, 0.5, {morphSVG:{shape: playLRef,shapeIndex:4}, delay:0.5}) .to(playR, 0.5, {morphSVG:{shape:playRRef,shapeIndex:4},delay:0.5},0); }, playPause=()=>{ $(".nav .subtitle ul",context).css("display", "none"); if(!autoplay){ stopAllVideos(); } if(player.playerType=="vimeo"){ player.getPaused().then(paused=>{ if(paused){ player.play(); // hideBigPlay(); playPauseMorph(); $(".frame .poster",context).hide(); // clearPoster(); } else{ player.pause(); // showBigPlay(); pausePlayMorph(); } }); } else{ if(player.getPlayerState() == 1){ player.pauseVideo(); $(context).removeClass("playing"); // showBigPlay(); pausePlayMorph(); } else{ $(context).addClass("show"); $(context).addClass("playing"); $(".frame .poster",context).hide(); player.playVideo(); // hideBigPlay(); playPauseMorph() } } }, stopAllVideos=()=>{ // Find all Vimeo iframes var vimeoFrames = document.querySelectorAll(".video.vimeo"); // Loop through each YouTube iframe and create a player instance if(youTubePlayers.length>=1){ youTubePlayers.forEach(function(p) { p.pauseVideo(); }) } if (vimeoFrames.length>=1){ // Loop through each Vimeo iframe and create a player instance vimeoFrames.forEach(function(frame) { var player = new Vimeo.Player(frame); player.getPaused().then(paused=>{ if(!paused){ // Stop Vimeo playback player.pause(); } }) }); } resetMorph(); }, addVolumeControl=()=>{ $( ".slider-vertical",context).slider({ orientation: "vertical", range: "min", min: 0, max: 100, value: 60, slide: function(e, ui) { // volumeLevel = ui.value/100; volumeLevel = ui.value; // player.setVolume(volumeLevel/100); vimeoVolumeLevel = volumeLevel/100; if(player.playerType=="vimeo"){ player.setVolume(vimeoVolumeLevel); if(vimeoVolumeLevel == 0){ setMuted(); }else{ volumeUnmute(); } }else{ player.setVolume(volumeLevel); if(volumeLevel == 0){ setMuted(); }else{ volumeUnmute(); } } } }); }, volumeUnmute=()=>{ if(player.playerType=="vimeo"){ player.getVolume().then(vol=>{ player.setVolume(vimeoVolumeLevel); $(".nav .mute",context).removeClass("muted"); }); } else{ player.unMute(); $(".nav .mute",context).removeClass("muted"); $(".player .nav.yt .ui-slider-vertical .ui-slider-range-min",context).height(volumeLevel + "%"); player.setVolume(volumeLevel); } }, volume=()=>{ $( ".volume" ,context).addClass("volumeSlider"); $(".nav .volumeControls" ,context).on("mouseout", function(){ hideVolume(); }) }, hideVolume=()=>{ $( ".volume" ,context ).removeClass("volumeSlider"); }, isMuted = false, setMuted=()=>{ $(".nav .mute",context).addClass("muted"); $(".slider-vertical" ,context).slider({value: 0}); isMuted = true }, clearMuted=()=>{ $(".nav .mute",context).removeClass("muted"); // $(".slider-vertical" ,context ).slider({value: volumeLevel*100}); $(".slider-vertical" ,context ).slider({value: volumeLevel}); isMuted = false; }, mute=()=>{ if(player.playerType=="vimeo"){ player.getVolume().then(vol=>{ if(vol != 0){ player.setVolume(0); setMuted(); } else{ if(volumeLevel == 0){ vimeoVolumeLevel = 0.5; volumeLevel = 50; }; player.setVolume(vimeoVolumeLevel); clearMuted(); } }); } else{ if(player.isMuted()){ if(volumeLevel == 0){ vimeoVolumeLevel = 0.5; volumeLevel = 50; }; player.unMute(); clearMuted(); } else{ player.mute(); setMuted(); } } }, fullscreen=()=>{ target = $("iframe",context)[0]; switch(true){ case target.requestFullScreen != undefined: target.requestFullScreen(); break; case target.webkitRequestFullscreen != undefined: target.webkitRequestFullscreen(); break; case target.mozRequestFullScreen != undefined: target.mozRequestFullScreen(); break; case target.webkitRequestFullscreen != undefined: target.webkitRequestFullscreen(); break; case player.requestFullscreen != undefined: player.requestFullscreen(); break; } hideBigPlay(); }, seek=(e)=>{ updateThumbs(e); if(e.buttons==0 && e.which == 0) return; rect = e.currentTarget.getBoundingClientRect(); percent = (e.clientX - rect.left) / rect.width; if(player.playerType=="vimeo"){ player.getDuration().then(duration=>{ var seconds = Math.floor(duration * percent); player.setCurrentTime(seconds); updateTime(seconds); updatePosition(percent); }); } else{ var seconds = player.getDuration() * percent; player.seekTo(seconds); updateTime(seconds); } }, thumbsVideo, initThumbs=()=>{ if(player.thumbs==undefined) return; thumbsVideo=$(".thumbs video",context)[0]; thumbsVideo.src="/asset/" + player.thumbs; }, updateThumbs=e=>{ if(player.thumbs==undefined) return; var seconds=thumbsVideo.duration * (e.originalEvent.offsetX / e.currentTarget.clientWidth); thumbsVideo.currentTime = seconds; if(seconds{ $(".thumbs",context).show(); }, navMouseleave=()=>{ $(".thumbs",context).hide(); }, assertControls=()=>{ if(assets==undefined){ $(context).addClass("single"); } }, bindControls=()=>{ unbindControls(); assertControls(); $(".nav .play",context).click(playPause); $(".nav .volumeControls .mute",context).click(mute); addVolumeControl(); $(".nav .volumeControls",context).on( "mouseover", (e)=> { volume(); e.preventDefault(); }); $(".nav .fullscreen",context).click(fullscreen); $(".close",context).click(closePlayer); $(".seek",context).click(seek).on("mousemove",seek).on("touchmove",seek); $(".next",context).click(playNext); $(".prev",context).click(playPrevious); $(".frame .play",context).click(bigPlayClickHandler); $(".nav .subtitle",context).click(subtitleClickHandler); // $(".frame .play").click(playPause); if(player.thumbs!=undefined){ $(".seek",context).on("mouseenter", navMouseEnter); $(".seek",context).on("mouseleave", navMouseleave); } }, unbindControls=()=>{ $(".nav .play, .nav .mute, .nav .fullscreen, .close, .seek, .next, .prev, .frame > .play, .nav .subtitle",context).off("click").off("mouseenter").off("mousemove").off("mouseleave").off("touchmove"); }, closePlayer=()=>{ if(player.playerType=="vimeo"){ player.pause(); } else{ player.pauseVideo(); } clearInterval(playerTimer); hidePlayer(); hideBigPlay(); clearTimeout(playerTimer); player.destroy(); isActive=false; }, getNextAsset=()=>{ if(assets==undefined) return player.asset; var index=assets.indexOf(player.asset); if(index==(assets.length-1)) return assets[0]; return assets[index+1]; }, getPreviousAsset=()=>{ if(assets==undefined) return player.asset; var index=assets.indexOf(player.asset); if(index==0) return assets[assets.length-1]; return assets[index-1]; }, playNext=()=>{ clearInterval(playerTimer); createPlayer(getNextAsset()) hideBigPlay(); }, playPrevious=()=>{ clearInterval(playerTimer); createPlayer(getPreviousAsset()); hideBigPlay(); }, resetControls=()=>{ $(context).removeClass("show"); $(".seek .position, .nav .loaded",context).width(0); $(context).removeClass("playing"); $(".nav .time",context).text("-0:00"); $(".nav .mute",context).removeClass("muted"); $(".frame .loading",context).show(); }, onLoaded=()=>{ hideLoading(); //play if available if(autoplay){ if(player.playerType=="vimeo"){ var playPromise = player.play(); if (playPromise !== undefined) { playPromise.then((e) => { // Auto-play started playPauseMorph(); if(e?.result && isActive){ playPause(); } }).catch((error) => { // Auto-play was prevented // Show a UI element to let the user manually start playback // showBigPlay(); showClickPlay(); // setPoster(asset.Guid); // pausePlayMorph(); }); } } else{ canAutoplay.video().then(e=>{ if(e.result && isActive){ $(context).addClass("show"); $(context).addClass("playing"); $(".frame .poster",context).hide(); player.playVideo(); hideBigPlay(); playPauseMorph(); $(".frame .loading",context).hide(); } }); } } else { showBigPlay(); } }, hideLoading=()=>{ $(".frame .loading",context).hide(); }, hideLoadingDelay=()=>{ setTimeout(hideLoading,1000); }, showClickPlay=()=>{ $(".frame > .play",context).addClass("autoPlay"); hideLoading(); }, hideClickPlay=()=>{ $(".frame > .play",context).removeClass("autoPlay"); }, showBigPlay=()=>{ $(".frame > .play",context).addClass("bigPlay"); hideLoading(); }, hideBigPlay=()=>{ $(".frame > .play",context).removeClass("bigPlay"); }, bigPlayClickHandler=()=>{ // playPause(); $(".nav .subtitle ul",context).css("display", "none"); if(!autoplay){ stopAllVideos(); } if(player.playerType=="vimeo"){ player.getPaused().then(paused=>{ if(paused){ player.play(); // hideBigPlay(); playPauseMorph(); $(".frame .poster",context).hide(); // clearPoster(); } else{ player.pause(); // showBigPlay(); pausePlayMorph(); } }); } else{ if(player.getPlayerState() == 1){ player.pauseVideo(); $(context).removeClass("playing"); // showBigPlay(); pausePlayMorph(); } else{ $(context).addClass("show"); $(context).addClass("playing"); $(".frame .poster",context).hide(); player.playVideo(); // hideBigPlay(); playPauseMorph(); } } }, showPlayer=()=>{ if($(context).css("display")!="block"){ gsap.set(context, {opacity:0, duration: 0.7, display:"block"}); gsap.to(context, { opacity:1 }); } //$(".player").css({opacity:0}).show().animate({opacity:1},500); }, hidePlayer=()=>{ gsap.to(context, {opacity:0, duration: 0.7, onComplete: ()=>{ gsap.set(context, {display: "none"}); }}); //$(".player").animate({opacity:0},500,); }, setPoster=guid=>{ $(".frame .poster",context).css("background-image","url(/asset/" + guid + ")").show(); } clearPoster=()=>{ $(".frame .poster",context).hide(); } ; createPlayer(asset,target); }, // autoplay with url ?play parameter initAutoplay=()=>{ play=$.getQueryParameters().play; if(play!=undefined){ getName=n=>{ if(n==null || n==undefined) return ""; return n.replace(/:/g,"").replace(/'/g,"").replace(/\(/g,"").replace(/\)/g,"").replace(/-/g," ").replace(/\./g," ").replace(/,/g,"").replace(/!/g,"").replace(/&/g,"and").replace(/á/g,"a").replace(/à/g,"a").trim(); } play=play.replace(/-/g," "); //autoplay=false; asset = assets.find(a=>getName(a.Name).toLowerCase()==play.toLowerCase()); if(asset!=undefined) createPlayer(asset); //$($(".gallery .tile").toArray().find(e=>$(e).data().asset.Name.toLowerCase()==play)).click(); } }, // iframe events initEvents=()=>{ window.document.addEventListener("player_play", e=>{ //received play event from child document in iframe e.preventDefault(); //signal to embedded player that this player will play the video. createPlayer(e.detail); }); }, dispatchEvent = asset=>{ try{ return window.parent.document.dispatchEvent(new CustomEvent("player_play", { cancelable : true, detail : asset })); } catch(e){ return true; } }, //ga events logEvent=(asset)=>{ gtag("event","Trailer", { event_label : asset.Name }); }, // inline player createInlineElement=e=>{ if(Array.isArray(e)){ e.forEach(e=>{ initInlineVideoElement(e); }); } else{ initInlineVideoElement(e); } }, initInlineVideoElement=e=>{ //create asset var asset={ Guid: e.parentElement.dataset.assetid, Var1: e.dataset.var1, }; createPlayer(asset,e); } ; init(); return { createPlayer : (asset)=>{createPlayer(asset);}, createInlineElement : e=>{createInlineElement(e);}, setAssets: (data)=>{assets = data;}, initAutoplay: ()=>{initAutoplay();}, getPlayers: ()=>{return players;}, //initEvents : ()=>{initEvents();} }; })();

    FOCUS.

    Work without worry

    CODEX products allow the world's most successful makers to focus on what matters - the work. Free to pursue their vision safe in the knowledge that not a moment will be lost, in more ways than one.

    SHARE.

    Making the work better, together

    Our recording media and storage solutions are just the first stage of a seamless workflow system. One that has been designed to act in service of the needs of everyone. Enabling the creatives to pursue the artistic vision while supporting the teams who are responsible for ensuring that vision is shared with the world.

    Keeping the workflow flowing and leaving more time to create the moments that matter.

    SAVE.

    Making, not waiting

    Epic moments can create equally epic file sizes. CODEX High Density Encoding (HDE) will up-to halve the size of RAW files with zero effect on quality. Meaning, on average, you save 40% of your time and budget.Files are faster to ingest, easier to share and cost less to store. The technicians get to bed earlier and the budget controller sleeps more soundly too.Nothing lost, everything gained.

    AWARDS.

    Engineering Emmy Award
    ©ATAS/NATAS
    2019
    Engineering Emmy Award
    ©ATAS/NATAS
    2020
    Scientific and Technical Achievement Award
    ©AMPAS 
    2024

    EVERY
    MOMENT
    MATTERS.

    Fast and reliable recording media, storage and workflow solutions from CODEX. Protecting your work, your time, and your budget.

    CONTACT CODEX

    FOCUS.

    Work without worry

    CODEX products allow the world's most successful makers to focus on what matters - the work. Free to pursue their vision safe in the knowledge that not a moment will be lost, in more ways than one.

    CAPTURE.

    Never lose a second

    From a spontaneous moment between actors to a scene that's been months in the planning, you can't shoot it twice. So you'd better make sure you've captured every single second. CODEX recording media is built to withstand the rigours of commercial filmmaking.

    Preserving your work, your sanity and your reputation.

    SHARE.

    Making the work better, together

    Our recording media and storage solutions are just the first stage of a seamless workflow system. One that has been designed to act in service of the needs of everyone. Enabling the creatives to pursue the artistic vision while supporting the teams who are responsible for ensuring that vision is shared with the world.

    Keeping the workflow flowing and leaving more time to create the moments that matter.

    SAVE.

    Making, not waiting

    Epic moments can create equally epic file sizes. CODEX High Density Encoding (HDE) will up-to halve the size of RAW files with zero effect on quality. Meaning, on average, you save 40% of your time and budget.Files are faster to ingest, easier to share and cost less to store. The technicians get to bed earlier and the budget controller sleeps more soundly too.Nothing lost, everything gained.

    TRUSTED BY.

    Leading cinema camera manufacturers, major studios, product & services Partners.

    CAPTURED ON CODEX.

    LET’S TALK.

    Schedule a meeting with our Sales team to find out more how CODEX can help you work and collaborate better. Let's make good work, great.

    Sometimes things can go wrong, humans will be humans after all. But should you ever worry all is lost, you'll find our international support teams on hand to restore both your files and your sanity, wherever you are on the planet.

    Need Support? Please click here

    CONTACT CODEX

    THANK YOU.

    Your message has been received by PIX.
    We will contact you shortly.

    ^ BACK TO TOP ^
    "); }); }, loadLazyImages=()=>{ $("img[lazy], iframe[lazy]").each((i,e)=>{ e.setAttribute("src",e.getAttribute("srcx")); }); $("div.img").each((i,e)=>{ $("div > div", e).css({"background-image" : "url(/asset/" + e.dataset.guid}); }); }, initImages=()=>{ $(".bg-img").each((i,e)=>{ $(e).css({"background-position" : $(e).data().var3}); }); }, scrollDeadzone = 80, lastScrollTop = 0, initMenu=()=>{ menuTrigger = ScrollTrigger.create({ //scroller: ".outer .left", onRefresh: self =>{ //console.log(self); //self.vars.sectionPositions = getSectionSnapPositions(); }, onUpdate: self => { //activeSectionIndex=self.vars.sectionPositions.findIndex(e => e> self.progress)-1; //console.log(activeSectionIndex); //$activeSection = $($(".left section")[activeSectionIndex]); //$menu = $(".desktop .menu"); /* ["logo-light", "logo-hidden", "menu-light", "menu-hidden"].forEach(e=>{ if($activeSection.hasClass(e)) $menu.addClass(e); else $menu.removeClass(e); }); */ }, //sectionPositions : getSectionSnapPositions() }); //menu auto hide lastScrollTop = $(window).scrollTop(); $(window).scroll(menuScrollHandler); //$(".outer .left").scroll(menuScrollHandler); //attach handlers $("#content2 .menu .burger").click(menuClickHandler); $("#content2 .menu .links li").click(menuItemClickHandler); //move language into menu $(".menu .language-frame").append($("#language")); $(".menu .products").click(()=>{ $(".menu .products ul").slideToggle(); if($(".menu .login .panel").is(":visible")){ $(".menu .login .panel").slideToggle(); } }) $(".menu .login").click(()=>{ $(".menu .login .panel").slideToggle(); if($(".menu .products ul").is(":visible")){ $(".menu .products ul").slideToggle(); } }) }, menuScrollHandler=e => { scrollTop = $(e.currentTarget).scrollTop(); if(scrollTop > lastScrollTop + scrollDeadzone){ hideMenu(); lastScrollTop = scrollTop; return; } if(!isScrolling && (scrollTop { gsap.to("#content2 .menu .strip",{ y : "-100%"}); $("#content2 .menu .strip").addClass("hide"); }, showMenu = () =>{ gsap.to("#content2 .menu .strip",{ y : "0%"}); $("#content2 .menu .strip").removeClass("hide"); } menuClickHandler=e=>{ $(".menu .burger").toggleClass("active"); $(".pix-menu ul.top").toggleClass("active"); $(".codex-menu ul.top").toggleClass("active"); $(".menu .overlay").slideToggle(); }, tl = gsap.timeline({paused:true}), menuItemClickHandler=e=>{ if(e.target.attributes.href.value.length>1) return; //allow default action for external link e.preventDefault(); gotoSection(isMobile() ? e.currentTarget.dataset.mobileSection : e.currentTarget.dataset.section); /* if(isMobile()){ gsap.to(window, { scrollTo : getMobileSectionPositions()[e.currentTarget.dataset.mobileSection] }); } else{ gsap.to(window, { scrollTo : getSectionPositions()[e.currentTarget.dataset.section] }); } */ $(".menu-overlay").toggleClass("active"); menuTransition(); $("#content2 .menu .burger").removeClass("active"); $(".pix-menu ul.top").removeClass("active"); $(".codex-menu ul.top").removeClass("active"); $("#content2 .menu .overlay").slideUp(); }, initPowered=()=>{ let guid = $(".guid").text(), // grab dynamic GUID // var guid="d7e2378c-3007-4a30-83fc-f64a8753cb87", data, pageSize = 100, pages = 1, startRows = 4, getData=()=>{ //$.get("/getassetgroupjson?guid=18c3a3bc-d811-4fbd-9642-64152c8cd2aa").done(d=>{ $.get("/getassetgroupjson?guid=" + guid).done(d=>{ data=d; player.setAssets(data); setTimeout(()=>{player.initAutoplay();},1500); renderList(startRows); }); }, renderList=(maxRows)=>{ $container = $(".powered-list"); $container.html(""); $container.append(getColumnsHtml(maxRows)); attachHandlers(); $(".powered").show(); ScrollTrigger.refresh(); }, getColumnsHtml=(maxRows)=>{ html = ""; for(c=2;c"; html+=getListHtml(c,maxRows); html+=""; } if(maxRows!=null){ html += "
    "; } return html; }, getListHtml=(columns,maxRows)=>{ var domains=["content1.x2x.media","content2.x2x.media","content3.x2x.media","content4.x2x.media","content5.x2x.media"]; var html = ""; for(col=0; col"; for(i=col; i" + "
    " + "
    " + "
    " + "
    " + "
    " +"
    " + ""; } html += "" } return html; }, attachHandlers=()=>{ $(".tile", $container).click(tileClickHandler); $(".next", $container).click(showNext); }, tileClickHandler=(e)=>{ id=$(e.currentTarget,$container).data().id; player.createPlayer(data[id]); }, showNext=()=>{ renderList(); ScrollTrigger.refresh(); } ; getData(); }, initTrusted=()=>{ let guid = $('.trusted-guid').text(), // grab dynamic trusted tiles guid // var guid="2a713c17-11a5-4c78-b5e0-0fbf0d1e23b9", data, getData=()=>{ $.get("/getassetgroupjson?guid=" + guid).done(d=>{ data=d; setTimeout(()=>{player.initAutoplay();},1500); renderList(); }); }, renderList=()=>{ $container = $(".trusted .tiles"); $container.append(getTiles()); }, getTiles=(columns)=>{ var domains=["content1.x2x.media","content2.x2x.media","content3.x2x.media","content4.x2x.media","content5.x2x.media"]; var html = ""; data.forEach((a,i)=>{ html += "
    " + "
    " + "
    " + "
    " + "
    " + "
    "; }); return html; } ; getData(); }, adjustText=()=>{ if(!$("body").hasClass("languagear")){ $("h4, h2").each((i,e)=>{ split = new SplitText(e, {type: "words,chars"}); split.chars.forEach(e=>{ $(e).attr("data-char",e.innerText); }); /* split.chars.filter((e,i,a)=>{ return i{ $(e).css({"margin-right":"-0.03em"}); }); */ }); } }, initContact=()=>{ $(".contact form").submit(showCaptcha); }, showCaptcha=e=>{ //recaptcha v2 var form = e.currentTarget, time=(new Date).getTime(), $dialog=$("
    ").dialog({ width: 350, height : 150, autoResize : false, resizable : false, classes : {"ui-dialog" : "dialog"} }); grecaptcha.render("captchaDialog" + time, { sitekey : "6Lfyt-USAAAAAJa2gIGu1WCWS4KRR8CMpkoChpcD", theme : "dark", callback : token=>{ postForm(token, form); $dialog.dialog("close"); grecaptcha.reset(); } }); e.preventDefault(); return false; }, postForm=(token, form)=>{ $("input[name=g-recaptcha-response]",form).val(token); //$(form).submit(); $.post(window.location.href, $(form).serialize()).done(data=>{ if(data=="ok"){ $(".contact .send").hide(); $(".contact .response-ok").show(); } }); }, validateForm=e=>{ //recaptcha v3 form = e.currentTarget.parentElement; //get recaptcha token, add it to form and submit(post) grecaptcha.execute($("input[name=sitekey]").val(), {action: 'submit'}).then(token=>{postForm(token,form);}); }, initMobilePin=()=>{ gsap.utils.toArray(".mobile section.pin").forEach((panel, i, a) => { var adjustedIndex = i + 1; // Adjust the index by adding 1 ScrollTrigger.create({ trigger: panel, start: "top top", pin: i !== 18, // Skip pinning for section 17 pinSpacing: false, pinType: "fixed", onEnter: self => { // Update menu when entering a section updateMenu(self.vars.pins[self.vars.index]); // Use the current section's pin }, onLeaveBack: self => { // Update menu when leaving a section if (self.vars.index === 16) { // If leaving section 17, update menu to previous section updateMenu(self.vars.pins[self.vars.index - 2]); } else { // Otherwise, update menu to the previous section updateMenu(self.vars.pins[self.vars.index - 1]); } }, index: adjustedIndex - 1, // Set adjusted index pins: a }); // gsap.utils.toArray(".mobile section.pin").forEach((panel, i, a) => { // ScrollTrigger.create({ // trigger: panel, // start: "top top", // pin: i != 17, // pinSpacing: false, // pinType: "fixed", // onEnter :self=>{ // updateMenu(self.vars.pins[self.vars.index]); // }, // onLeaveBack: self=>{ // updateMenu(self.vars.pins[self.vars.index-1]); // }, // index: i, // pins: a // }); //pins.push(s); /* //mobile panel fadein timeline gsap.timeline({ scrollTrigger : { trigger: panel, scrub : true, start: "top bottom", end : "top top", //markers: true, onUpdate: self =>{ console.log(self.progress); }, onEnter: self => { console.log("enter"); console.log(self); }, onEnterBack: self => { console.log("enterBack"); console.log(self); } } }).fromTo(panel, {opacity:0.2, filter:"blur(8px)"}, {opacity: 1, filter: "blur(0px)"}) ; */ /* ScrollTrigger.create({ trigger: panel, scroller: ".outer .left", start: "top top", markers: true, onUpdate: self =>{ console.log(self.progress); }, onEnter: self => { console.log("enter"); console.log(self); }, onEnterBack: self => { console.log("enterBack"); console.log(self); } }); */ }); ScrollTrigger.create({ trigger: ".mobile .powered .pin", start: "top top", end: ()=>{ return "+=" + ($(".mobile .powered").height() - $(".mobile .powered h4")[0].getBoundingClientRect().height); }, pin: true, pinSpacing: false, pinType: "fixed", onEnter :self=>{ updateMenu(self.vars.trigger); }, onLeaveBack: self=>{ //updateMenu($(".mobile .whats-new .pin")[0]); } }); }, updateMenu=e=>{ if(!isMobile()) return; $e=$(e); if($e.hasClass("menu-light")){ $(".mobile .menu").addClass("menu-light logo-light"); } else{ $(".mobile .menu").removeClass("menu-light logo-light"); } if($e.hasClass("logo-hidden")){ $(".mobile .menu").addClass("logo-hidden"); } else{ $(".mobile .menu").removeClass("logo-hidden"); } $(".desktop .menu .logo, .desktop .menu .burger").css("filter",""); }, isMobile=()=>{ return window.matchMedia("(max-width:63.938em)").matches; }, getMobileSectionPositions=()=>{ //gets top pixel positions for mobile sections var height = 0; return [0].concat($(".mobile section").toArray().map(e => { return height += e.clientHeight; })); }, initFooter=()=>{ $(".outer .left").scroll(e=>{ scroller = $(".outer .left")[0]; if((scroller.scrollTop + window.innerHeight) >= scroller.scrollHeight){ footer.show(); } else { footer.hide(); } }) }, initBackToTop=()=>{ $(".totop").click(scrollToTop); }, scrollToTop=()=>{ gsap.to(".outer .left", {scrollTo : 0}); gsap.to(window, {scrollTo : 0}); }, images, cImages=[], getImages=()=>{ let guid = $(".rImage-guid").text(); // grab dynamic random images GUID $.getJSON("/getassetgroupjson?guid=" + guid).done(data=>{ // $.getJSON("/getassetgroupjson?guid=929cd92d-51b5-406a-9120-697475290587").done(data=>{ images = data; updateImages(images, ".random-image"); }); let contactGuid = $(".rContactImage-guid").text(); $.getJSON("/getassetgroupjson?guid=" + contactGuid).done(data=>{ images = data; updateImages(images, ".random-contact-image"); }); }, updateImages=(imageData, className)=>{ //group images and randomise var rImages = groupBy(randomise(imageData),e=>e.Name).map(e=> randomise(e.value)[0]); updateImage=(e,i)=>{ $e = $(e); $e.css("background-image","url(/asset/" + rImages[i].Guid + "-2000--75"); if(rImages[i].HotspotX != -1) $e.css("background-position", rImages[i].HotspotX + "% " + rImages[i].HotspotY + "%"); }; $(`.desktop ${className}` ).toArray().forEach(updateImage); $(`.mobile ${className}`).toArray().forEach(updateImage); }, updateQuotes=()=>{ //get quotes and randomize var quotes = randomise($("#quotes tr").toArray().map(row=>{return {quote: row.children[0].innerHTML, source: row.children[1].innerHTML};})), updateQuote=(e,i)=>{ $("div",e).html(quotes[i].quote); $("label",e).html(quotes[i].source); }; $(".desktop q").toArray().forEach(updateQuote); $(".mobile q").toArray().forEach(updateQuote); }, initAutoscroll=()=>{ //autoscroll to powered section if hash exists var autoScrollCount = 0; var doScroll=section=>{ var autoScrollTimer = setInterval(()=>{ gotoSection(section); if(autoScrollCount++ > 4) clearTimeout(autoScrollTimer); },800); }; switch(window.location.hash){ case "#powered": setTimeout(()=>{ gotoSection(isMobile() ? 16: 10); },2000); break; case "#teradek": setTimeout(()=>{ gotoSection(isMobile() ? 12: 7); },2000); break; case "#captured-on-codex": setTimeout(()=>{ gotoSection(isMobile() ? 17: 11); },2000); break; case "#contact": setTimeout(()=>{ gotoSection(isMobile() ? 18: 12); },2000); break; case "#casestudies": setTimeout(()=>{ gotoSection(isMobile() ? 11: 6); },2000); } }, groupBy=(list, keyGetter)=>{ const map = new Map(); list.forEach((item) => { const key = keyGetter(item); const collection = map.get(key); if (!collection) { map.set(key, [item]); } else { collection.push(item); } }); return [...map].map((e) => { return {key : e[0], value : e[1]};}); }, randomise=a=>{ return a.sort(()=> Math.random() > 0.5 ? 1 : -1); }, initHScroll=()=>{ $(".hscroll").each((i,context)=>{ var position=0, count=$(".hpanel", context).length, images = $(".hscroll-img",$(context.dataset.imageSource)).toArray(), showImage=()=>{ images.forEach((img,i)=>{ if(i>position){ img.style.opacity=0; } else{ img.style.opacity=1; } }); }, animateFrame=()=>{ gsap.to($(".frame", context)[0], {left : -(position*100) + "%"}); showImage(); setProgress(); }, initProgress=()=>{ $(".progress", context).html(("
    ").repeat(count)); }, setProgress=()=>{ if(position % 2){ $(".progress", context).removeClass("dark"); }else{ $(".progress", context).addClass("dark"); }; $(".progress > div", context).removeClass("active"); $(".progress > div", context)[position].classList.add("active"); if(position ==0){ $(context).addClass("first"); } else { $(context).removeClass("first"); } if(position==count-1){ $(context).addClass("last"); } else { $(context).removeClass("last"); } }, leftClickHandler=e=>{ e.preventDefault(); if(position>0){ position--; animateFrame(); } }, rightClickHandler=e=>{ e.preventDefault(); if(position{ position=$(e.target).index(); animateFrame(); }, initBindings=()=>{ $(".left", context).click(leftClickHandler); $(".right", context).click(rightClickHandler); $(".progress > div", context).click(progressClickHandler); var touching=false, startX, moveX, frameWidth; $(".frame", context).on("touchstart mousedown", e=>{ touching=true; width=$(context).width(); startX=e.originalEvent.type=="touchstart" ? e.originalEvent.touches[0].clientX : e.originalEvent.clientX; moveX=0; }); $(".frame", context).on("touchmove mousemove", e=>{ if(e.originalEvent.type=="mousemove" && e.originalEvent.buttons==0) return; moveX = startX - (e.originalEvent.type=="touchmove" ? e.originalEvent.touches[0].clientX : e.originalEvent.clientX); gsap.set($(".frame", context)[0], {left : -(position*100) - (moveX/width*100) + "%"}); }); $(".frame", context).on("touchend mouseup", e=>{ touching=false; switch(true){ case position100: position++; break; case position>0 && moveX{ var mapCaseStudyData=(data)=>data.map(e=> { return { guid : e.customFields.find(c=>c.Name=="ogImage").Value, title1 : e.customFields.find(c=>c.Name=="List Title").Value, title2 : e.customFields.find(c=>c.Name=="Sub Title").Value, path : e.path }; }), getTestimonialData=()=>{ return $("#testimonialsSource table tr").toArray().map(e=>{ return { title1 : e.children[0].innerHTML, title2 : e.children[1].innerHTML, guid : e.children[2].children[0].dataset.assetid } }) }; $.get("/getcasestudies").done(function(data){ slider.createSlider(caseStudySlider, mapCaseStudyData(data.nodes.sort((a,b)=>{return b.date-a.date;}).slice(0,4)), "5.5"); slider.createSlider(caseStudySlider2, mapCaseStudyData(data.nodes.sort((a,b)=>{return b.date-a.date;}).slice(0,4)), "5.5"); }); slider.createSlider(testimonialsSlider, getTestimonialData(), "8"); slider.createSlider(testimonialsSlider2, getTestimonialData(), "8"); }, initRedirects=()=>{ if(window.location.hash=="#product"){ $("#content2").hide(); window.location="https://pix.online/product"; } }, hideBlankElements=()=>{ $(".blank-hidden").toArray().filter(e=>e.innerText=='').forEach(e=>{e.style.display="none";}); }, menuAnimation=()=>{ document.addEventListener("DOMContentLoaded", (event) => { let menu = document.querySelector(".burger"); // let top = document.querySelector("#top-line"); // let middle = document.querySelector("#middle-line"); // let bottom = document.querySelector("#bottom-line"); tl.to($('#top-line'), { backgroundColor:"#ffffff",rotation:45,width:"47%",x:8, y:10 ,duration: 1, ease: "elastic.inOut(1.1,0.5)"},0) .to($('#middle-line'), { backgroundColor:"#ffffff",rotation:-45,x:-3, y:-1, duration: 1, ease: "elastic.inOut(1.2,0.5)",},0) .to($('#bottom-line'), { backgroundColor:"#ffffff",rotation:45,width:"41%",x:3, y:-16,duration: 1, ease: "elastic.inOut(1.1,0.5)",},0) $(".burger").on( "click", (e)=> { $(".menu-overlay").toggleClass("active"); e.preventDefault(); menuTransition(); }) }); }, menuTransition=()=>{ if($(".menu-overlay").hasClass("active")){ // if(tl.progress() === 1){ tl.play() }else { tl.reverse(); } } ; init(); return { //getImages : ()=>{return images;}, //updateImages : ()=>{updateImages();}, //getSectionPositions : ()=>{return getSectionPositions();} //getScrollSnap : ()=>{return scrollSnap;}, //getTimelines : ()=>{return panelTimelines;}, //getPins : ()=>{return pins;}, gotoSection : (index)=>{gotoSection(index);}, showCaptcha : ()=>{showCaptcha();} }; })();
    JOIN THE CODEX COMMUNITY
    Latest news and events directly into your inbox.
    I agree to the CODEX Privacy Policy
    Registration Successful.

    Please check your inbox.
    Your Email is Confirmed.

    Thank you for registering

    It appears you are already registered.

    Please enter you password to update your marketing preferences.

    Forgot Password
    Incorect Password

    Please enter you password to update your marketing preferences.
    Password reset sent.

    Please check your inbox
    Please agree to our privacy policy.
    FORGOT PASSWORD
    3
    JOIN THE PIX COMMUNITY
    Latest news and events directly into your inbox.
    I agree to the PIX Privacy Policy
    Registration Successful.

    Please check your inbox.
    Your Email is Confirmed.

    Thank you for registering

    It appears you are already registered.

    Please enter you password to update your marketing preferences.

    Forgot Password
    Incorect Password

    Please enter you password to update your marketing preferences.
    Password reset sent.

    Please check your inbox
    Please agree to our privacy policy.
    FORGOT PASSWORD
    5
    JOIN THE X2X COMMUNITY
    Latest news and events directly into your inbox.
    I agree to the X2X Privacy Policy
    Registration Successful.

    Please check your inbox.
    Your Email is Confirmed.

    Thank you for registering

    It appears you are already registered.

    Please enter you password to update your marketing preferences.

    Forgot Password
    Incorect Password

    Please enter you password to update your marketing preferences.
    Password reset sent.

    Please check your inbox
    Please agree to our privacy policy.
    FORGOT PASSWORD
    1

    Privacy Policy

    Effective date: May 25, 2018
    Last updated: November 9, 2020