author | Nils Ohlmeier [:drno] <drno@ohlmeier.org> |
Tue, 18 Feb 2014 09:47:54 -0500 | |
changeset 169360 | 7173c66302c343a51d333b97cb1fc3a59004fba7 |
parent 169359 | 3cfe63cb3de2c9ad6edd07e94fcd2024f952f1cc |
child 169361 | ecd5c56ed519c8698bf83de67a3cdadf0e7cb25c |
push id | 26245 |
push user | ryanvm@gmail.com |
push date | Tue, 18 Feb 2014 20:18:17 +0000 |
treeherder | mozilla-central@9019cc90719c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | whimboo |
bugs | 971830 |
milestone | 30.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/media/tests/mochitest/pc.js +++ b/dom/media/tests/mochitest/pc.js @@ -1096,20 +1096,26 @@ function PeerConnectionWrapper(label, co /** * Callback for native peer connection 'onaddstream' events. * * @param {Object} event * Event data which includes the stream to be added */ this._pc.onaddstream = function (event) { - info(self + ": 'onaddstream' event fired for " + event.stream); + info(self + ": 'onaddstream' event fired for " + JSON.stringify(event.stream)); - // TODO: Bug 834835 - Assume type is video until we get get{Audio,Video}Tracks. - self.attachMedia(event.stream, 'video', 'remote'); + var type = ''; + if (event.stream.getAudioTracks().length > 0) { + type = 'audio'; + } + if (event.stream.getVideoTracks().length > 0) { + type += 'video'; + } + self.attachMedia(event.stream, type, 'remote'); }; /** * Callback for native peer connection 'ondatachannel' events. If no custom handler * has been specified via 'this.ondatachannel', a failure will be raised if an * event of this type gets caught. * * @param {Object} event