Embed an Iframe in a Vikor Application

I’m looking to embed an iframe of a 3d model (in this case, a speckle model), into a viktor application.

I’ve attempted to do this with an webview and the following html code:

This leads me to a blank embed box, and a bunch of CORS errors! Is it currently possible to embed iframes using the web view? If not, any suggestions for how I can embed a speckle model within the application?


Hi @cslotboomFE ,

Welcome to the community! And thanks for raising this question here.

The issue that you are experiencing is because the WebView which is basically an iframe that loads and renders your html, does not have the header allow-same-origin added, which is required by the Speckle.

To change this could be a security risk (I don’t have knowledge of this aspect, so I’ll leave it to others to elaborate on this aspect). It is also an issue that Speckle have raised themselves:

Thinking in terms of solutions, here are a couple:

  • Investigate whether the Speckle SDK allows some way of rendering the model without the header.
  • Try to find a solution where the speckle stream is converted to a GLTF or IFC format, and render it in the GeometryView or IFCView
  • Request Speckle to look into the issue, and find a solution to not have the allow-same-origin header to be needed
  • Make a feature request to request a solution to render a Speckle model in VIKTOR
1 Like