XMPPFramework can i use XEP-0065 for video chat - xmpp

I used ObjC XMPPFramework for organize chat(1-1, room) in my application.
We need implement live video chat. I know, that Jingle is the best solution for this, but it doesnt't implemented in XMPPFramework.
But, there is XEP-0065 implementation, and it says:
The bytestream can be either direct (peer-to-peer), The typical transport protocol used is TCP, although UDP can optionally be supported as well.
So, i have an idea - transfer video byte stream through XEP-0065
Can i do this?
I know, i'm just searching more easier way to do that. I see, that Jingle have a lot of XEPs - xmpp.org/about-xmpp/technology-overview/jingle - is XEP-0166 is all i need OR i must implement other XEPs(e.g. 0167, 0176) ?

For video chat, the cleanest way is to implement XMPP Jingle protocol on the client side.
You need to have a look at the specification:
http://xmpp.org/extensions/xep-0166.html
To my knowledge it is not implemented in XMPPFramework, so you will have to add it.

Related

Using mediasoup server from flutter dart client with no mediasoup-client

I want to use mediasoup server from flutter app for two use cases.
Send stream to server to record on the server side (preferring ffmpeg).
One on one or small groups up to 4 live video chats.
I would like to start with the simple option which is single stream sent to server, and for that I want to use https://github.com/ethand91/mediasoup3-record-demo as reference.
My problem is that mediasoup is not using standard offer and answer flow as I know and used to when implementing webRTC clients and in all mediasoup examples they use mediasoup-client that in fact using rtpCapabilities instead of the commonly used SDP format.
I did find this good intention repo: https://github.com/cloudwebrtc/flutter-mediasoup-client
But so far it looks like intention only.
So my question is, what's the flow I should use in order to privide the client side application with SDP, or how can I get SDP format from mediasoup transport and router rtpCapabilities.
Also, if I build the SDP myself, what should be the flow?
client-> connect ->server
server-> create-transport ->client
client-> connect-transport ->server
server-> create-producer(router rtpParameters translated to sdp offer) ->client
client-> produce(sdp answerr translated to producer rtpParameters) ->server
Does it make sense?
Any different approach also will be appreciated.
Thanks.
Use the mediasoup forum if you want authors of mediasoup to answer. We do not use Stack Overflow:
https://mediasoup.discourse.group
I started to implement it myself:
https://github.com/tan-tan-kanarek/flutter-mediasoup-client
I find that the dart webRtc stream is not giving me all the info I need regarding encoding and tracks separation.
Help will be appreciated.
Mate, you need walk through on mediasoup... you can start with javascript basics and move on to flutter as basic just works on all platform
this youtube channel is very useful on mediasoup Amir

RUDP implementation other than bell labs implementation?

Is there any other implementation for Reliable-UDP, other than the implementation of Bell labs? I need to develop a streaming application in which I don't want to use RTP or RTCP. I want two functionalities
In-order delivery of Packets
Resending of lost packets
No extra functionality is required. If there is any implementation, please let me know. I have searched a-lot but couldn't find one

Can I use the same SIP library as Skype

I'm looking to rebuild an existing VOIP app for android and iphone because it has poor call quality. I would like to replace my SIP library with the same one that Skype uses.
Does anyone know which SIP library Skype uses? Is it an open source one? Is it something proprietary that they built? Is it commercially available?
Skype has a proprietary signalling protocol and the code is not available. A lot of articles have been written about the subject. Here you have an example.
Skype performs the signalling over several ports and protocols and it can even send it encapsulated inside HTTP protocol so that it can still work on limited networks. I don't know what made you say that Skype uses SIP, but I don't think that it is used. I believe it is a small proprietary protocol and you can find some evidences for this in several articles where packets were analyzed.
Skype doesn't use SIP. Skype had other issues to deal with that SIP doesn't handle well. For example, SIP doesn't like NAT very much and several hacks must be used to get around it as best as one can. Skype, at least before the Microsoft era, used a proprietary protocol peer-to-peer (remember what Skype USED to make :-) ), and had the concept of Supernodes. Supernodes were other Skype nodes that had public IP addresses. Skype nodes would attempt to do a peer-to-peer call, but, in the event things like NAT and firewalls got in the way, they could relay their conversations from a Supernode. Again. who knows what they do now that Microsoft has been in the code. We know that Microsoft does inspect their messages.
What is the issue with SIP? If it's that NAT traversal issue - there are variants of protocols such as IAX where all traffic goes over a single stream, avoiding the SIP media problem.

