A.Blanc
A.Blanc

Reputation: 433

Could not complete the operation due to error c004e005

I have a delay function as below:

 var delayToggle = (function () {
        var timer = 0;
        return function (callback, ms) {
            clearTimeout(timer);
            timer = setTimeout(callback, ms);
        };
    })();

I call this when I click on video/audio toggle button. Invoking it as follows:

delayToggle(toggleMyVideo, 500);

On Edge it gives this error:

Could not complete the operation due to error c004e005.

I am not sure what the error is and how to fix it. Any ideas?

Upvotes: 0

Views: 260

Answers (1)

A.Blanc
A.Blanc

Reputation: 433

I found what was going on. When I toggled the video on Edge I restarted the whole peer connection establishment with the existing audio stream (and new video stream depending on whether video was toggled on or off), so when I tried to add audio to my audio element, there already was the existing one with the same id which threw the error. Added a check there, the error isn't showing.

Upvotes: 1

Related Questions