Multiple nft markers make the webpage very slow - ar.js

I have a use case where I need to have 6 NFT markers on a single html page. These markers correspond to a brochure and the images on the brochure would trigger videos. I'm using Ar.js-org version in this project.
My challenge is, when I use 2 markers, everything works fine. The load time is acceptable, videos run fine. But when I add 5-6 nft markers, the web page either loads very slowly, and eventually it crashes. Even when it loads completely, the videos don't run properly. All 6 markers are in the same a-scene tag.
Can someone help me with suggestions on how can this performance issue be resolved?
UPDATE - I tried loading the videoa in separate threads. But it did not work. Even though the videos are loaded in separate threads, the a-nft markers are still loaded on the main thread. So when they load, they look for their a-audio and a-video components. And since they are being loaded separately, the markers load with errors.

Related

Wagtail Images Suddenly Not Rendering on Front End

I have just encountered an odd problem I'm trying to debug but cannot figure out what is wrong.
I have a wagtail site with images that were all working. At one point I refreshed the browser, and the images suddenly all disappeared from every page.
wagtailimages_tags is there
static is all loaded
the images are all in the correct media directory as specified and have been uploaded through the CMS
if i inspect element, the image is in fact coming through in the code perfectly.
But the site itself just does not show the image. I have checked the CSS and nothing has changed there and it is not hiding the image somehow.
My last resort - I actually started the project over completely in a new environment and added each application one by one to see if I could solve the issue ... nope. No images on the new install from scratch either!
No idea why all the images would suddenly just fail to appear in browser. Just seems super strange to me.
Any ideas on debugging appreciated.
Solved. The path to one of the js files had an extra /js in it and was not loading the file the page needed. The console showed and error and said it could not find /img.url - weird but the file in question where the error was found was the js file with the incorrect path.
This mistake caused every path to load perfectly but strategically blocked a few things globally that a little extra reading of the console would have helped me figure out sooner.
Fixed the .js file path and now all is good.

Firefox C++ Source Code help for detecting end of page content download

I need to detect when a web page along with all its contents and embedded URLs, Images, Audio, Video etc. are completely downloaded. I debugged the file docshell/base/nsDocShell.cpp --> nsDocShell::LoadURI(). It gives me clear indication that page load is complete, but only problem is that I can still see page download in progress while above API indicated page download is over. Can someone help regarding this, Am I looking/digging into wrong location? I don't have to write AddOn or Extension, but only dig into base source code and take the information.
Well, there is no singular "all downloaded" state. After "everything" is downloaded, parsers might be still active, causing more downloads as more image tags and script tags are parsed, and so on. Parser might be paused even, e.g. when encountering synchronous script tags which.
The nearest "all complete" state is likely when document.readyState is set to "complete" and the load/error event for the document is dispatched.
This happens (IIRC) in nsDocumentViewer::LoadComplete.
Even then more external resources might be loaded as a result of scripts inserting new tags, CSS rules being triggered, XMLHttpRequests and so on. Modern web sites are for that reason never fully loaded.

Under linux, how to run application via .html

I am working on a image processing project. I am not familiar with html. Here is what I think.
My C++ application is able to read an image and write the image to file after processing. The procedural is that user can click mouse in a fixed region of my web, and the position data could be passed as parameter to my application, and then my C++ application will use the position data to process the image and output image to file, finally my web display the image.
So is that possible to implement this?
I'm afraid it's not possible only with HTML.
It should be possible with any server-side scripts written in PHP (for example). Anyway, you can make you program to watch folder uploaded and processed images save into another folder. You will need PHP or something like this though.

Integrating an image into my executable file

I have an application that relies on many images. I have no problem loading the images on to the window. I would like to make my application have the images integrated into it where there are no actual image files in the folder. Also, I would like to know how to do this, because if I sell the application I don't want the user to be able to go to the directory my .exe is located in an get the image file (I am aware that they can print screen it). So, how can I integrate the image into my application. I am using the WinAPI with C++.
I have searched this multiple times and have not found anything on this. I have found one question on another forum, but it was asked a long time ago and was not answered. I did find one other place that had this, but It did not specifically work with my question.
You can bind images (as well as pretty much any pieces of data) as resources to your binary.

django image management

In my project I'am working with images. I don't know how to organize the management of images.
I need to dynamically upload the pictures and resize them.
First question - what is the best way to dynamically upload images with progress bar and without flash? I found this and this, but I believe there is a better way.
Second question. I have to save one image in different sizes. I won't use these thumbnails on my pages, but another application will. Many clients could upload images at the same time. This means that I can not resize all the images at the same time. How should I organize this process?
Is there are a better ready-to-use solution for image management issue?
django-photologue could be a good starting point for organizing the management of your images.
The PhotoSize model can be used to automatically resize/crop your images, and the GalleryUpload model allows the user to upload an archive of images.
You can also create PhotoSize models with pre_cache = False. This means that your images will dynamically created the first time they are requested.
For your second question you might use a task queue, like django-celery or django-tasks.
For the image crop, try Python Imaging Library (PIL)