示例#1
0
        protected void onSpeakComplete(Model.Wrapper wrapper)
        {
            if (Util.Config.DEBUG)
            {
                Debug.Log("onSpeakComplete: " + wrapper);
            }

            if (_onSpeakComplete != null)
            {
                _onSpeakComplete.Invoke(wrapper);
            }
        }
示例#2
0
        public async Task SpeakAsyncCancelAll()
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                      () =>
            {
                mediaPlayerElement.MediaPlayer.Pause();

                mediaPlayerElement.Source = null;
            });


            SpeakComplete?.Invoke(CompletionReason.Cancel);
        }
示例#3
0
 /// <summary>
 /// This is invoked when the stream is finished playing.
 /// </summary>
 /// <param name="sender">unused object parameter</param>
 /// <param name="e">unused event parameter</param>
 async void media_MediaEnded(MediaPlayer sender, object e)
 {
     //await SpeakAsync("Done");
     SpeakComplete?.Invoke(CompletionReason.Complete);
 }