Hi all,
I´m currently adding a WebRTC-Videochat to our existing Instant-Messaging. Now 
that in Google Chrome everything works fine, I´ve tried to connect 2 
Firefox-Beta (Version 22) with each other.


In the onaddstream-Handler, I try to access properties of the current 
RTCPeerConnection-Object. Unfortunately in Firefox the 'this'-Object in the 
onaddstream-Handler equals 'function(){}', instead of the corresponding 
RTCPeerConnection-Object.


- Why does 'this' not equal the corresponding RTCPeerConnection-Object (like it 
is in Google-Chrome)?

- Is there another way I can access the corresponding RTCPeerConnection-Object 
from within the onaddstream-Handler?




Here is my code, registering the callback handler:
...
peerConns[data.jid] = new RTCPeerConnection(conf.servers);
peerConns[data.jid]['peerJid'] = data.jid;// Needed in onaddstream-Handler
peerConns[data.jid]['onaddstream'] = onaddstream;
...


In the onaddstream-Handler I am accessing the peerJid-Property via 
'this.peerJid', to determine the Peer for which the stream should be added.



Thanks for your help.
Regards Kai
_______________________________________________
dev-media mailing list
dev-media@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-media

Reply via email to