| ... |
... |
@@ -25,6 +25,7 @@ |
|
25
|
25
|
|
|
26
|
26
|
from typing import ClassVar # pylint: disable=unused-import
|
|
27
|
27
|
from typing import Type # pylint: disable=unused-import
|
|
|
28
|
+from typing import Optional # pylint: disable=unused-import
|
|
28
|
29
|
|
|
29
|
30
|
import os
|
|
30
|
31
|
import time
|
| ... |
... |
@@ -908,7 +909,8 @@ def stop_jingle(self, sid=None, reason=None): |
|
908
|
909
|
if video_sid and sid in (video_sid, None):
|
|
909
|
910
|
self.close_jingle_content('video')
|
|
910
|
911
|
|
|
911
|
|
- def close_jingle_content(self, jingle_type: str) -> None:
|
|
|
912
|
+ def close_jingle_content(self, jingle_type: str,
|
|
|
913
|
+ shutdown: Optional[bool] = False) -> None:
|
|
912
|
914
|
jingle = self.jingle[jingle_type]
|
|
913
|
915
|
if not jingle.sid:
|
|
914
|
916
|
return
|
| ... |
... |
@@ -921,9 +923,10 @@ def close_jingle_content(self, jingle_type: str) -> None: |
|
921
|
923
|
if content:
|
|
922
|
924
|
session.remove_content(content.creator, content.name)
|
|
923
|
925
|
|
|
924
|
|
- jingle.sid = None
|
|
925
|
|
- jingle.state = JingleState.NULL
|
|
926
|
|
- jingle.update()
|
|
|
926
|
+ if not shutdown:
|
|
|
927
|
+ jingle.sid = None
|
|
|
928
|
+ jingle.state = JingleState.NULL
|
|
|
929
|
+ jingle.update()
|
|
927
|
930
|
|
|
928
|
931
|
def _on_end_call_clicked(self, _widget):
|
|
929
|
932
|
self.close_jingle_content('audio')
|
| ... |
... |
@@ -1213,7 +1216,7 @@ def shutdown(self): |
|
1213
|
1216
|
con.get_module('Chatstate').set_chatstate(self.contact, Chatstate.GONE)
|
|
1214
|
1217
|
|
|
1215
|
1218
|
for jingle_type in ('audio', 'video'):
|
|
1216
|
|
- self.close_jingle_content(jingle_type)
|
|
|
1219
|
+ self.close_jingle_content(jingle_type, shutdown=True)
|
|
1217
|
1220
|
self.jingle.clear()
|
|
1218
|
1221
|
|
|
1219
|
1222
|
# disconnect self from session
|