I used an older version of CasparCG a few years ago for some graphic outputs for some game streams. I don’t have access to the computer that handled that, but I currently have code that’s not loading due to cross-origin issues, which is common for accessing local files. I’m not sure how I worked around it last time, so I’d like to know if anyone knows of the solution.
The specific code that’s throwing the cross-origin error is this: xhr.open('GET', "streamcontrol.JSON?test="+cacheBuster,true);
Yes, if your webpage is opened via the file:// protocol, any request is cross-origin.
If you really need to load JSON files over the file:// protocol, you have three options:
Disable the browser setting for CORS protection. For example for Firefox this is: security.fileuri.strict_origin_policy in about:config, which I obviously don’t recommend, or