msg-manager.js 655 B

12345678910111213141516171819202122232425
  1. import IMOperator from "./im-operator";
  2. import MsgTypeManager from "./msg-type/base/msg-type-manager";
  3. export default class MsgManager extends MsgTypeManager {
  4. constructor(page) {
  5. super(page);
  6. }
  7. showMsg({msg}) {
  8. this.getMsgManager({type: msg.type}).showMsg({msg});
  9. }
  10. sendMsg({type = IMOperator.TextType, content, duration}) {
  11. console.log(arguments[0]);
  12. this.getMsgManager({type}).sendOneMsg(arguments[0]);
  13. }
  14. resend({type, content, duration, itemIndex}) {
  15. this.getMsgManager({type}).resend(arguments[0]);
  16. }
  17. stopAllVoice() {
  18. this.voiceManager.stopAllVoicePlay();
  19. }
  20. }