1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-11-22 23:19:37 +00:00

Ensure that MediaPlayer for speech is playing.

This commit is contained in:
Nolan Darilek 2020-06-14 19:42:48 -05:00
parent 2f19d663dc
commit 933e850919

View File

@ -67,6 +67,9 @@ impl Backend for WinRT {
let source = MediaSource::create_from_stream(stream, content_type)?;
let item = MediaPlaybackItem::create(source)?;
self.playback_list.items()?.append(item)?;
if !self.is_speaking()? {
self.player.play()?;
}
Ok(())
}