I’m currently adding a functionnality where a moderator can force someone to unpublish his stream.
i have used the appendUserData method to add a button somewhere on the video element so that it can block a user from streaming , but i’m little confused aboute the method force unpublish by itself , what kind of parameter can it take ? i have proceded like this : var forceUnpublishButton = document.createElement(‘button’);
forceUnpublishButton.className=“bg-secondary”
forceUnpublishButton.style.float = “bottom”;
forceUnpublishButton.setAttribute(‘onclick’, ‘javascript:bloquerUser("’ + connection.connectionId + ‘");return;’);
forceUnpublishButton.innerHTML = “Bloquer”;
dataNode.appendChild(forceUnpublishButton);
but the error i get is that stream is not defined…