Closed DenisKincses closed 1 year ago
Does packaging it with electron work? Also, what operating system are you on. Are you using the desktop app or the broswer version? And if you are packaging to html single file, then what browser are you opening the file on?
Does packaging it with electron work? Also, what operating system are you on. Are you using the desktop app or the broswer version? And if you are packaging to html single file, then what browser are you opening the file on?
Sorry for not responding quicker, I'm using Windows 10 21H2, packaged to HTML single file, using the Desktop app of Turbowarp, and using Brave as the browser.
I had my friend test it out on his computer, he uses Windows 10, Opera GX. He had the same issue as me.
Try packaging it with electron.
Will try that
Also, on the html build, open the console, and show a screenshot of the logs.
HTML
on electron works perfectly fine
it does play the file in HTML, but whatever reason it's an error
Because you put a local adress on it. Web pages can't access local files without a prompt. Upload the sounds to a website and use the link, or put them in the same folder as the html file. If you share your project without doing this, other people won't be able to hear the sound.
yeah but i made it so that you could put your own music in the project with a local address
also i couldn't even share this project because it's using custom extensions that Scratch doesn't support
By share, I mean share the html file with others, also, this will be fixed with #173 , using the files extension. GarboMuffin has to approve the code first, so you'll have to wait.
oh i see, well i will be sticking with electron until the files extensions will be released
It looks like your sound can't be loaded into scratch's sound engine properly, if that happens it loads as a standart audio object which can't access scratch's advanced sound options
And that is caused by what I mentioned.
173 was merged
As far as I can tell #173 is mostly not related to this
173 was merged
As far as I can tell #173 is mostly not related to this
read this:
By share, I mean share the html file with others, also, this will be fixed with #173 , using the files extension. GarboMuffin has to approve the code first, so you'll have to wait.
It is related, and you can just load the new file extension now, and use that to get the music file from your pc. This issue can be closed.
It is related, and you can just load the new file extension now, and use that to get the music file from your pc. This issue can be closed.
Am I missing something or what you're saying is that the user would need to manually load the sounds via the files extension each time so this doesn't occur? I don't think the issue is about this since you could get sound data uri easily enough before that.
it's probably easier since they can pick the file instead of writing the path
it's probably easier since they can pick the file instead of writing the path
I'm talking about the fact that you would have to pick the file each time manually, and you don't even need to do that since you can just convert the file to data uri and store it in a variable, which was possible before #173. The issue is about the sound not working with the html build but working with other builds like electron or in the editor, as I'm assuming by the title
It is related, and you can just load the new file extension now, and use that to get the music file from your pc. This issue can be closed.
Am I missing something or what you're saying is that the user would need to manually load the sounds via the files extension each time so this doesn't occur? I don't think the issue is about this since you could get sound data uri easily enough before that.
You are not getting what this issue was created for at all. OP wants to let users open a file FROM the project and the issue was that they were using a local address outside of the html file folder, so it didn't work. The new files updated fixes that by letting you pick FROM the project and returning a data uri. The sound is played correctly. Read the error here.
It is related, and you can just load the new file extension now, and use that to get the music file from your pc. This issue can be closed.
Am I missing something or what you're saying is that the user would need to manually load the sounds via the files extension each time so this doesn't occur? I don't think the issue is about this since you could get sound data uri easily enough before that.
You are not getting what this issue was created for at all. OP wants to let users open a file FROM the project and the issue was that they were using a local address outside of the html file folder, so it didn't work. The new files updated fixes that by letting you pick FROM the project and returning a data uri. The sound is played correctly. Read the error here.
You are not getting what I'm trying to say, what I'm trying to say is that you could do all that before the files extension was updated, and you don't even need it because it only allows for manual file loading and can't load files on itself, thus not actually resolving the issue. The issue is about sound not working in the standalone html build but working when using electron and in the editor. I've seen the CORS error and I just need to clarify if the OP is using the desktop editor or the web version, if it's turbowarp desktop then the issue is resolved due to the fact that most browsers don't allow html to open files, but it is allowed in tw desktop and the electon build because they are not opened via browser. If it's the web turbowarp and it works there, then it is a browser that allows opening files (which is extremely rare), and the html build not working is actually a bug, either the extension's or the packager's, to fix which we'll need to ask garbomuffin.
Projects being able to read resources from file:// was never intended. If you think it should be, open a new issue
Just recently found this out, I was trying to use the pitch and the volumes from the Sound (Scratch) with the Sound (extension) when packaged, but it didn't do anything.
Don't really know what the cause is, since I checked in the editor and it works perfectly fine.