Assets/Photon/PhotonVoice/Code/Recorder.cs
/// <summary>
/// Initializes the Recorder component to be able to transmit audio.
/// </summary>
/// <param name="voiceConnection">The VoiceConnection to be used with this Recorder.</param>
Initializes the Recorder component to be able to transmit audio.
Initializes the Recorder component to be able to transmit audio .
public void Init(VoiceConnection voiceConnection)
        {
            if (voiceConnection == null)
            {
                if (this.Logger.IsErrorEnabled)
                {
                    this.Logger.LogError("voiceConnection is null.");
                }
                return;
            }
            this.LogLevel = voiceConnection.GlobalRecordersLogLevel;
            if (this.IsInitialized)
            {
                if (this.Logger.IsWarningEnabled)
                {
                    this.Logger.LogWarning("Recorder already initialized.");
                }
                return;
            }
            if (voiceConnection.VoiceClient == null)
            {
                if (this.Logger.IsErrorEnabled)
                {
                    this.Logger.LogError("voiceConnection.VoiceClient is null.");
                }
                return;
            }
            this.client = voiceConnection.VoiceClient;
            if (this.AutoStart)
            {
                this.StartRecording();
            }
        }
public void Init ( VoiceConnection voiceConnection ) { if ( voiceConnection == null ) { if ( this . Logger . IsErrorEnabled ) { this . Logger . LogError ( " " ) ; } return ; } this . LogLevel = voiceConnection . GlobalRecordersLogLevel ; if ( this . IsInitialized ) { if ( this . Logger . IsWarningEnabled ) { this . Logger . LogWarning ( " " ) ; } return ; } if ( voiceConnection . VoiceClient == null ) { if ( this . Logger . IsErrorEnabled ) { this . Logger . LogError ( " " ) ; } return ; } this . client = voiceConnection . VoiceClient ; if ( this . AutoStart ) { this . StartRecording ( ) ; } }
Initializes the Recorder component to be able to transmit audio.
Initializes the Recorder component to be able to transmit audio .
voiceConnection
VoiceConnection
The VoiceConnection to be used with this Recorder.
The VoiceConnection to be used with this Recorder .