Web Embed

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 in Minsar 2, by the end of the year.

Getting Started

There are currrently two methods to embed a Minar 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.

1
2
3
4
5
6
7
<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.

1
2
3
4
5
var app = require("minsar-viewer-sdk-webxr")

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

Compatibility

TBD.