Fix misspelled error types

ErrNoTurnCredencials => ErrNoTurnCredentials
ErrTurnCredencials => ErrTurnCredentials
This commit is contained in:
Vicken Simonian
2019-10-17 20:40:44 -07:00
committed by Sean DuBois
parent d0ec72397e
commit 27f93a7f3d
6 changed files with 19 additions and 18 deletions

View File

@@ -34,24 +34,24 @@ func (s ICEServer) validate() ([]*ice.URL, error) {
if url.Scheme == ice.SchemeTypeTURN || url.Scheme == ice.SchemeTypeTURNS {
// // https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3.2)
// if s.Username == "" || s.Credential == nil {
// return nil, &rtcerr.InvalidAccessError{Err: ErrNoTurnCredencials}
// return nil, &rtcerr.InvalidAccessError{Err: ErrNoTurnCredentials}
// }
// switch s.CredentialType {
// case ICECredentialTypePassword:
// // https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3.3)
// if _, ok := s.Credential.(string); !ok {
// return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredencials}
// return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredentials}
// }
// case ICECredentialTypeOauth:
// // https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3.4)
// if _, ok := s.Credential.(OAuthCredential); !ok {
// return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredencials}
// return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredentials}
// }
// default:
// return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredencials}
// return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredentials}
// }
return nil, errors.New("TURN is not currently supported in the JavaScript/Wasm bindings")
}