Ahmed Anees Posted November 4, 2019 Share Posted November 4, 2019 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 According to http://docs.antmedia.io/en/latest/WebRTC-Developers.html } 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 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"} stream remain offline , howcan i fix this Link to comment Share on other sites More sharing options...
0 Murat Aydin Posted November 9, 2019 Share Posted November 9, 2019 Hi Ahmed, Please have a look at the sample app: https://github.com/ant-media/StreamApp/tree/master/src/main/webapp Hope this helps. -- Murat AYDIN ------------------ Senior Software EngineerMember at GDG Ankara http://farm6.static.flickr.com/5092/5468518737_c1717580aa_t.jpg http://farm6.static.flickr.com/5093/5468518979_5624dbecac_t.jpg Blog : www.ottodroid.net Link to comment Share on other sites More sharing options...
Question
Ahmed Anees
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);
}
});
}
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"}
Link to comment
Share on other sites
Top Posters For This Question
1
1
Popular Days
Nov 4
1
Nov 9
1
Top Posters For This Question
Murat Aydin 1 post
Ahmed Anees 1 post
Popular Days
Nov 4 2019
1 post
Nov 9 2019
1 post
1 answer to this question
Recommended Posts