Beispiel #1
0
        internal void PlayHandler(CallEventParams.PlayParams playParams)
        {
            OnPlayStateChange?.Invoke(mAPI, this, playParams);

            switch (playParams.State)
            {
            case CallEventParams.PlayParams.PlayState.playing:
                OnPlayPlaying?.Invoke(mAPI, this, playParams);
                break;

            case CallEventParams.PlayParams.PlayState.error:
                OnPlayError?.Invoke(mAPI, this, playParams);
                break;

            case CallEventParams.PlayParams.PlayState.paused:
                OnPlayPaused?.Invoke(mAPI, this, playParams);
                break;

            case CallEventParams.PlayParams.PlayState.finished:
                OnPlayFinished?.Invoke(mAPI, this, playParams);
                break;

            default: break;
            }
        }
Beispiel #2
0
 public void OnPlayErrorCallback(int?soundId, string error)
 {
     OnPlayError?.Invoke(new HowlErrorEventArgs {
         SoundId = soundId, Error = error
     });
 }