Newer
Older
DH_Apicture / src / store / modules / rongyunStore.js
@zhangqy zhangqy 28 days ago 840 bytes first commit

const rongyunStore = defineStore(
  'rongyun',
  {
    state: () => ({
      rtcClient: null,
      callClient: null,
      mediaType: 2, //2是视频 1是语音
      callSession: null,
      userinfo: {},
      online: false,
      haveRYtoken: false,
    }),
    actions: {
      SET_RTC (rtcClient) {

        this.rtcClient = rtcClient;
        console.log(rtcClient, 'this.rtcClient', this.rtcClient);
      },
      SET_CALL (callClient) {
        this.callClient = callClient;
      },
      SET_CALLSESSION (callSession) {
        this.callSession = callSession;
      },
      SET_MediaType (mediaType) {
        this.mediaType = mediaType;
      },
      SET_online (bool) {
        this.online = bool;
      },
      SET_haveRYtoken (bool) {
        this.haveRYtoken = bool;
      },
    }
  });

export default rongyunStore;