|
@@ -321,9 +321,12 @@ class MyCall(pj.Call):
|
|
|
# print('self.player_complete_dict[player_id]D:', player_id, player_file, self.player_complete_dict[player_id])
|
|
|
self.logger.info(f"Sending bot speaker, 111, player_file: {player_file}, player_id: {player_id}, isActive: {self.isActive()}")
|
|
|
self.audio_player = MyAudioMediaPlayer(player_id, self.audio_media, on_complete=self.on_media_player_complete)
|
|
|
- # self.audio_player.createPlayer(player_file[0], pj.PJMEDIA_FILE_NO_LOOP)
|
|
|
- self.logger.info(f"Sending bot speaker, 222, player_file: {player_file}, player_id: {player_id}, isActive: {self.isActive()}")
|
|
|
- self.audio_player.createPlaylist(player_file, f'my_hello_playlist{player_id}', pj.PJMEDIA_FILE_NO_LOOP)
|
|
|
+ if len(player_file) == 1:
|
|
|
+ self.logger.info(f"Sending bot speaker, 222, player_file: {player_file}, player_id: {player_id}, isActive: {self.isActive()}")
|
|
|
+ self.audio_player.createPlayer(player_file[0], pj.PJMEDIA_FILE_NO_LOOP)
|
|
|
+ else:
|
|
|
+ self.logger.info(f"Sending bot speaker, 222, player_file: {player_file}, player_id: {player_id}, isActive: {self.isActive()}")
|
|
|
+ self.audio_player.createPlaylist(player_file, f'my_hello_playlist{player_id}', pj.PJMEDIA_FILE_NO_LOOP)
|
|
|
self.logger.info(f"Sending bot speaker, 333, player_file: {player_file}, player_id: {player_id}, isActive: {self.isActive()}")
|
|
|
self.audio_player.startTransmit(self.audio_media)
|
|
|
|