This event is fired if getUserMedia request is failed
connection.onMediaError = function (error) { // error.name == 'PermissionDeniedError' etc. // error.message // error.constraintName // error.session --- original session that is used to capture media }