HTML producer quirks

HTML producer is giving me a headache!

I am running into 2 problems.
the Double iframe issue when using anything newer than LTS.
When CEF got updated this got broken >> see https://github.com/CasparCG/server/issues/1518

The other issue is with 2.3.2 LTS, that has an issue with Fetch and Json data that always comes back corrupt when the HTML file is not local (HTML page in the client). This got fixed with newer releases.
It works fine when running it at as a html template. It also runs perfect with newer CEF versions.

But since my development rests on both of these things working, I am a bit stuck because of these issues. Anyone know any workarounds or things I can try?

Using iframes is considered as bad HTML coding style for many years, so my idea would be to find a way to get rid of these. What do they do in your use case?

EDIT: I just found this.

Hi Didi!

In my case they provide means to load a template from an external source.
Because of their sandbox nature and clear means of control, existing templates can be adjusted with minimal changes.

I saw your object idea before, but discarded it then, as it was not a neccesity at that point.

Sounds interesting, but why you do that? I don’t understand. If you have the external templates, why not modify them directly? - I ask just for curiosity.

Well I want to separate controls and the engine.
Ive succeeded as such. That is not the issue. The issue now is that I cannot load in more than 1 iframe, and that is a shame, because a modern browser has no issues running multiple templates at the same time. With that I can load multiple templates within a single source loaded on the engine.

fixed! fix(html): Don't inject `window.casparcg` into iframes, as it causes … · CasparCG/server@5261b69 · GitHub

2 Likes

@Julusian Wow! amazing! Thank you!