Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@messagebird/webrtc
Advanced tools
To enable your application to make and receive calls over WebRTC, you have to instantiate a new WebRTCClient (TODO: good name? Device). To instantiate a client and authenticate with your MessageBird account you need to generate a JWT and pass it to the client (docs)
const client = new WebRTCClient({
displayName: 'test',
username: 'test',
jwt: 'test',
});
// Open a connection to the MessageBird WebRTC API
client
.connect()
.then(() => {
// Ready to start and receive WebRTC connections.
})
.catch(error => {
// Error making a connection. The error object contains details of the failure.
});
Make sure you've instantiated the WebRTCClient
and opened the connection by calling the .connect()
method. After succesfully instantiating a new client you can start new RTC sessions by calling the starRTCSession
method.
client
.startRTCSession({
to: '+31612345678', // TODO: This will become `flowId` probably?
onEnded() {
console.log('session was ended');
},
})
.then(connection => {
// resolves with a connection object (docs)
})
.catch(error => {
// Failed to start a session, error object contains details.
});
constructor()
startRTCConnection()
connect()
Connect to the
on('connected')
When the client connects. Can be called multiple times in case the client disconnects and automatically reconnects.
on('disconnected')
When the client disconnects for a certain reason. (docs on data object with reason)
The RTCSession
object describes an ongoing RTC session. You will never instantiate an RTCSession
yourself, the SDK will take care of that for you.
disconnect()
Terminates the session
on(name, handler)
Bind a new event listener. See Events (link) below
removeEventListener(name, handler)
Removes an event listener
on('confirmed')
on('failed')
on('ended')
FAQs
Documentation can be found at https://developers.messagebird.com/docs/webrtc
The npm package @messagebird/webrtc receives a total of 3 weekly downloads. As such, @messagebird/webrtc popularity was classified as not popular.
We found that @messagebird/webrtc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 38 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.