예제 #1
0
    protected override void OnShow()
    {
        base.OnShow();

        SetRoomInfo();
        InitRoomPlayerInfo();
        uiBind.characterListPanel.SetActive(false);


        // 加入频道 静音自己
        MFAgoraMgr.JoinChannel(_roomInfo.roomNumber.ToString());
        MFAgoraMgr.mRtcEngine.MuteLocalAudioStream(true);
    }
예제 #2
0
    protected override void Awake()
    {
        base.Awake();

        MFAgoraMgr.JoinChannel("9527");

        uiBind = GetComponent <MFAgoraTestBind>();
        uiBind.Close.onClick.AddListener(OnClickClose);
        uiBind.EnableAudio.onClick.AddListener(OnEnableAudio);
        uiBind.DisableAudio.onClick.AddListener(OnDisableAudio);
        uiBind.SetDefaultAudioRouteToSpeakerPhone.onClick.AddListener(OnSetDefaultAudioRouteToSpeakerPhone);
        uiBind.SetEnableSpeakerphone.onClick.AddListener(OnSetEnableSpeakerphone);
        uiBind.MuteLocalAudioStream.onClick.AddListener(OnMuteLocalAudioStream);
        uiBind.MuteAllRemoteAudioStreams.onClick.AddListener(OnMuteAllRemoteAudioStreams);

        uiBind.PressToSpeak.onPointerDown.AddListener(OnPressToSpeakDown);
        uiBind.PressToSpeak.onPointerUp.AddListener(OnPressToSpeakUp);
    }