My website uses a video plugin. When I used a micro-front end to embed this website into a system with a different domain name, the video plugin could not be loaded and the video was not displayed. I wanted to confirm whether it was because I lacked the license configuration. If yes, how should I configure it? If not, what might be willing to cause such a problem?
videoplayer.js Unable to load on a new website
-
-
- Official Post
Loading errors are typically not license related.
I would guess wrong path or wrong or missing file...
-
Loading errors are typically not license related.
I would guess wrong path or wrong or missing file...
First of all, I have an application that uses krpano Videoplayer Plugin through the above picture
. Everything can be displayed normally when it runs independently; but when I use the garfish (https://github.com/web-infra-dev/garfish) micro-frontend framework to load the application, the embedded video can not be displayed normally. As far as I know, The script executed in this micro-frontend framework is executed through eval, rather than dynamically adding script scripts when a separate sub-application is started. And I encountered a similar problem when loading krpanojs before. I put krpanojs into the main application to load it, so it was solved,So I suspect that under the garfish architecture, the Videoplayer Plugin cannot be loaded.So I would like to know if there is another way to load this plugin in advance. for example, can you provide Universal Module Definition ?
-
- Official Post
Try using an absolute or relative path to the videoplayer.js.
Also check the browser console to see which paths should be loaded.
-
Try using an absolute or relative path to the videoplayer.js.
Also check the browser console to see which paths should be loaded.
In my actual project, I use the CDN method to load the videoplayer plugin, and when used as a standalone application, the console can see the resource.
But the same application, loaded under the micro-frontend architecture I mentioned above, has no video plugin resources in the console
-
- Official Post
What is that 'micro-frontend' actually doing?
Without knowing that, it will be not possible to answer your question!
-
What is that 'micro-frontend' actually doing?
Without knowing that, it will be not possible to answer your question!
Garfish is a micro front-end framework, to compose multiple independently delivered front-end applications into a whole, and to decompose front-end applications into some smaller and simpler applications that can be "independently developed", "independently tested" and "independently deployed", while still appearing to users as cohesive individual products.
You can simply understand through its documentation:https://github.com/web-infra-dev/garfish
my problem can be solved if this videoplayer plugin and krpanojs can have a universal Module Definition(umd) for front-end developers to use.
-
Or is there any other way to preload videoplayer plugins?
-
- Official Post
What is that frameworks doing a low-level?
Does it intercept xmlhttprequest or fetch requests?About 'Universal Module Definition' - the krpano plugins are no Javascript modules and not included as modules.
You could inline files by using base64 data-urls, but that might work only for xml and plugins files, with images this might become inefficient...
-
What is that frameworks doing a low-level?
Does it intercept xmlhttprequest or fetch requests?About 'Universal Module Definition' - the krpano plugins are no Javascript modules and not included as modules.
You could inline files by using base64 data-urls, but that might work only for xml and plugins files, with images this might become inefficient...
What is that frameworks doing a low-level:This framework uses eval to execute the code of each sub-application,It is not the way to dynamically add scripts when a single sub-application starts. In this way, It is impossible to mount global variables normally. so when my application runs alone, there is no problem loading krpanojs, but it will fail when placed in the micro-frontend architecture,
Does it intercept xmlhttprequest or fetch requests:No
Sorry, that may be my misunderstanding of krpano. By the way, I would like to ask you, is the code of krpano videoplayer plugins dynamically executing a js script? How should I use inline files by using base64 data-urls for videoplayer plugins ?can show me a demo?
-
-
- Official Post
How should I use inline files by using base64 data-urls for videoplayer plugins ?can show me a demo?
Here an example:
krpano.com - Documentation - Local / Offline Usage
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!