F0 = HTML image URL

Hello community :slight_smile:

after years of using flash we now need to switch over to HTML,
everybody knows about the ending Flash support. I am struggeling
with a more basic issue, so sorry in case i bother you.

Sending Text via Client like f0 - 123 works fine in Html when
coded like this:

< div id=“f0” style="…

but when i try a path or an url in Client for f0 like E:/1234.jpg while Html
looks like

< img id=‘f0’ />…

i didn’t works… :confused:

Having the url already inside Html let everything work:

< img id=‘f0’ src=‘E:/1234.jpg’ />

Can anybody help me here?

thx in advance :slight_smile:

What javascript are you using? It’s probably just changing the text content but would need to change the SRC attribute for img’s.

I have to admit i am not a coder(my origin is video) so i try my best:

this is on top in my html:

	<script src="CasparCG.js"></script>
	<script src="jquery.min.js"></script>

And i am using the 2.1.0 version of casparCG

You will need to use a Javascript file that has an update function that accepts raw data. Parse the data to JSON then as @hreinnbeck said, set the img elements src attribute to the value of f0.

function update(rawData) {
   const data = JSON.parse(rawData);
   document.querySelector('img').setAttribute('src', data.f0);

HAAA!! ouellettec!! Thank you very much! I don’t understand this logicby 100% but i was
able to add some javascript for postion and fade in of the image !

Thx :slight_smile: