Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined is not an object (evaluating 'this.find(t).play') #242

Open
meghe2000 opened this issue Mar 20, 2023 · 1 comment
Open

undefined is not an object (evaluating 'this.find(t).play') #242

meghe2000 opened this issue Mar 20, 2023 · 1 comment

Comments

@meghe2000
Copy link

meghe2000 commented Mar 20, 2023

const AudioContext = window.AudioContext || window.webkitAudioContext
const audioCtx = new AudioContext()

function addAudio(name) {
    fetch(loader(name)).then(response => response.arrayBuffer()).then(buffer => audioCtx.decodeAudioData(buffer)).then(buffer => {
        sound.add({ [name[0]]: buffer, }, { preload: true })
    })
}
for (const n of ['1.mp3', '3.ogg', '4.mp3', '5.mp3']) addAudio(n)

//after run this function get error
sound.play('3')

The error is received only on Safari Mobile.

@meghe2000
Copy link
Author

3.ogg.zip
The rest of the sounds are played well.
But this sound gives an error on safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant