Open sanindya-iiitd opened 3 years ago
Unfortunately player implementation does not support Safari browser. Use Firefox or Chrome instead
I agree with @bufgix. Have you tried to play a mod on modarchive.org?
I see. No, the online player on modarchive.org doesn't work in Safari either. Any idea if this could be due to https://github.com/OpenMPT/openmpt or https://github.com/deskjet/chiptune2.js?
I tried this demo in Safari and it works: https://deskjet.github.io/chiptune2.js/#
No, the online player on modarchive.org doesn't work in Safari either.
That's why CMF's player doesn't work as well. The players are identical.
Any idea if this could be due to https://github.com/OpenMPT/openmpt or https://github.com/deskjet/chiptune2.js?
On point. I believe that it's an optimization issue about OpenMPT or the chiptune library. Modarchive.org uses a modified version of chiptune2 afaik.
Also some Android browsers play the track very choppy or don't play it at all.
I tried this demo in Safari and it works: https://deskjet.github.io/chiptune2.js/#
We have to get to the bottom of this. Unfortunately I and @bufgix couldn't have the time to really dive into the OpenMPT and see what's going on under the hood. We're still lack of knowledge and data.
Good thing that somebody pointed this out again :p
Problem:
...and it doesn't work. :P
Can play .s3m files in Safari though. I downloaded a file (shock09.mod) from modarchive and uploaded into https://deskjet.github.io/chiptune2.js/# and it plays fine.
Weird.
Can surprisingly play mod files too now (in Safari, yes).
Weirder.
I tried setting up in my local:
npm install
npm run build
npm run start
homepage loads. But, as soon as I click on "randombtn" like "Where the mods at?", it crashes.
Page says:
An unexpected error has occurred.
Console shows this:
framework.e11e4af83f0aa0812396.js:formatted:5405 TypeError: Cannot read property 'replace' of undefined
at index-c8dde9fa7d0c5cb71134.js:1
at Ye (index-c8dde9fa7d0c5cb71134.js:1)
at Je (index-c8dde9fa7d0c5cb71134.js:1)
at qi (framework.e11e4af83f0aa0812396.js:formatted:4029)
at yo (framework.e11e4af83f0aa0812396.js:formatted:6800)
at su (framework.e11e4af83f0aa0812396.js:formatted:6343)
at uu (framework.e11e4af83f0aa0812396.js:formatted:6336)
at eu (framework.e11e4af83f0aa0812396.js:formatted:6113)
at framework.e11e4af83f0aa0812396.js:formatted:3291
at t.unstable_runWithPriority (framework.e11e4af83f0aa0812396.js:formatted:306)
I have no clue how to deal with this (haven't worked with front-end like ever). Any leads?
Or any tips on how to set this in local?
I used yarn
for development. So basically run yarn
for resolving dependencies and yarn dev
for starting the development server.
Only issue is yarn.lock
being outdated right now. (We should yarn upgrade
and fix errors ASAP @bufgix) But I don't think it will affect you since current state of the repository should build just fine.
Does changing the audio context affect the other platforms and have you had the chance to test them?
And yes, unfortunately different formats behave differently. I'm still sus of OpenMPT about that. I gues we can never know without further testing and a bit of code-diving.
I used
yarn
for development. So basically runyarn
for resolving dependencies andyarn dev
for starting the development server.
Thanks. I was running into issues with markdown-to-jsx
(Help.md
linked with BackSideContent
). I came across the meta
, viewport
tags issue and followed this fix but in vain. Eventually, I just replaced <BackSide content={backSideContent} />
with <BackSide content="Sample Help." />
and it worked. (It was maybe due to the github credentials used to fetch Help.md
.)
Does changing the audio context affect the other platforms and have you had the chance to test them?
AudioContext
change (adding prefix window.
or enclosing window[]
). CMF and chiptune2-demo already had it.
chiptune2.js
and added the window.
prefix. However, it did not help in Safari, so didn't check on other platforms.Meanwhile, I did (accidentally) find a way to make CMF play audio on Safari:
And yes, unfortunately different formats behave differently. I'm still sus of OpenMPT about that. I gues we can never know without further testing and a bit of code-diving.
I did some code-diving today. And, the problem seems to be with the createScriptProcessor()
method. The returned AudioNode
object has different property values:
According to W3C Candidate Recommendation and W3C Editor's Draft, we should see the first set.
I noticed, in Safari the onaudioprocess
event is never triggered and I think this might be a consequence of the misconfigured AudioNode object.
Another thing I learned, ScriptProcessorNode
is to be deprecated in favour of AudioWorkletNode
and Safari doesn't support AudioWorkletNode
as of now.
Can you suggest how to further investigate why uploading a mod to chiptune demo fixes the playback for CMF? I tried this workaround with local CMF but it didn't work.
Hey again, Sorry for the late reply. Unfortunately we couldn't reproduce the workaround method you mentioned. I personally don't have a proper setup to test the issue but @bufgix checked the audio context and saw the same logs that you referred. At this point I'm not quite sure what else we can do other than re-implementing the chiptune library with the latest version of OpenMPT. I still think we should have to have more knowledge by working on the low-level stuff. Thank you for your efforts regarding to that.
I tried:
Safari: Version 14.0 (15610.1.28.1.9, 15610)