Embedding a Matterport | WordPress.org

[ad_1]

I have been trying to embed a Matterport with an HTML i-frame. Doing a cross-compatibility browser check, I then discovered that Edge and Firefox (at least, I stopped there) completely shut down those types of embeds due to security reasons. I tried adding javascript:

<div id="matterport-container"></div> <script> document.addEventListener("DOMContentLoaded", function() { // Create a new iframe element var iframe = document.createElement("iframe"); // Set the iframe attributes iframe.src = "https://my.matterport.com/show/FAKEID"; iframe.width = "853"; iframe.height = "480"; iframe.frameborder = "0"; iframe.allowfullscreen = true; // Append the iframe to the container element var container = document.getElementById("matterport-container"); container.appendChild(iframe); }); </script>

No avail. I am new to this software, and I am not sure Java is even enabled…? The end result is the code in plaintext view on the site when I throw that in a custom HTML block. When I use a basic i-frame html it works fine, at least on Chrome, so I know the embed is being blocked by the other browsers (again, I am guessing because of their profuse dislike of i-frames):

<iframe width="853" height="480" src="https://my.matterport.com/show/FAKEID" frameborder="0" allowfullscreen allow='xr-spatial-tracking'></iframe>

Are there any fixes that don’t involve going full Dev SDK from matterport?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer