Comments (4)
Right, for now JsSIP ignores WebSocket binary messages. Does your suggested code convert the received binary data into a real JS string that can be later parsed by JsSIP SIP parser?
BTW when JavaScript receives a WS "binary" message it calls onmessage(data)
, and such data is:
Blob
(in case WebSocketbinaryType
attribute is set to "blob", which is the default value).ArrayBuffer
(in case WebSocketbinaryType
attribute is set to "arraybuffer").
It seems that using ArrayBuffer
is more efficient in case the data will be managed in memory (rather than storing in disk).
Which mode should JsSIP use for binary data? which one will work with your suggested code?
Thanks a lot!
from jssip.
Yes, it is convert. But I did not test it w/ non-ascii symbols.
I did not change anything else. But connect function already has mode selection.
/**
* Connect socket.
*/
connect: function() {
var transport = this;
....
this.ws.binaryType = 'arraybuffer';
PS. Actually, I am not js developer.
from jssip.
Ok, I will test it by sending a WebSocket binary message to JsSIP after implementing your code, let me sometime to do it. Thanks a lot.
from jssip.
It works, commited. Thanks a lot!
from jssip.
Related Issues (20)
- UnMute Call HOT 2
- How not to get microphone permission HOT 1
- For SIP server Account Register Working? HOT 2
- Abnormal session cancellation method under race condition
- Type definition errors in 3.10.0 HOT 1
- Error when getting video track status on Firefox
- Play audio or tone to remote user. HOT 2
- The new JsSIP.UA(configuration).call method does not return the status after execution
- import JsSIP from "jssip"; 打印JsSIP undefined HOT 2
- Error 'setLocalDescription' on Chrome HOT 1
- BYE: Request-URI does not point to us HOT 34
- Incorrect SDP a=sendrecv in firefox HOT 7
- I want to send and Receive message using JSSIP
- Sending a silent stream on latest Chrome HOT 1
- Error when trying to change the microphone during a call HOT 1
- Add custom header JsSIP - Asterisk HOT 1
- JsSIP processing re-INVITE HOT 1
- SDP is cut off between recieving 200 OK and the sdp event being emitted HOT 2
- On iOS, navigator.mediaDevices is `undefined` unless page is served in a secure context, but Errors are swallowed
- Why is there a 2-second delay when exiting? According to the source code, it seems to have no practical significance. HOT 3
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 jssip.