Gives the error "[Error] ReferenceError: Can't find variable: AudioContext - VGMPlay_WebAudio (vgmplay-js-glue.js:137)" on macOS Safari 11.0.1 (High Sierra 10.13.1). Shockingly, I think Safari still uses the prefixed webkitAudioContext for its work, so I'd suggest you have that fallback as well.niekniek wrote:Ok, I guess it's at 95% stable now. I've been updating the post above about my todo list, I'll keep working on that. If you want you can build your own Emscripten 'binary' & data file but you can also get it from http://vlessert.nl/vgmplay-js/
General JavaScript VGM player discussion
Technical discussion about the VGM format, and all the software you need to handle VGM files.
Moderator: Staff
They do; thx, fixed.neologix wrote:Gives the error "[Error] ReferenceError: Can't find variable: AudioContext - VGMPlay_WebAudio (vgmplay-js-glue.js:137)" on macOS Safari 11.0.1 (High Sierra 10.13.1). Shockingly, I think Safari still uses the prefixed webkitAudioContext for its work, so I'd suggest you have that fallback as well.
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
btw, I'm aware of bugs in the progress bar. Works fine when not changing tabs, but when you leave the player, a next track starts and you go back to the player tab it'll probably not work.. but I'm curious how you will approach this. The playback and webaudio part is separated from the graphical and gui stuff.
After some experience with the webplayer with my phone I can conclude it has even more issues. For example it won't skip to the next track all the time when the normal playback time has passed. It has probably something to do with the fact that stuff stops when the tab is not active (since the phone is in my pocket, locked), so the callback to the function that starts the next track never happens or much later, whatever the implemented behaviour of Android & Chrome on Android is. I guess something with webworkers is required to fix this, if that'll even work when the phone is locked. Since phones are optimized for battery saving I suppose even webworkers won't work. But then again, playback will stop anyway when Android decides it needs to kill the browser, so the native Android player is always preferred. The question is if the behaviour on the desktop browser is the same. I don't think so, because I'm currently listening and it skips just fine on the other tab. Any thoughts on this?
By the way, the version on Github does not have a fix for the IOS handling of Webaudio, the version on vlessert.nl does; webaudio needs to be activated by a user-initiated event, like with a button, otherwise it just won't work.
By the way, the version on Github does not have a fix for the IOS handling of Webaudio, the version on vlessert.nl does; webaudio needs to be activated by a user-initiated event, like with a button, otherwise it just won't work.
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
Hey vampirefrog, I've been experimenting a bit more with the javascript player, I've been downloading and extracting zip files in javascript so I can just input a vgmrips.net archive. My conclusion is that it works fine, but it just takes too long to download and extract the files in memory and start playback for a nice user experience. I can code a lot around that with offline storage and everything, but it'll simply be never like the mp3 files.
So for smooth playback of the whole vgmrips archive I would need direct access to the all vgz files. Would you think it's possible to offer that with decent performance through some PHP code?
So for smooth playback of the whole vgmrips archive I would need direct access to the all vgz files. Would you think it's possible to offer that with decent performance through some PHP code?
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
The site already does that. It extracts one file on the server side wiht a php script: http://vgmrips.net/packs/vgm/Other/The_ ... 20Lair.vgz
If you want to emulate this behavior, you can write a simple php script with ZipArchive that takes the name of the zip and the name of the file to be extracted. I think you can use the zip_open() example from here. If you want I can write it for you.
If you want to emulate this behavior, you can write a simple php script with ZipArchive that takes the name of the zip and the name of the file to be extracted. I think you can use the zip_open() example from here. If you want I can write it for you.