Hey guys...
Dan, your solution will definitely work for the width...but it will leave the embed viewer at 480px tall ALL the time, regardless of device size. On a phone in landscape mode, it has the potential to still be taller than your viewport.
Also, I'm not sure why your embed would have ended up smaller, height-wise than what I've demonstrated below in my URL. Can you send/post a link to an example where the "default height was about 1.5"?
I've also found that when one embeds more than 1-2 models on a page it can create really dramatic load times, as well as slowly responding web pages. I'd recommend not embedding more than 1 or 2 of these suckers at any given URL.
Anyway, I've added a little example showing the differences between the stock Matterport Embed and one that can be done using Embed Responsively (
http://embedresponsively.com/).
http://missoula3d.com/embed-examples/Do note that WordPress’ WYSIWYG will typically strip out any inline <style> tags if you switch away from “Text” to “Visual” mode (on the stock WYSIWYG content editor) when editing a post. This is certainly not ideal, but can easily be solved with a bit of custom code or admin template.
Otherwise, if your theme offers a place to add some custom CSS, you could enter this:
.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
And then use this for the Embed Code:
(obviously swapping out your own model ID)
<div class='embed-container'><iframe width='853' height='480' src='https://my.matterport.com/webgl_player/#model=rQBwr3AHcSu' frameborder='0' allowfullscreen></iframe></div>
I realize this is a little "code-heavy" and I apologize. Properly embedding the Matterport viewer (so that it can be seen on phones) is a little tricky.
Please feel free to reach out to me if you have questions re: your WordPress specific site(s).