Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Load graphics from network.disk into WebRender TOP?

Send us your requests for enhancements (RFEs)

Load graphics from network.disk into WebRender TOP?

Postby lucasm » Thu Aug 08, 2019 3:29 pm

Hi - I spent some time trying to load images into the web render top off the disc, to no avail.
Seems to not be supported, is it possible to get support for this? would make for a very useful rendering system for displaying information, especially if that info was in the network graphically.

I've tried sourcing a text TOP in the same container as the web render top, as well as an image in the same folder as the TOE. neither seem to work:

Image
User avatar
lucasm
 
Posts: 260
Joined: Sat Apr 28, 2012 7:55 pm
Location: Dallas, TX

Re: Load graphics from network.disk into WebRender TOP?

Postby yeataro » Fri Aug 09, 2019 9:45 am

Chromium can't load local files by default. If it's a chrome browser, you need to add the command "--allow-file-access-from-files" at startup, but in It is an independent core in TD. I think the most straightforward way is to run the web server locally and load local files through "http://127.0.0.1:(port)"

But the wiki page mentions "Targets can be on the internet, in local files with a file://", perhaps the flag is not open in the Chromium?
User avatar
yeataro
 
Posts: 20
Joined: Tue Sep 28, 2010 2:31 pm
Location: Taipei

Re: Load graphics from network.disk into WebRender TOP?

Postby lucasm » Fri Aug 09, 2019 11:03 am

I forgot to mention I tried the file:// as well, good thought -

I can't unfortunately run it from localhost as I think that would require all assets, css, html, images being on disk? I can totally do that for the images, but the code updates fairly frequently and sometimes in bursts from TD - and I'd rather not write to disk that much.

Image
User avatar
lucasm
 
Posts: 260
Joined: Sat Apr 28, 2012 7:55 pm
Location: Dallas, TX

Re: Load graphics from network.disk into WebRender TOP?

Postby yeataro » Fri Aug 09, 2019 11:04 am

I just thought of a roundabout way: open a local html file and use javascript to modify the page content:

2019-08-09_230002.jpg
2019-08-09_230002.jpg (117.87 KiB) Viewed 715 times


Of course, I also think that the ability of TD to add DAT as a web render content to open local files is great ! +1.
Last edited by yeataro on Fri Aug 16, 2019 8:37 am, edited 1 time in total.
User avatar
yeataro
 
Posts: 20
Joined: Tue Sep 28, 2010 2:31 pm
Location: Taipei

Re: Load graphics from network.disk into WebRender TOP?

Postby lucasm » Fri Aug 09, 2019 11:19 am

woa! power of javascript right there.
Yeah that is an interesting way forwards, does this also work with webrenderTOP if the source is a DAT?

Having a javascript function execute after the html/css updates miight be an option depending on how robust it is, can it happen same frame vs 1 frame later etc..

I'm building UI with this, so being able to load images from Touch, but failing that the disk is really integral to customizing it further.

Thanks for the tip!
User avatar
lucasm
 
Posts: 260
Joined: Sat Apr 28, 2012 7:55 pm
Location: Dallas, TX

Re: Load graphics from network.disk into WebRender TOP?

Postby yeataro » Fri Aug 09, 2019 11:31 am

This method uses local HTML as a framework to change the content, because a local HTML can read local assets, so if the source is a DAT, it can't load local files.
I also thought that if there is a pseudo URL protocol (like TD://), it can be fun to access DATs in the TD network as a path.
(But the implementation should be quite troublesome, it is better to get it in the reverse way)

Update:
TD is the way to access DATs in the form of Data URLs. We may look for it when searching for answers to bypass security settings. (I tried adding --disable-web-security to the option, it doesn't work)

https://developer.mozilla.org/en-US/doc ... /Data_URIs
User avatar
yeataro
 
Posts: 20
Joined: Tue Sep 28, 2010 2:31 pm
Location: Taipei


Return to Wishlist and RFEs

Who is online

Users browsing this forum: No registered users and 6 guests