SIP.js
SIP.js copied to clipboard
DOMException: The play() request was interrupted by a new load request. [email protected]
I am still encountering this error during outbound call using version 0.15.6
DOMException: The play() request was interrupted by a new load request.
No audio was being played on both ends
This can be referenced on this issue: https://github.com/onsip/SIP.js/issues/564
Debug error:

Anyone has the solution?
i got this error too
I solved it a while ago by modifying a little bit the assignStream function (from here)
to be the following one:
// Assign a MediaStream to an HTMLMediaElement and update if tracks change.
private assignStream(stream: MediaStream, element: HTMLMediaElement): void
{
// Set element source.
element.autoplay = true; // Safari does not allow calling .play() from a non user action
element.srcObject = stream;
element.addEventListener("canplay", function (e)
{
var playPromise = element.play();
if (playPromise !== null)
{
playPromise.catch((error: Error) =>
{
console.error("Failed to play media");
console.error(error);
});
}
});
element.load();
}
Addressed in 0.17.0 or 0.18.0. See docs here