protected void onSpeakComplete(Model.Wrapper wrapper) { if (Util.Config.DEBUG) { Debug.Log("onSpeakComplete: " + wrapper); } if (_onSpeakComplete != null) { _onSpeakComplete.Invoke(wrapper); } }
public async Task SpeakAsyncCancelAll() { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { mediaPlayerElement.MediaPlayer.Pause(); mediaPlayerElement.Source = null; }); SpeakComplete?.Invoke(CompletionReason.Cancel); }
/// <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); }