Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
Variable que apunta a nulo nuevamente en lugar de apuntar a un objeto

En el código dado a continuación, he creado la variable rtcobj en el ámbito global usando el tipo de var datatype(initially null assigned) , pero cuando asigno el objeto RTCPeerConnection(configuration) la variable apunta a RTCPeerConnection(configuration) mientras dure la función, pero luego rtcobj comienza a apuntar a nulo nuevamente. ¿Por qué está sucediendo, así que no lo entiendo? (Significa por qué rtcobj apunta a nulo nuevamente en lugar de al objeto rtc ).

 navigator.webkitGetUserMedia({video:true,audio:true},function(mystream){ localvideo.srcObject=mystream; conn.mystream=mystream var configuration = { "iceServers": [{ "url": "stun:stun2.1.google.com:19302" }] }; rtcobj=new RTCPeerConnection(configuration) console.log(rtcobj) rtcobj.addStream(mystream); rtcobj.onaddstream=function(event){ otherpeerspan.style.display="none" muteunmute.style.display="block" remotevideo.srcObject=event.stream } rtcobj.onicecandidate=function(event){ if(event.candidate){ send({ type: "candidate", candidate: event.candidate }); } } },function (error) { console.log(error); } ) } console.log("rtc:"+rtcobj)
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!