crocodilertc / crocodile-rtc Goto Github PK
View Code? Open in Web Editor NEWSimplified web-based real-time communications built around WebRTC, SIP, MSRP, and XMPP
License: MIT License
Simplified web-based real-time communications built around WebRTC, SIP, MSRP, and XMPP
License: MIT License
Seen a couple of occasions where a deleted contact is immediately added again. I believe this is generally due to attempting to remove a contact twice. This ends up with the server sending two roster pushes removing the contact - the second push incorrectly triggers the onNewContact event.
At startup, we currently attempt to check media source availability by requesting access using getUserMedia, then immediately closing the stream again afterwards. This can be replaced with code that checks the output of MediaStreamTrack.getSources() (previously getSourceInfos), which is available in Chrome 30+.
Add API to allow sending and receiving of DTMF tones. Default to using the WebRTC API, which should use telephone-event RTP packets as per RFC 4733, but allow the application to choose to use SIP INFO messages if desired (send via the JsSIP DTMF API).
While here we should consider renaming connect/disconnect to start/stop, to make it more obvious that the SDK handles retries.
Currently neither JsSIP nor the SDK support reINVITEs. This prevents media renegotiation (changing media streams, hold/resume), and causes difficulty with supporting session timer.
One is an empty presence, the other has a tag in it. Jitsi ends up spamming availability messages in it's chat window thanks to this.
Found following discussion with @jfend.
My testing has shown that the XMPP server only automatically sends presence information the first time you request the full roster. This means that calling getContacts later will lose the presence information for an extended period of time - probably the next time that contact changes their presence, unless we provide a way of requesting a refresh. Rather than flooding the network with presence requests, I plan to change the code to transfer any presence information from the old contact list to the new one.
If the data transport is not explicitly selected by the application, we need to automatically select the most appropriate one, based on the data being sent. Currently we just default to page mode.
Some of the variables we might want to consider:
When sending XHTML over XMPP, we also send a plain text version of the message in the <body>
tags. Currently the plain text is just the XHTML with the tags stripped out; it would be better to apply some basic formatting to make the two versions more similar. For instance:
<p>
and <br/>
with appropriate line breaks.<ul>
into bullet points using "*" or "-".<ol>
into a numbered list.How useful this enhancement is depends on how likely we are to see XMPP clients that don't support XHTML-IM (XEP-0071).
Though client applications are likely to use it, the library has very little dependency on jQuery, and thus it would be better to remove the dependency and give the application more freedom to choose something else.
I think our use of jQuery is limited to a few jQuery.extend and jQuery.ajax calls. The extend could be replaced with a function in Util, and the ajax calls could be done directly with XmlHttpRequest.
We want the client to be handling session timer refreshes, rather than the network. Also depends on issue #4.
Should continue to use the bare JID until a proper user response is received. Locking on to composing notifications is probably less bad than delivery receipts, but better to only lock on when receiving a real message.
SDK fires onData event as if data has been received when it is actually an error response.
While testing MSRP data sessions between Safari and Chrome, I was getting an error sending from Safari to Chrome. This was the error from Safari:
TypeError: 'undefined' is not a function (evaluating 'this.blob.slice(this.sentBytes, end)') crocodile-rtc.js:22848
So I logged out this.blob
on line 22848 and found out that Safari is looking for blob.webkitSlice
instead of blob.slice
.
I fixed it with this code:
if(typeof this.blob.slice === 'function') {
chunk.body = this.blob.slice(this.sentBytes, end);
}else if(typeof this.blob.webkitSlice === 'function'){
chunk.body = this.blob.webkitSlice(this.sentBytes, end);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.