mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
sdp exchange.
This commit is contained in:
parent
ccd170a813
commit
49da2099c1
12 changed files with 1435 additions and 298 deletions
|
@ -70,15 +70,13 @@
|
|||
$('#rtc_media_player').prop('srcObject', event.stream);
|
||||
};
|
||||
new Promise(function(resolve, reject) {
|
||||
pc.addTransceiver("audio", {direction: "recvonly"});
|
||||
pc.addTransceiver("video", {direction: "recvonly"});
|
||||
|
||||
pc.createOffer(function(offer){
|
||||
resolve(offer);
|
||||
},function(reason){
|
||||
reject(reason);
|
||||
},{
|
||||
mandatory: {
|
||||
OfferToReceiveAudio: true,
|
||||
OfferToReceiveVideo: true
|
||||
}
|
||||
});
|
||||
}).then(function(offer) {
|
||||
return pc.setLocalDescription(offer).then(function(){ return offer; });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue