Comments (6)
The mid is the media ID the candidate corresponds to, and it should travel with it though the signaling channel. The equivalent field in the Javascript API is sdpMid
and it's mandatory.
It's mostly here because it is part of WebRTC signaling but actually ignored by libdatachannel. You can safely put an empty string there.
from libdatachannel.
Thank you for the advise you gave me, it workerd.
Does this api exist in c
std::optional<std::chrono::milliseconds> rtt = pc->rtt();
if (pc->getSelectedCandidatePair(&local, &remote)) {
cout << "Local: " << local.address << ":" << local.port << " " << local.type << " " << local.transportType << endl;
cout << "Remote: " << remote.address << ":" << remote.port << " " << remote.type << " " << remote.transportType << endl;
cout << "Bytes Sent:" << pc->bytesSent() << " / Bytes Received:" << pc->bytesReceived() << " / Round-Trip Time:";
if (rtt.has_value())
cout << rtt.value().count();
else
cout << "null";
cout << " ms";
}
from libdatachannel.
Not exactly, however you can use rtcGetLocalAddress(int pc, char *buffer, int size)
and
rtcGetRemoteAddress(int pc, char *buffer, int size)
to get both addresses.
from libdatachannel.
I just wrote a version in c, if you want i can post it?, I am fairly new to programming so it might not be perfect.
Also, the p2p does not use any signal server, how to do you do the sending of the initial information using the signalling server using c?, said another way, how do you communicate the sdp, candidate information to the server from the c code?
from libdatachannel.
Yes sure, please open a pull request.
For now you can submit it with the copy/paste instead of a signaling. As you might have seen, I opened a pull request to add websocket support, it can be used to send the SDP and candidates to a signaling server.
from libdatachannel.
Done in #65
from libdatachannel.
Related Issues (20)
- CMake script does not install STATIC library and static dependencies HOT 3
- Sending on Multiple Tracks HOT 3
- Websocket::Open crash HOT 3
- Error in build node-datachannel for webtorrent-cli HOT 2
- ABI issue when linking HOT 2
- RtpPacketizationConfig not properly initialized HOT 2
- setLocalDescription's Init parameter may not work. HOT 3
- The push function of the sendQueue in DataChannel will trigger wait and can not be awaked. HOT 3
- Client xxx not found HOT 2
- WebSocket::path() returns nullopt when state is Connecting HOT 2
- Mixed up dynamic and static libjuice dependencies HOT 1
- Source directory requires read/write filesystem during build HOT 3
- C API lacking proper closure support HOT 4
- Lost connectivity after successful connection HOT 7
- WebSocketServer not stopping properly HOT 2
- How to troubleshoot when the onGatheringStateChange function returns very slowly? HOT 1
- Websocket disconnect HOT 2
- Trouble connecting via TURN server HOT 1
- Does libdatachannel support to compile in pure C Linux system(for some embedded device no support C++17)? HOT 3
- rtc::PeerConnection::close() causes the application to crash when called multiple times HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libdatachannel.