
<!-- 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":14204,"date":"2025-09-23T09:02:08","date_gmt":"2025-09-23T09:02:08","guid":{"rendered":"https:\/\/www.afiniti.com\/?post_type=video&#038;p=14204"},"modified":"2026-03-13T17:58:56","modified_gmt":"2026-03-13T17:58:56","slug":"pbr-vs-afiniti","status":"publish","type":"video","link":"https:\/\/staging.afiniti.com\/video\/pbr-vs-afiniti\/","title":{"rendered":"Beyond Performance-based Routing"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"14204\" class=\"elementor elementor-14204\" data-elementor-post-type=\"video\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2af0910 video-wrapper e-flex e-con-boxed e-con e-parent\" data-id=\"2af0910\" 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-fd2d1a1 elementor-widget elementor-widget-heading\" data-id=\"fd2d1a1\" 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\">Beyond Performance-based Routing<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eff3447 elementor-widget elementor-widget-video\" data-id=\"eff3447\" 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\/1120882673?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\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"featured_media":14222,"menu_order":0,"template":"","tags":[],"page-category":[67],"class_list":["post-14204","video","type-video","status-publish","has-post-thumbnail","hentry","page-category-animation"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/video\/14204","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":12,"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/video\/14204\/revisions"}],"predecessor-version":[{"id":24377,"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/video\/14204\/revisions\/24377"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/media\/14222"}],"wp:attachment":[{"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/media?parent=14204"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/tags?post=14204"},{"taxonomy":"page-category","embeddable":true,"href":"https:\/\/staging.afiniti.com\/api\/wp\/v2\/page-category?post=14204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}