I’ve used Webviewer as a way to play MP3 files on my app. I’ve noticed it’s a little bit slow – takes about 2 seconds for the MP3s to load on screen. I have the webviewer connected to my personal website which is built using Wix.
I’m wondering if there is any way to speed up the load time?
You could dressup the wait time with a loading time so it’s not so weird.
The webviewer doesn’t load until it’s visible. Is this related to what you’re experiencing?
This thread on github indicates it’s an issue with react native.
One solution could be, if you’re not needing the content immediately, to position the webviewer using absolute positioning and placing it offscreen at a left offset of -1000 for example. Then you could bring it back into view when needed , or not at all for an mp3 maybe?
Interesting idea. I’m curious if there’s any way to know when the web page has completed loading. Otherwise, I might just have to keep it hidden/off-screen for 5 seconds or so and assume that’s long enough for most web pages to load in the web viewer.
If it is your own web page then you can use the onload event to check when the page has loaded. Using the web-viewer extension then you can programmatically reposition the web viewer once you receive the “load complete” message from the onload event in the page.