提交 ed135a21 authored 作者: Mike Jerris's avatar Mike Jerris

Merge pull request #1737 in FS/freeswitch from…

Merge pull request #1737 in FS/freeswitch from ~THEHUNMONKGROUP/freeswitch:bugfix/FS-11873-addstream-adds-audio-video-tracks-in-random-order-use-spec-compliant-addtrack to master

* commit 'f1bc56d6':
  Fix FS-11873: addStream() adds audio/video tracks in random order
......@@ -767,7 +767,13 @@
};
// attachStream = MediaStream;
if (options.attachStream) peer.addStream(options.attachStream);
if (options.attachStream) {
// FreeSWITCH currently orders its answer SDP such that audio m-lines
// always come first, adding the tracks to the peer in that order
// prevents possible m-line ordering validation errors on the client.
options.attachStream.getAudioTracks().forEach(function(track) { peer.addTrack(track, options.attachStream) });
options.attachStream.getVideoTracks().forEach(function(track) { peer.addTrack(track, options.attachStream) });
}
// attachStreams[0] = audio-stream;
// attachStreams[1] = video-stream;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论