Skip to content

Commit

Permalink
Streamline tracks updates on a userInteractive queue
Browse files Browse the repository at this point in the history
  • Loading branch information
ipavlidakis committed Sep 24, 2024
1 parent c3d1988 commit 622bd30
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ final class MediaAdapter {
private let subject: PassthroughSubject<TrackEvent, Never>

/// A publisher for track events.
/// - Note: We streamline track updates to a userInteractive queue to ensure, no events loss.
var trackPublisher: AnyPublisher<TrackEvent, Never> {
subject.eraseToAnyPublisher()
subject
.receive(on: DispatchQueue.global(qos: .userInteractive))
.eraseToAnyPublisher()
}

/// Initializes a new instance of the media adapter.
Expand Down

0 comments on commit 622bd30

Please sign in to comment.