当前位置:网站首页>Easyrtc call error `failed to execute'send'on'rtcdatachannel'
Easyrtc call error `failed to execute'send'on'rtcdatachannel'
2022-06-24 06:26:00 【Tsingsee green rhino video】
WebRTC The existence of Internet brings a new mode to online video conference system ,TSINGSEE Qingxi video development of web video conference system EasyRTC A combination of webrtc and rtmp/rtsp The advantages of the scheme , Support one-to-one 、 One to many video conference interactive calls , Meet voice social networking 、 Online education and training 、 Video conference and telemedicine , new EasyRTC The project will meet you soon .
In the test EasyRTC The new version of point-to-point call function , There is an error :Failed to execute ‘send’ on ‘RTCDataChannel’: RTCDataChannel.readyState is not ‘open’, And can not successfully send messages to the other party .
See the code below :
// Instantiate the send channel
sendChannel = localConnection.createDataChannel('webrtc-datachannel');
//onopen Event monitoring
sendChannel.onopen = this.onSendChannelStateChange;
//onclose Event monitoring
sendChannel.onclose = this.onSendChannelStateChange;The above code does not find errors , Therefore, it is suspected that the problem of calling sequence leads to . Look at the code again , Found sending offer After the message , The corresponding data transmission channel is created , The problem may arise here .
To solve this problem , We will adjust the code sequence as follows :
// Instantiate the send channel
sendChannel = localConnection.createDataChannel('webrtc-datachannel');
//onopen Event monitoring
sendChannel.onopen = this.onSendChannelStateChange;
//onclose Event monitoring
sendChannel.onclose = this.onSendChannelStateChange;
try {
console.log('localConnection Create proposal Offer Start ');
// Create proposal Offer
const offer = await localConnection.createOffer();
// establish Offer success
await this.onCreateOfferSuccess(offer);
} catch (e) {
// establish Offer Failure
this.onCreateSessionDescriptionError(e);
}After modification , Can send messages normally .
边栏推荐
- Reasons for automatic allocation failure of crawler agent IP
- CLB unable to access / access timeout troubleshooting
- A plate processing device of network separator which can adapt to different line port positions
- Differences between JSON objects and JSON strings
- How to resolve the domain name? How to choose a domain name?
- Provide SFTP connection for Amazon S3
- Excellent tech sharing | research and application of Tencent excellent map in weak surveillance target location
- Is IPFs a new national infrastructure project? What impact will the new infrastructure have on IPFs?
- What is the difference between level 1, level 2 and level 3 domain names? How to register domain names
- The gadgets developed by freshmen are popular. Netizen: my food is good
猜你喜欢

Manual for automatic testing and learning of anti stepping pits, one for each tester

The product layout is strengthened, the transformation of digital intelligence is accelerated, and FAW Toyota has hit 2022million annual sales

Technology is a double-edged sword, which needs to be well kept
![[fault announcement] one stored procedure brings down the entire database](/img/7c/e5adda73a077fe4b8f04b59d1e0e1e.jpg)
[fault announcement] one stored procedure brings down the entire database

A cigarette of time to talk with you about how novices transform from functional testing to advanced automated testing
Oracle case: ohasd crash on AIX

Enter the software test pit!!! Software testing tools commonly used by software testers software recommendations
Fault analysis | using --force to batch import data leads to partial data loss

ServiceStack. Source code analysis of redis (connection and connection pool)

What is the difference between a white box test and a black box test
随机推荐
Get the short video! Batch download of Kwai video (with source code)
How to record the domain name reliably? What are the consequences of not filing a domain name?
How to register a domain name? What are the benefits of building a website?
Continuously evolving cloud native application delivery
Web automated testing (1): further discussion on UI development history and UI and function automated testing
Tencent cloud VPC machine, no image when installing monitoring components
Little transparent apprentice's way to go ashore
Technology is a double-edged sword, which needs to be well kept
Tencent security release data security compliance capability map
A plate processing device of network separator which can adapt to different line port positions
10 year old drivers who have been engaged in software testing tell you what type of software is suitable for automation
Neighbor vote: use proximity voting to optimize monocular 3D target detection (ACM mm2021)
Royal treasure: physical storage medium
Network Overview
A rail grinder for rail transit
What is the difference between a white box test and a black box test
Tensorflow daily essay (I)
25 classic selenium automated interview questions, collect them quickly
Just now, we received a letter of thanks from Bohai University.
Analysis on the influence of "network security policy issued successively" on Enterprises