I’ve been working on a radio app that would load as an in-game panel. The panel would take an aircraft’s position, and return available local radio stations. I’ve gotten the basic functionality to work, but am stuck at getting the audio stream for said radio station to load. Is this a limitation of the implementation, or is there something I should be doing to be able to load audio components?
I’m loading the app through an iframe using this package/template (github.com). Loading the iframe outside of the sim works. Loading the iframe in the sim works as well, however, the stream never loads.
Any ideas?
I’m working on an in-sim app using the github code as a push in the right direction.
I think the sim uses stripped down browser code to display the gauges and our windows. It is based on Coherent which I have no idea about! (yet)
I’ve been using forms to collect data and I have two big limitations, I can’t use the default html date input types etc; and you need to implement a custom keyboard as when typing in forms the sim events mapped to the button also fire.
As to your issue on stream loading you can use the code here (GitHub - dga711/msfs-webui-devkit: This devkit is a mod and guidance for easier development of WebUI (Panels, MFD..) in Microsoft Flightsimulator 2020.) to see console.log messages, perhaps it would be worth debugging that way???

1 Like
Just starting to learn about Coherent myself (Coherent GT, specifically). I think I figured it out, which is the fact that the audio tag can only receive webm type files, and none of the streams are webm, so it’s back to the drawing board for me as my implementation relies on browser based audio.
Maybe some of your inputs are also not implemented in Coherent GT?
Thank you for the lead on the devkit. Will come in handy!
1 Like
ucixsonixs, could you please shed some light on how you connected to your app?
I keep getting SecurityError: Blocked a frame with origin “coui:html_ui” from accessing frame with origin “http://localhost:8080”
Thanks
1 Like
Hmmmm. It just worked. I didn’t really need to do anything beside just load it using same iframe method listed in the GitHub repo. Did you get it to work?
Sorry for the late reply. I think what I was doing was right but the website I was trying to load would end up crashing. I went with a different approach a wrote a simple client that does the same thing instead.
Many thanks
Ah! I just realized you’re with bush talk and your use case was actually the audio tag specifically. I found that the game engine that MSFS runs on does not expose the audio tag. It only has a video tag, and even that does not support streams. So a local client seems to be the best way to go!
1 Like
I’m fighting with the same issue at the moment when trying to push messages between an iframe and the window.
Hmmm. As in messages from the iframe to a client? Or from an iframe embedded in the window, to the window itself?
Kinda both ways, I posted here about my issue and the code I’m using. Custom Window - Security Error with iframe
I’m sending a message to the parent window from the website to tell the window to start recording data. The window then posts a message back every x seconds with lat, long etc. etc. to the webpage (in iframe).
I get my error message when using joystick and then moving the mouse bizarrely.
I’m not great at all with JavaScript so is very possibly my implementation and or code.
It looks like the SecurityError: Blocked a frame with origin “coui:html_ui” issue is perhaps linked to the parent page and the frame needing to be loaded with the same protocols - doing some digging and found this javascript - Blocked iframe due to mismatch protocols - Stack Overflow
I wonder if there is a work around???