ets2-local-radio
ets2-local-radio copied to clipboard
Additional API / Showing Radio Data
An extra API for people to use http://IPADDRESS/api/radio/
This will show a JSON String with the Current Radio Station & the Signal strength
Like this;
{"Radio":"RAI Radio 1","Signal":"5"}
I wanted to include the Nearest City but it would require a slight change to the main.js (Web one) which isnt hosted locally to try & In-Game Time, but the SDK used by this Program isn't new enough so doesn't include the value
Quick Question: When the server is playing a specific radio station and the signal starts dropping out (Whitenoise starting) - Is the SetRadioStation called again with the Signal Strength? Or is this handled by the setWhitenoise function in web/main.js Thanks, JPL
setWhitenoise, in particular here: https://github.com/Koenvh1/ets2-local-radio/blob/master/web/lib/js/main.js#L308
API Feature - Signal is now dynamic based on the white-noise values and is refreshed along-side:
function refresh(data)
Updated, works more efficiently/reliably now!