Android IOS WebRTC Audio Video Development Summary (11)

Source: Internet
Author: User

This article mainly introduces WEBRTC inside of the Stun,turn service installation and configuration (reprint please indicate source: Http://, RTC. Blacker)

Speaking of the role of Stun,turn services, I believe many people know that the main processing and forwarding, with the completion of the ice protocol. But a lot of people don't know how to build it.

In fact, not the key is not familiar with Linux or not contact Linux, if familiar with Linux and then carefully read the relevant documents, it should not be difficult to complete the process.

There are many versions of Linux, this article mainly introduces the building process on UBUNTU14:

1. $ wget<......>/turnserver-< >.tar.gz 

2.$ tar xvfz turnserver-<...>.tar.gz

3.$ CD turnserver-<...>

4.$ sudo apt-get update

5.$ sudo apt-get install Gdebi-core

6.$ sudo gdebi coturn*.deb

------above 6 steps to complete the download and installation of the Stun,turn service

7.$ Turnadmin-a-B turnserver.config-u username-r password

------Add Users

8.$ Turnserver-c-B turnserver.config-u username-r password-a-f-v

-------Start the Stun,turn service

The above 8 steps complete the installation and configuration of the Stun,turn service, followed by the configuration in the client script (*.*.*.* represents its own IP):

1 iceservers: [2                   {"url": "Stun:*.*.*.*},
3 {"url": "Turn:*.*.*.*", "Credential": "username", "username": "Password"} ]5      

At last:

1,stun and turn services can not only be used in the WEBRTC can also be used in other places, of course, the WEBRTC to achieve the hole and forwarding you can also achieve.

2, some people will be asked in the client JS inside can directly see username and password, will not be unsafe? The answer is yes, how to solve it? Please continue to pay attention if you are interested.

Above, if errors and omissions, please correct and supplement, greatly appreciated! Rtc. Blacker.

Android IOS WebRTC Audio Video Development Summary (11)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.