// if local or remote stream is muted connection.onmute = function(e) { e.mediaElement.setAttribute('poster', '//www.webrtc-experiment.com/images/muted.png'); }; // if local or remote stream is unmuted connection.onunmute = function(e) { e.mediaElement.removeAttribute('poster'); };