- Timestamp:
- Dec 13, 2013 1:28:16 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip-apps/src/pygui/chat.py
r4687 r4690 182 182 return uri in self._participantList 183 183 184 def isCallRegistered(self, call_inst):185 return call_inst in self._callList186 187 184 def registerCall(self, uri_str, call_inst): 188 185 uri = ParseSipUri(uri_str) … … 200 197 if show_text_chat: 201 198 self._gui.textShowHide(True) 202 203 # helper204 def dumpParticipantList(self):205 print "Number of participants: %d" % (len(self._participantList))206 for b in self._participantList:207 print b.cfg.uri208 199 209 200 def addParticipant(self, uri, call_inst=None): … … 264 255 265 256 def setTypingIndication(self, from_uri_str, is_typing): 266 267 268 269 257 # notify GUI 258 self._gui.textSetTypingIndication(from_uri_str, is_typing) 259 # now relay to all participants 260 self._sendTypingIndication(is_typing, from_uri_str) 270 261 271 262 def startCall(self): … … 274 265 call_param.opt.audioCount = 1 275 266 call_param.opt.videoCount = 0 267 fails = [] 276 268 for idx, p in enumerate(self._participantList): 277 269 # just skip if call is instantiated 278 if len(self._callList)>=idx+1 andself._callList[idx]:270 if self._callList[idx]: 279 271 continue 280 272 … … 288 280 except: 289 281 self._callList[idx] = None 290 self._gui.audioUpdateState(bud.cfg.uri, gui.AudioState.FAILED) 282 self._gui.audioUpdateState(uri_str, gui.AudioState.FAILED) 283 fails.append(p) 291 284 292 # kick the disconnected participant, but the last (avoid zombie chat) 293 if not self.isPrivate(): 294 self.kickParticipant(p) 285 for p in fails: 286 # kick participants with call failure, but spare the last (avoid zombie chat) 287 if not self.isPrivate(): 288 self.kickParticipant(p) 295 289 296 290 def stopCall(self): … … 301 295 c.hangup(pj.CallOpParam()) 302 296 303 if not self.isPrivate():304 self.kickParticipant(p)305 306 297 def updateCallState(self, thecall, info = None): 307 298 # info is optional here, just to avoid calling getInfo() twice (in the caller and here)
Note: See TracChangeset
for help on using the changeset viewer.