| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 RefPtr<RTCConfiguration> rtcConfiguration = RTCConfiguration::create(); | 76 RefPtr<RTCConfiguration> rtcConfiguration = RTCConfiguration::create(); |
| 77 | 77 |
| 78 for (size_t i = 0; i < numberOfServers; ++i) { | 78 for (size_t i = 0; i < numberOfServers; ++i) { |
| 79 Dictionary iceServer; | 79 Dictionary iceServer; |
| 80 ok = iceServers.get(i, iceServer); | 80 ok = iceServers.get(i, iceServer); |
| 81 if (!ok) { | 81 if (!ok) { |
| 82 ec = TYPE_MISMATCH_ERR; | 82 ec = TYPE_MISMATCH_ERR; |
| 83 return 0; | 83 return 0; |
| 84 } | 84 } |
| 85 | 85 |
| 86 String uri, credential; | 86 String urlString, credential; |
| 87 ok = iceServer.get("uri", uri); | 87 ok = iceServer.get("url", urlString); |
| 88 if (!ok) { | 88 if (!ok) { |
| 89 ec = TYPE_MISMATCH_ERR; | 89 ec = TYPE_MISMATCH_ERR; |
| 90 return 0; | 90 return 0; |
| 91 } | 91 } |
| 92 KURL url(KURL(), uri); | 92 KURL url(KURL(), urlString); |
| 93 if (!url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun")
)) { | 93 if (!url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun")
)) { |
| 94 ec = TYPE_MISMATCH_ERR; | 94 ec = TYPE_MISMATCH_ERR; |
| 95 return 0; | 95 return 0; |
| 96 } | 96 } |
| 97 | 97 |
| 98 iceServer.get("credential", credential); | 98 iceServer.get("credential", credential); |
| 99 | 99 |
| 100 rtcConfiguration->appendServer(RTCIceServer::create(url, credential)); | 100 rtcConfiguration->appendServer(RTCIceServer::create(url, credential)); |
| 101 } | 101 } |
| 102 | 102 |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 if (iceState == m_iceState || m_readyState == ReadyStateClosed) | 509 if (iceState == m_iceState || m_readyState == ReadyStateClosed) |
| 510 return; | 510 return; |
| 511 | 511 |
| 512 m_iceState = iceState; | 512 m_iceState = iceState; |
| 513 dispatchEvent(Event::create(eventNames().icechangeEvent, false, false)); | 513 dispatchEvent(Event::create(eventNames().icechangeEvent, false, false)); |
| 514 } | 514 } |
| 515 | 515 |
| 516 } // namespace WebCore | 516 } // namespace WebCore |
| 517 | 517 |
| 518 #endif // ENABLE(MEDIA_STREAM) | 518 #endif // ENABLE(MEDIA_STREAM) |
| OLD | NEW |