Skip to content

Embed in Websites

Overview

This page explains how to embed a Minsar experience in your website and explains the scenarios and options available.

Availability

Web Embed will be available to all Minsar by the end of 2021.

Beta Testers only

The documentation below only applies to Minsar Insiders using a pre-release version of Minsar.

Getting Started

There are currently two methods to embed a Minsar player in your website.

Embed a viewer using an <iframe> tag

The easiest and quickest way to embed a Minsar viewer is using the <iframe> tag, with the src attribute pointing at the URL of the experience made in Minsar.

<iframe id=“minsarViewer”
        type=“text/html”
        width=“640”
        height=“360"
        frameborder=“0”
        src=“EXPERIENCE_URL“>
</iframe>

XR Support

The WebXR specification does not seem to allow entering in XR Mode from an iframe embed at the moment. If you wish to add WebXR fonctionality, we recommend switching to the second method.

Embed a viewer using the Minsar Viewer API

If you want more control over the way the experience is opened, you can also use the minsar-viewer-sdk-webxr npm package.

You would need a bundle tool such as browserify to pack the dependencies in an output readable by the web browser.

var app = require("minsar-viewer-sdk-webxr")

window.addEventListener('DOMContentLoaded', () => {
    app.openExperience('myCanvas', "EXPERIENCE_URL", false);
});