Enrico Viappiani Posted October 22, 2020 Share Posted October 22, 2020 Hi all, I've experienced a strange behaviour during the developing of my project. I've modified the source of the javascript SDK tutorial that play a stream on a web page. The tutorial works just fine, but switching to a new ant streaming server, the play_finished event is instantly triggered. That server is out of our control. The play code is : var sdpConstraints = { OfferToReceiveAudio : true, OfferToReceiveVideo : true }; var mediaConstraints = { video : true, audio : true }; var webRTCAdaptorPnp = new WebRTCAdaptor({ websocket_url : "wss://<myserver>", mediaConstraints : mediaConstraints, peerconnection_config : pc_config, sdp_constraints : sdpConstraints, remoteVideoId : "pnpScreen", isPlayMode: true, callback : function(info) { if (info == "initialized") { console.log("initialized"); console.log(uriSideStream); webRTCAdaptorPnp.play(<mystream>); } else if (info == "play_started") { //play_started console.log("play started"); } else if (info == "play_finished") { // play finishedthe stream console.log("play finished"); } }, callbackError : function(error) { //some of the possible errors, NotFoundError, SecurityError,PermissionDeniedError console.log("error callback: " + error); alert(error); } }); We also tried with the iOS SDK and it is working.. any clues? thanks Enrico Link to comment Share on other sites More sharing options...
0 Enrico Viappiani Posted October 22, 2020 Author Share Posted October 22, 2020 another info : the play_started event is never triggered, it goes directly into play_finished after it is initialized. Link to comment Share on other sites More sharing options...
0 Enrico Viappiani Posted October 22, 2020 Author Share Posted October 22, 2020 The server is an Enterprise Edition. Link to comment Share on other sites More sharing options...
0 Selim Emre Posted October 22, 2020 Share Posted October 22, 2020 Hi Enrico, Have a good day. As I see, you need to set mediaConstraints as below: var mediaConstraints = { video : false, audio : false }; It's hard to understand real cause of problem with limited code snippets. We need to check full of HTML page. Could you please share your live page with support@antmedia.io? Best Regards, Selim Link to comment Share on other sites More sharing options...
0 Enrico Viappiani Posted November 2, 2020 Author Share Posted November 2, 2020 turns out that the reason was that google stun server was down for a couple of hours. Link to comment Share on other sites More sharing options...
Question
Enrico Viappiani
Hi all,
Link to comment
Share on other sites
Top Posters For This Question
4
1
Popular Days
Oct 22
4
Nov 2
1
Top Posters For This Question
Enrico Viappiani 4 posts
Selim Emre 1 post
Popular Days
Oct 22 2020
4 posts
Nov 2 2020
1 post
4 answers to this question
Recommended Posts