Show offline stream closure in the desktop player

This commit is contained in:
evgeny committed 2026-11-01 23:10:27 +01:00
1 parent 46a5cf14ce
commit bf63f79fdf
2 files changed
+4 -1

No files matched your search

+3 -1
View File
@@ -604,10 +604,12 @@ void StreamPlayerWindow::decode() {
if (record.kind == StreamRecordKind::Gap) { reset(false); continue; }
if (record.kind == StreamRecordKind::Closed) {
const char* reason = record.reason == STREAM_CLOSE_SOURCE_CHANGED ? "The stream restarted. Select a source again."
: record.reason == STREAM_CLOSE_OFFLINE ? "The stream source is offline"
: record.reason == STREAM_CLOSE_MEMBER ? "The source is no longer a channel member"
: record.reason == STREAM_CLOSE_SERVICE ? "Chat service is stopped"
: record.reason == STREAM_CLOSE_GROUP ? "The channel is closed" : "Could not continue the stream";
fail(text(reason), record.reason == STREAM_CLOSE_FAILED); break;
// Grid повторяет подключение только пока источник присутствует в актуальном каталоге.
fail(text(reason), record.reason == STREAM_CLOSE_FAILED || record.reason == STREAM_CLOSE_OFFLINE); break;
}
if (record.kind == StreamRecordKind::VideoEnd || record.kind == StreamRecordKind::AudioEnd || record.kind == StreamRecordKind::End) {
if (record.kind != StreamRecordKind::VideoEnd && p.sound && !p.audioEnded) stream_playback_audio_finish(p.sound);