Add Internet Radio extension - #616
Conversation
❌ Preview build failedFailed on |
RedMan13
left a comment
There was a problem hiding this comment.
and also, was this made with ai?
| id: 'internetradio', | ||
| name: 'Internet Radio', | ||
| color1: '#00BFA5', | ||
| color2: '#009688', |
There was a problem hiding this comment.
why does the indentation just disappear here
There was a problem hiding this comment.
I think something happened when I saved from my editor to my server I'm honestly not sure what happened
|
|
||
| class InternetRadioExtension { | ||
| constructor() { | ||
| if (typeof Scratch !== 'undefined' && Scratch.vm) { |
There was a problem hiding this comment.
neither of these will ever be false. Scratch cant since its required to even get to this point in the code in the first place, and vm will not because PenguinMod will always unsandbox this extension.
| { | ||
| opcode: 'getFrequencyVolume', | ||
| blockType: Scratch.BlockType.REPORTER, | ||
| text: 'volume on [SIDE] side', |
There was a problem hiding this comment.
this block makes no sense. its an exact duplicate of getFrequencyBand but worse because you cant tell what frequency your actually reading.
There was a problem hiding this comment.
I'm slow I guess I forgot I already have a block that does the same thing 🙇♀️
| { | ||
| opcode: 'getFrequencyBand', | ||
| blockType: Scratch.BlockType.REPORTER, | ||
| text: 'frequency band [BAND] volume', |
There was a problem hiding this comment.
there should be a block to go with this that says what the maximum available frequency is.
| const apiUrl = `https://de1.api.radio-browser.info/json/stations/search?url=${encodeURIComponent(url)}&limit=1`; | ||
|
|
||
| return fetch(apiUrl) | ||
| .then(response => response.json()) |
|
|
||
| getInfo() { | ||
| return { | ||
| id: 'internetradio', |
There was a problem hiding this comment.
i compltely forgot to check the id 🎉 this should really include your name.
I only use AI to fix small stuff / problems in my code but not to write the entire file for me |
…dd max freq block (ithink)
Internet Radio allows you to stream live audio from any internet radio station
idk live music player extension