how to start a conversation with bonjour client knowing its name#host:port?

I am working on a project of P2P instant messenger, like ichat, but just for LAN.
I use jmdns library for service discovering, and test with pidgin and log in as a Bonjour user. as so far,the service _presence._tcp.local. is well discovered,
then we know the user's information in LAN like name#host:port, so how to start a conversation with Bonjour client ?
I looked into XMPP, but it do not support P2P, but I can hardly find the library for the extension jingle which supports P2P.
maybe I should use SIP to make a conversation? but the packet format is compatible with Bonjour ? or I have to study the structure of packet exchanged?
Can anyone explain a little about how does ichat work for LAN?
Many thanks for your kind help!
I think you're a little confused.
Bonjour is a mechanism for finding a service. It is not for communicating with a service. Once you have found the name#host:port information, you are finished with Bonjour.
The next step will require you to talk a protocol that the service understands. The token _presence in the service string indicates that this is an XMPP service. You will need to talk XMPP to it. You cannot talk SIP to it. Have you tried opening an XMPP connection to the host and port you have found?
You talk about SIP and Jingle. These are used to set up an audio or video call. If you are writing an instant messaging program, you do not need to do this. XMPP alone is enough.
If you do want to support audio or video, then you will need one of those protocols. Because the service you have found is an XMPP service, you will need to use Jingle. If you don't have a library that can speak Jingle, you will have to write the code yourself. There is nothing in the Bonjour information that identifies a SIP service, so you cannot use SIP - unless you can make a different Bonjour query and find a SIP service.
I infer that you are working in Java. The most popular XMPP library for Java seems to be Smack.
Thanks for everybody's attention, now I have found something. XMPP doesn't support P2P mode, only supports clients-server-clients. but there is another standard "XEP-0174: Serverless Messaging" which is right for p2p chat in local network. DNS-SD + XEP-0174 , ichat works in this way.
as I used smack library, it do not support p2P; but someone did some changes, here is the link
http://issues.igniterealtime.org/browse/SMACK-262 .
I didn't try this XMPPLLConnection, I have looked into the source code of smack, it is based on socket connection. unfortunately there is not any java library for XEP-1074, so I have to work on xml stream over socket.
You may use SIP for that. MDNS will be your discovery mechanism, then you'd use plain SIP for calling, one you learned the URI you wish to dial.
SIPSIMPLE SDK (http://sipsimpleclient.com) implements this feature by sing this expired draft: https://datatracker.ietf.org/doc/html/draft-lee-sip-dns-sd-uri-03 it could be a good start.
Basically your client would generate a URI like sip:random_stuff#ip:port and then publish it along with a display name by using MDNS. The application also browses MDNS for peers on the LAN: _sipuri._udp for example. Once you get some URI you can just dial using SIP.

Objective-c TCP/IP client

I have a TCP server running on a machine. (implemented in Java). I need to connect to that server from a iPhone and send data to the server and also, receive data on the iphone when server pushes me data. So I need to be notified when data pushes from the server.
Is there a way to do this in Objective C(socket programming). Although I googled I couldn't find a solution. But I saw CFSocket etc.
Please anyone have a solution?
after a possible solutions in the internet, I found a nice asynchronous TCP and UDP socket Library here. (http://code.google.com/p/cocoaasyncsocket). This library worked really well for me so far. This wraps the CFSocket and CFStream.
Thanks for your replies.
You can use the CFNetwork family of classes to implement lower level sockets. Apple has an introduction document that describes the use of these classes.
CFSocket calls and similar will let you create sockets. You can then use CFStreamCreatePairWithSocket() to create a CFReadStreamRef and CFWriteStreamRef, which you can cast to NSInputStream* and NSOutputStream*.