and a few days later:
Added support for wide=1 in img and video
Well that’s concerning… so we have documentation at least that src
is intentionally not getting updated. Will have to see whether it’s intentional because of some sort of browser limitation or otherwise. Anyone want to dig back to original tile discussions to see if there is any context on that decision in Discourse threads?
What baffles me is that when the src is a jpeg, it DOES refresh at the rate set under refresh=300… but the same technique does not update when a base64 is the src
Another quote:
the dashboard was never really meant for that kind of display… the tiles will also be in the visor, but they’ll have real time updates
I realize that I am pushing webCoRE into new & uncharted realms… but man, my dashboard is looking sweet with mini-graphs embedded in it.
Can I be added to the beta-testing on the visor page?
Oh, I understand you better now. The jpeg reference stays the same (same web address) so the refresh=300 works… but the base64 is different each time it runs, so the refresh=300 is ignored.
Best I can tell here:
That img.osrc is the part that never gets updated, so when the tile changes it seems that it needs a way to validate whether img.osrc is equal to the new value and if not then show your new image. I’ll take a stab at making that happen.
Is it possible that the image does get updated but the refresh parameter later resets it to the original? I forget whether we’ve tried a data url without the refresh parameter but all of the above should only occur when that parameter is present.
I don’t suppose this clunky workaround would help?
Will trigger the spinning graphic each time but at least you’ll get your new image afterwards… maybe run every 10 minutes or something?
The first way we tried it was without the refresh parameter. I was convinced that because this was base64, the refresh would not matter.
As for the image.osrc not updating, I imagine that since this was designed for cameras, an update to the image in a tile would cause resource usage that would be considered useless, and it was written this way (or not written at all) as a way to cut down on traffic and processing. Not to mention, if an image updated itself while the camera was running, it would have to obtrusively reconnect to the camera. Maybe instead of trying to force it to update on a piston running, a parameter of autoupdate=0|1 with a default of 0 would work better. Or maybe that’s not necessary, because how often do you change an image source when you don’t want it to update?
Well, I removed refresh=300
entirely from the code… I let it run once… Did a hard refresh in the browser… Then left it alone while it ran three more times over 30 minutes. The image refreshed during the hard refresh, but not afterwards, unfortunately.
FYI… image and video tiles were rolled out 27th July 2017, but nothing in the release notes.
It was kept hush hush for a while because green snapshots weren’t yet making the URL’s anonymous.
@jcox @WCmore give it a go on staging.webcore.co. The actual problem here was caused by how the tile media metadata was extracted. It is a fairly expensive operation and the metadata is used more than a dozen times in the tile so there was an optimization to fetch it once then reuse that fetched metadata. The problem was that “only once” meant only once for the entire lifecycle of the tile element, not only once per tile update.
If this works properly for you the following changes will be included in the next release: