diff options
author | Jirka Novak <j.novak@netsystem.cz> | 2020-12-29 14:41:14 +0100 |
---|---|---|
committer | Jirka Novak <j.novak@netsystem.cz> | 2020-12-29 14:41:14 +0100 |
commit | 5a7f249edb00c6b26280d92d6eec4a8f95d1e57d (patch) | |
tree | 7c09d29de417c9025c3152144fd48aa950d928e1 /ui/qt/rtp_audio_stream.cpp | |
parent | 936f2a9b70393605d09b179b126b9839311ca249 (diff) |
RTP player: Added pause button
Pause button added. Button is visible only when media are played.
Diffstat (limited to 'ui/qt/rtp_audio_stream.cpp')
-rw-r--r-- | ui/qt/rtp_audio_stream.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp index e362851e1d..e0b39f740a 100644 --- a/ui/qt/rtp_audio_stream.cpp +++ b/ui/qt/rtp_audio_stream.cpp @@ -648,6 +648,17 @@ void RtpAudioStream::startPlaying() } } +void RtpAudioStream::pausePlaying() +{ + if (audio_output_) { + if (QAudio::ActiveState == audio_output_->state()) { + audio_output_->suspend(); + } else if (QAudio::SuspendedState == audio_output_->state()) { + audio_output_->resume(); + } + } +} + void RtpAudioStream::stopPlaying() { if (audio_output_) { |