MediaElementAudioSource outputs zeros due to CORS access restrictions local mp3 file

前端 未结 1 469
一个人的身影
一个人的身影 2020-12-09 15:32

I have the following html page that I\'m trying to show a class for demonstrating an audio visualizer with an mp3 stored locally:




        
相关标签:
1条回答
  • 2020-12-09 15:49

    Just after initializing the Audio object, add the following:

    audio.crossOrigin = "anonymous";
    

    This should prevent the CORS access restriction.

    0 讨论(0)
提交回复
热议问题