This is very strange. getAudioTracks() and getVideoTracks() do not
seem to be working for you. Please open a bug in WebRTC : Audio/Video
and we'll continue over in bugzilla.
Best regards,
Byron Campen
On 11/27/15 6:16 AM, Alexander Abagian wrote:
I can't provide a service for reproducing that. But I encovered a bug in
RTCPeerConnection.onaddstream(event) : event.stream.getVideoTracks() and
event.stream.getAudioTracks() are empty while event.stream.getTracks() is not
and includes audio or video tracks.
Here's the code :
//-------------------------------------
this._peerConnection.onaddstream = function(event) {
var tracks = event.stream.getTracks();
var videoTracks = event.stream.getVideoTracks();
var audioTracks = event.stream.getAudioTracks();
console.info("onaddstream() *** test start");
console.info("onaddstream(): Remote stream adding. id: " + event.stream.id + ", all tracks: "
+ tracks.length + ", audioTracks: " + audioTracks.length + ", videoTracks: " + videoTracks.length);
for (var i = 0; i < tracks.length; i++) {
var track = tracks[i]
console.info("onaddstream() track : " + track);
}
for (var i = 0; i < audioTracks.length; i++) {
var audioTrack = audioTracks[i]
console.info("onaddstream() audioTrack : " + audioTrack);
}
for (var i = 0; i < videoTracks.length; i++) {
var videoTrack = videoTracks[i]
console.info("onaddstream() videoTrack : " + videoTrack);
}
console.info("onaddstream() *** test end");
}
//-------------------------------------
Console output log :
onaddstream() *** test start wrtc.js:297:5
onaddstream(): Remote stream adding. id:
MSID-admin(u.vm)@xxx-yyy.com-3937623828, all tracks: 1, audioTracks: 0,
videoTracks: 0 wrtc.js:298:5
onaddstream() track : [object AudioStreamTrack] wrtc.js:302:6
onaddstream() *** test end wrtc.js:314:5
onaddstream() *** test start wrtc.js:297:5
onaddstream(): Remote stream adding. id:
MSID-admin(u.vm)@xxx-yyy.com-995358898, all tracks: 1, audioTracks: 0,
videoTracks: 0 wrtc.js:298:5
onaddstream() track : [object VideoStreamTrack] wrtc.js:302:6
onaddstream() *** test end
_______________________________________________
dev-media mailing list
dev-media@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-media
_______________________________________________
dev-media mailing list
dev-media@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-media