Jump to content

catching audio load errors


Mike018
 Share

Recommended Posts

const filenames = ['test1', 'test2']

forEach(filenames, filename => {
      try {
        this.load.audio(filename, './audio/' + filename + '.mp3')
      } catch (error) {
        console.log('Failed to load:', filename + '.mp3')
      }
    })

Seems this.load.onFileError.add(console.log, this) doesn't work either.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...