mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-23 03:39:38 +00:00
Ensure that MediaPlayer
for speech is playing.
This commit is contained in:
parent
2f19d663dc
commit
933e850919
|
@ -67,6 +67,9 @@ impl Backend for WinRT {
|
||||||
let source = MediaSource::create_from_stream(stream, content_type)?;
|
let source = MediaSource::create_from_stream(stream, content_type)?;
|
||||||
let item = MediaPlaybackItem::create(source)?;
|
let item = MediaPlaybackItem::create(source)?;
|
||||||
self.playback_list.items()?.append(item)?;
|
self.playback_list.items()?.append(item)?;
|
||||||
|
if !self.is_speaking()? {
|
||||||
|
self.player.play()?;
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user