Log In  

Don't know if this is related to the recent audio fixes, but ever since then, I have not been able to load PICO-8 carts in Safari. When trying to load, the output to the console is:

TypeError: undefined is not an object (evaluating 'audio_context.createScriptProcessor')
fpico8_wa4.js:1
dipico8_wa4.js:619
bpico8_wa4.js:620:177
Aepico8_wa4.js:621:145
(anonymous function)pico8_wa4.js:622:323

Safari 9.0.3
Mac OS X El Capitan 10.11.3

P#19158 2016-03-10 04:45 ( Edited 2017-11-01 10:20)

:: Scathe

@zep this appears to be an issue with Safari using their own vendor prefix for AudioContext. If so, it's a pretty easy fix. Just change your declaration of audio_context (I think is what you called it?) to:

var audio_context = window.AudioContext || window.webkitAudioContext;
P#19161 2016-03-10 10:46 ( Edited 2016-03-10 15:46)
:: zep

Thanks Scathe -- it should be working now. Tested on Firefox, Chrome and Safari.

P#19171 2016-03-11 04:31 ( Edited 2016-03-11 09:31)

Works for me, too. I think this might have also fixed this problem as well. Thanks for the timely fix!

P#19173 2016-03-11 05:15 ( Edited 2016-03-11 10:15)

Awesome. Sound works now too!

P#19175 2016-03-11 09:43 ( Edited 2016-03-11 14:43)
:: Scathe

The bad news though is that, if you export your games as HTML5 in 0.1.5 and host them on your own server, the sound still won't work in Safari, and in all browsers except Firefox, the audio is crackly.

The good news though is that in another thread (here), Zep said he was incorporating the audio fixes into 0.1.6, so whenever that comes out it should be good to go!

A temporary workaround in the meantime might be to use this, but I haven't tried it yet. It does however use the script that the BBS uses to play carts, but you will need to change the URL in the picoloader.js file on line 21 from "https://www.lexaloffle.com/bbs/pico8.js"; to "https://www.lexaloffle.com/bbs/pico8_wa5.js";. I'd actually recommend downloading that JS file and not hotlinking it here, as it costs Zep bandwidth. I think there's also a .dat file needed as well (the actual Pico-8 custom binary for ASM.js/emscripten, I assume), but I'm not sure. EDIT: yes, it does, it's here - ignore the instructions in the repo that say to use the ".data" file - it exists but is probably an old build, use the ".dat" one I just linked.

I don't own that repo and it looks like it hasn't been touched in 6 months, but maybe I'll make a repo to do something like this, just leave a comment here if interested. If not I probably won't bother, as I'm sure 0.1.6 isn't really that far off anyway.

P#19180 2016-03-11 20:15 ( Edited 2016-03-12 01:47)
:: zep

0.1.6 will be available around next weekend, so that might be the easiest solution. I should add for anyone reading this, I have no problem with authors grabbing (or even hotlinking) the bbs .js player as a temporary solution as long as it's to distribute / play their own cartridges (or of course, with permission from the author).

Soonish there will also be a youtube-style embeddable player ready, where each cartridge can be flagged as either playable off-site or playable only on the bbs, via a checkbox.

P#19187 2016-03-12 05:04 ( Edited 2016-03-12 10:04)
:: Scathe

"Soonish there will also be a youtube-style embeddable player ready, where each cartridge can be flagged as either playable off-site or playable only on the bbs, via a checkbox."

Does that mean that authors can choose to actually make their games completely closed source? As in, downloading the .png itself, it won't even load in the desktop app? If so, that's actually good for devs who might decide to try and sell their games (and don't want someone who buys it to rip off their source and rebrand it). Although I'm not quite sure how selling it closed-source would work if it could only run on the BBS... maybe another flag that disables the editor for that cart? Or, if someone only wanted it to be runnable on their own site, could the domain restriction be configurable?

Don't mind me, I'm just throwing out questions and ideas, not necessarily suggestions or requests. I have no idea if anyone would be interested in the things I mentioned anyway, just random thoughts :P

I did notice though that sites like itch.io have quite a few games made in Pico-8 that aren't even on the BBS. My first thought was that they probably don't want people to get the source code, graphics and sounds, but it could be anything really.

P#19189 2016-03-12 05:53 ( Edited 2016-03-12 11:04)

It seems that sound/music isn't working on iOS Safari on my iPhone 6.

The BBS web player isn't playing sound as well anything local I try.

Hitting the "Sound" web player control does toggle the music on/off as per the message on screen but not actual sound out the speakers either way.

Anyone experiencing this too? Is it a setting in Safari or something in the exported code?

P#45529 2017-10-27 22:52 ( Edited 2017-10-28 02:52)
:: solar

I want to note that the sound problem morningtoast is talking about (Safari on iOS) has always been a problem for me, not just since the update today.

P#45530 2017-10-27 23:35 ( Edited 2017-10-28 03:42)

Same here, sound doesn't work for me on any mobile browser (on iPhone 6).

Maybe something is getting logged to the mobile browser console though? I'll have to check.

P#45764 2017-11-01 06:20 ( Edited 2017-11-01 10:25)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-08-10 16:57:09 | 0.007s | Q:23