Uncaught (in promise) DOMException: The element has no supported sources

19,379

Its the cors access restriction issue

add

crossOrigin="anonymous"

inside your audio tag

<audio media-player="audioPlayer" autoplay controls="controls" preload="auto" id="audioElement"
                crossOrigin="anonymous" src="{{audio}}"></audio>

Share:
19,379
Sabreena
Author by

Sabreena

Updated on June 19, 2022

Comments

  • Sabreena
    Sabreena almost 2 years

    Using music-frequency-d3 for audio visualization in my AngularJs application, created a bower component for this using music-frequency-d3, but when I insert the web address of my audio as src attribute's value it shows the error below.

    Uncaught (in promise) DOMException: The element has no supported sources

    what is the problem here? how can I play the audio using the web address URL?

    Thank You

  • James Walker
    James Walker over 4 years
    Worked B4.. it'll work again..
  • parsecer
    parsecer about 2 years
    How to do it when working with new Audio object in js code?