diff --git a/Hubs/StreamHub.cs b/Hubs/StreamHub.cs index 5a28374..8f5f2b2 100644 --- a/Hubs/StreamHub.cs +++ b/Hubs/StreamHub.cs @@ -26,7 +26,7 @@ namespace StreamR return _streamManager.Subscribe(streamName, cancellationToken); } - public async Task StartStream(string streamName, ChannelReader streamContent) + public async Task StartStream(string streamName, IAsyncEnumerable streamContent) { try { diff --git a/StreamManager.cs b/StreamManager.cs index cd02014..1f5f8eb 100644 --- a/StreamManager.cs +++ b/StreamManager.cs @@ -22,7 +22,7 @@ namespace StreamR return streamList; } - public async Task RunStreamAsync(string streamName, ChannelReader stream) + public async Task RunStreamAsync(string streamName, IAsyncEnumerable stream) { var streamHolder = new StreamHolder() { Source = stream }; @@ -34,7 +34,7 @@ namespace StreamR try { - await foreach (var item in stream.ReadAllAsync()) + await foreach (var item in stream) { foreach (var viewer in streamHolder.Viewers) { @@ -88,7 +88,7 @@ namespace StreamR private class StreamHolder { - public ChannelReader Source; + public IAsyncEnumerable Source; public ConcurrentDictionary> Viewers = new ConcurrentDictionary>(); } }