Jump to content
  • 0

Why server not sending any response?


Ahmed Anees
 Share

Question

Hi All,
I am trying to connect to ant server 

var pc_config = null;
    var sdpConstraints = {
        OfferToReceiveAudio: false,
        OfferToReceiveVideo: false

    };
    var mediaConstraints = {
        video: true,
        audio: true
    };
    
    var webRTCAdaptor = new WebRTCAdaptor({

       
        websocket_url: "ws://IP:5080/WebRTCAppEE/websocket",
        mediaConstraints: mediaConstraints,
        peerconnection_config: pc_config,
        sdp_constraints: sdpConstraints,
        localVideoId: "camera",
        callback: function(info) {
            if (info == "initialized") {
                console.log("initialized");
                 //webRTCAdaptor.play("242804849130412916583694");


            } else if (info == "publish_started") {
                //stream is being published
               
                console.log("publish started");
            } else if (info == "publish_finished") {
                //stream is finished
                console.log("publish finished");
            } else if (info == "screen_share_extension_available") {
                //screen share extension is avaiable
                console.log("screen share extension available");
            } else if (info == "screen_share_stopped") {
                //"Stop Sharing" is clicked in chrome screen share dialog
                console.log("screen share stopped");
            }

        },
        callbackError: function(error) {
            //some of the possible errors, NotFoundError, SecurityError,PermissionDeniedError

            console.log("error callback: " + error);
            alert(error);
        }
    });




ON console I am getting below response
image.png

}
  1. Client inits peer connections, creates offer sdp and send the sdp configuration to the server with takeConfiguration command
{   command : "takeConfiguration",   streamId : "stream1",   type : "offer",   sdp : "${SDP_PARAMETER}"}

is done successfully but there no response as discuss on http://docs.antmedia.io/en/latest/WebRTC-Developers.html
  1. Server creates answer sdp and send the sdp configuration to the client with takeConfiguration command
{   command : "takeConfiguration",   streamId : "stream1",   type : "answer",   sdp : "${SDP_PARAMETER}"}
Now console have this out put.
 
sent message:{"command":"takeCandidate","streamId":"242804849130412916583694","label":0,"id":"0","candidate":"candidate:918459911 1 udp 2122260223 192.168.1.18 49897 typ host generation 0 ufrag 6frf network-id 1 network-cost 10"}
webrtc_adaptor.self-88685b47ff890cac0bde872b45d7403d60563d310f635cde2aa19374c02239a0.js?body=1:733 sent message:{"command":"takeCandidate","streamId":"242804849130412916583694","label":1,"id":"1","candidate":"candidate:918459911 1 udp 2122260223 192.168.1.18 60562 typ host generation 0 ufrag 6frf network-id 1 network-cost 10"}
image.png

stream remain offline , howcan i fix this 
Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0
Hi Ahmed,

Please have a look at the sample app:


Hope this helps.



--
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...