Receive Only Channels + Different Zone/Channel Announce Text vs. Display Text#49
Receive Only Channels + Different Zone/Channel Announce Text vs. Display Text#49crazyghost-12 wants to merge 18 commits intoWhackerLink:mainfrom
Conversation
…ue for channels (prevents radios using this codeplug to transmit on that channel)
|
@Firav looks good from what I can tell. Thoughts? |
|
@firealarmss Did we ever fix the API issue we had with responsivevoice.org? We got ratelimited or something, thats why we had to disable it in the first place. |
Firav
left a comment
There was a problem hiding this comment.
If we're going to re-enable responsiveVoice, we'll need to enable these lines again as well. Looks like you missed these for the scanner models too:
656-657
if (!isScannerModel()) {
// responsiveVoice.speak(${currentZone.name}, US English Female, {rate: .8});
// responsiveVoice.speak(${currentChannel.name}, US English Female, {rate: .8});
}
|
@Firav, |
Firav
left a comment
There was a problem hiding this comment.
WhackerLinkFiveM/client/ui/index.html
Line 110 in bd45828
This line will need to be uncommented as well, else responsiveVoice doesnt work at all.
@firealarmss Do we want to just make the responsivevoice API key a user-configurable? Like we did with AVD? |
|
Yeah I think we should make this configurable so we don't hit a rate limit again. @Firav |
Remove the announceZoneChannelChanges configuration option.
Added 'announceZoneChannelChanges' field to configuration.
Removed comment about enabling announceZoneChannelChanges.
Removed responsiveVoiceApiKey placeholder from config.
@crazyghost-12 would that be some you'd like to implement, or would you like me to create another PR for it? |
I will attempt it! |
Fetch and check responsiveVoiceApiKey from config.yml before announcing zone and channel.
|
@Firav Can you look over lines 661-682? Before I do the rest.. |
Yikes. That'll work in theory yeah, but we dont want to do that for every entry that uses responsiveVoice. Try making a function somewhere in the script.js that retrieves that information and stores it as a global variable that you can use later. |
Ok sounds good, I'll try that. Sorry I have very very little coding experience and really just know the basics so I'm just kinda doing this to challenge myself. I'll give that a shot when I get off work tonight! |
Added logic to fetch and check responsiveVoiceApiKey from config.yml, enabling/disabling responsive voice based on its presence.
|
How do lines 133-152 look (for the global var) and then 683-686 for checking the global var to announce the channel/zone? If everything looks good, I'll implement it to the other places where responsivevoice.speak is triggered and update the HTML file to include the config file's API key in the script header for responsive voice. |
|
If I recall correctly, I pass the entire parsed config option into the script.js on start. Is there a reason for reopening and parsing the config? |
@Firav How about now... lines 104-141? |
Looking good! Just gotta finish out your logic for the rest of the responsiveVoice API calls and for the actual API key itself in the script inclusion. Also marked a change for you to review. |
|
@Firav The remaining placed where responsiveVoice.speak were updated the only thing is, I'm not sure how to pull a YAML file value into HTML, so I was wondering if you'd be able to help me or do it yourself? Also, you mentioned you marked a change for me... where do I see that? |
firealarmss
left a comment
There was a problem hiding this comment.
I don’t think I like that YAML parsing? @Firav ?
Receive Only Channels
_ Different Zone/Channel Announce Text vs. Display Text_