DOMException when playing audio with blob as source

后端 未结 2 1448
失恋的感觉
失恋的感觉 2021-01-28 17:06

Whenever I run this code

var blob = new Blob([\"ninja.mp3\"], {type:\"audio/mp3\"});
var audio = new Audio(URL.createObjectURL(blob));
audio.play().catch(err =&g         


        
2条回答
  •  长情又很酷
    2021-01-28 17:44

    The DOMException interface represents an abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. This is basically how error conditions are described in web APIs.

    I think you call the method wrongly. Pls Check it.

提交回复
热议问题