diff --git a/openflexure_microscope/api/static/public/http_base_frame.html b/openflexure_microscope/api/static/public/http_base_frame.html new file mode 100644 index 00000000..627e08e5 --- /dev/null +++ b/openflexure_microscope/api/static/public/http_base_frame.html @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/openflexure_microscope/api/static/src/components/tabContentComponents/imjoyContent.vue b/openflexure_microscope/api/static/src/components/tabContentComponents/imjoyContent.vue index c5443937..7a4ac383 100644 --- a/openflexure_microscope/api/static/src/components/tabContentComponents/imjoyContent.vue +++ b/openflexure_microscope/api/static/src/components/tabContentComponents/imjoyContent.vue @@ -122,6 +122,12 @@ export default { mounted() { const self = this; const imjoy = new imjoyCore.ImJoy({ + // We will load the ImJoy plugin base frame via http (instead of https) + // such that imjoy plugins can access insecured urls + // however, some browser features won't work (e.g. webrtc) + // unless we explicitly set `base_frame` in the plugin to + // https://lib.imjoy.io/default_base_frame.html + default_base_frame: '/http_base_frame.html', imjoy_api: { async showDialog(plugin, config, exta_config) { return await imjoy.pm.createWindow(plugin, config, exta_config);