That shouldn't matter as onaddstream is for the remote stream rather than the local stream.

Romain Gauthier <notifications@github.com> wrote:

>>  
>> -    pc.onaddstream = function (obj) {
>> -      var type = obj.type;
>> -      if (type === "video") {
>> -        remoteVideo.mozSrcObject = obj.stream;
>> -        remoteVideo.play();
>> -      } else {
>> -        app.utils.log("sender onaddstream of unknown type, obj = " +
>> -                      obj.toSource());
>> -      }
>> +    pc.addStream(localStream);
>> +
>> +    pc.onaddstream = function (event) {
>> +      app.trigger("add_remote_stream", event.stream);
>
>`pc.addStream` could fire the `addstream` event before the callback is
>actually attached.
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/mozilla/talkilla/pull/56/files#r3968317