fix order of farstream calls
This commit is contained in:
parent
735032e250
commit
0c4f20145f
|
@ -178,6 +178,15 @@ class JingleRTPContent(JingleContent):
|
||||||
elif name == 'farstream-codecs-changed':
|
elif name == 'farstream-codecs-changed':
|
||||||
if self.sent and self.p2psession.get_property('codecs'):
|
if self.sent and self.p2psession.get_property('codecs'):
|
||||||
self.send_description_info()
|
self.send_description_info()
|
||||||
|
if self.transport.remote_candidates:
|
||||||
|
# those lines MUST be done after we get info on our
|
||||||
|
# codecs
|
||||||
|
self.p2pstream.add_remote_candidates(
|
||||||
|
self.transport.remote_candidates)
|
||||||
|
self.transport.remote_candidates = []
|
||||||
|
self.p2pstream.set_property('direction',
|
||||||
|
farstream.DIRECTION_BOTH)
|
||||||
|
|
||||||
elif name == 'farstream-local-candidates-prepared':
|
elif name == 'farstream-local-candidates-prepared':
|
||||||
self.candidates_ready = True
|
self.candidates_ready = True
|
||||||
if self.is_ready():
|
if self.is_ready():
|
||||||
|
@ -235,11 +244,15 @@ class JingleRTPContent(JingleContent):
|
||||||
|
|
||||||
def on_negotiated(self):
|
def on_negotiated(self):
|
||||||
if self.accepted:
|
if self.accepted:
|
||||||
|
if self.p2psession.get_property('codecs'):
|
||||||
|
# those lines MUST be done after we get info on our codecs
|
||||||
if self.transport.remote_candidates:
|
if self.transport.remote_candidates:
|
||||||
self.p2pstream.add_remote_candidates(self.transport.remote_candidates)
|
self.p2pstream.add_remote_candidates(
|
||||||
|
self.transport.remote_candidates)
|
||||||
self.transport.remote_candidates = []
|
self.transport.remote_candidates = []
|
||||||
# TODO: farstream.DIRECTION_BOTH only if senders='both'
|
# TODO: farstream.DIRECTION_BOTH only if senders='both'
|
||||||
self.p2pstream.set_property('direction', farstream.DIRECTION_BOTH)
|
self.p2pstream.set_property('direction',
|
||||||
|
farstream.DIRECTION_BOTH)
|
||||||
JingleContent.on_negotiated(self)
|
JingleContent.on_negotiated(self)
|
||||||
|
|
||||||
def __on_remote_codecs(self, stanza, content, error, action):
|
def __on_remote_codecs(self, stanza, content, error, action):
|
||||||
|
|
Loading…
Reference in New Issue