Пример #1
0
        public void PlayPause()
        {
            VoiceMessagePlayer player = this._player;

            if (player == null)
            {
                return;
            }
            player.PlayPause();
        }
Пример #2
0
 public VoiceMessagePlayerWrapper(Doc doc)
 {
     this._voiceMessage = (IVoiceMessage)doc.preview.audio_msg;
     this._player       = new VoiceMessagePlayer(doc)
     {
         PlaybackStarting = new Action(this.SetPosition),
         IsPlayingChanged = new Action(this.UpdateIsPlayingState),
         MediaFailed      = new Action(this.OnMediaFailed),
         MediaEnded       = new Action(this.OnMediaEnded),
         PositionUpdated  = new Action <TimeSpan>(this.OnPositionUpdated),
         ResetCallback    = new Action(this.ResetCallback)
     };
 }