
<!-- Javascript -->

<script type='text/javascript'>
  let originalPath = window.location.pathname;

  function openVideo(videoUrl, deep_link) {
    const overlay = document.getElementById('videoOverlay');
    const iframe = document.getElementById('videoIframe');
    const autoplayUrl = `${videoUrl}`;
    iframe.src = autoplayUrl;
    iframe.allow = "autoplay"
    overlay.style.display = 'flex';
    document.body.style.overflow = 'hidden';

    video_history_push_pop(deep_link);
    
  }

  function closeVideo() {
    const overlay = document.getElementById('videoOverlay');
    const iframe = document.getElementById('videoIframe');
    iframe.src = '';
    overlay.style.display = 'none';
    document.body.style.overflow = '';
    video_history_push_pop('');
  }

  function getYouTubeEmbedUrl(url) {
    // Our regex pattern to look for a youTube ID
    const regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/;
    //Match the url with the regex
    const match = url.match(regExp);
    //Return the result
    const videoId = match && match[2].length === 11 ? match[2] : undefined;
    if (videoId) {
      return 'https://www.youtube.com/embed/' + videoId + '?autoplay=1';
    }
    else {
      return undefined
    }
  };
  function getVimeoEmbedUrl(url) {
    // Look for a string with 'vimeo', then whatever, then a
    // forward slash and a group of digits.
    const match = /vimeo.*\/(\d+)/i.exec(url);
    // If the match isn't null (i.e. it matched)
    if (match) {
      // The grouped/matched digits from the regex
      return 'https://player.vimeo.com/video/' + match[1] + '?autoplay=1';
    }
    else {
      return undefined;
    }
  };

  function video_history_push_pop(deep_link) {
    console.log(deep_link);
    if (deep_link != '') {
      const newUrl = "/video/" + deep_link; 
      history.pushState({ video: true }, "", newUrl);
    } else {
      history.pushState({}, "", originalPath);
    }
  }
</script>{"id":14210,"date":"2025-07-15T09:02:56","date_gmt":"2025-07-15T09:02:56","guid":{"rendered":"https:\/\/www.afiniti.com\/?post_type=video&#038;p=14210"},"modified":"2026-03-13T17:55:43","modified_gmt":"2026-03-13T17:55:43","slug":"ai-pairing","status":"publish","type":"video","link":"https:\/\/staging.afiniti.com\/video\/ai-pairing\/","title":{"rendered":"Afiniti Pairing"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"14210\" class=\"elementor elementor-14210\" data-elementor-post-type=\"video\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a2a8d66 video-wrapper e-flex e-con-boxed e-con e-parent\" data-id=\"a2a8d66\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f082499 elementor-widget elementor-widget-video\" data-id=\"f082499\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;video_type&quot;:&quot;vimeo&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<iframe class=\"elementor-video-iframe\" allowfullscreen allow=\"clipboard-write\" title=\"vimeo Video Player\" src=\"https:\/\/player.vimeo.com\/video\/1120886663?color&amp;autopause=0&amp;loop=0&amp;muted=0&amp;title=0&amp;portrait=0&amp;byline=0#t=\"><\/iframe>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9f6be46 elementor-widget elementor-widget-heading\" data-id=\"9f6be46\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Afiniti\u2019s AI Pairing<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4047f7a elementor-widget elementor-widget-text-editor\" data-id=\"4047f7a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span data-contrast=\"auto\">Afiniti pairs each caller with the right agent in real time\u2014driving better outcomes than traditional routing.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:0}\">\u00a0<\/span><\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"featured_media":14221,"menu_order":0,"template":"","tags":[26],"page-category":[67],"class_list":["post-14210","video","type-video","status-publish","has-post-thumbnail","hentry","tag-isfeatured","page-category-animation"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/video\/14210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/video"}],"about":[{"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/types\/video"}],"version-history":[{"count":28,"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/video\/14210\/revisions"}],"predecessor-version":[{"id":24371,"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/video\/14210\/revisions\/24371"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/media\/14221"}],"wp:attachment":[{"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/media?parent=14210"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/tags?post=14210"},{"taxonomy":"page-category","embeddable":true,"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/page-category?post=14210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}