Esempio n. 1
0
        internal void RecordHandler(CallEventParams.RecordParams recordParams)
        {
            OnRecordStateChange?.Invoke(mAPI, this, recordParams);

            switch (recordParams.State)
            {
            case CallEventParams.RecordParams.RecordState.recording:
                OnRecordRecording?.Invoke(mAPI, this, recordParams);
                break;

            case CallEventParams.RecordParams.RecordState.paused:
                OnRecordPaused?.Invoke(mAPI, this, recordParams);
                break;

            case CallEventParams.RecordParams.RecordState.finished:
                OnRecordFinished?.Invoke(mAPI, this, recordParams);
                break;

            case CallEventParams.RecordParams.RecordState.no_input:
                OnRecordNoInput?.Invoke(mAPI, this, recordParams);
                break;

            default: break;
            }
        }
Esempio n. 2
0
        private void Call_OnRecordStateChange(CallingAPI api, Call call, CallEventParams.RecordParams recordParams)
        {
            switch (recordParams.State)
            {
            case CallEventParams.RecordParams.RecordState.finished:
            case CallEventParams.RecordParams.RecordState.no_input:
                Call.OnRecordStateChange -= Call_OnRecordStateChange;
                mFinished.SetResult(true);
                break;

            default: break;
            }
        }