diff --git a/Sources/Player/Player.docc/PillarboxPlayer.md b/Sources/Player/Player.docc/PillarboxPlayer.md index 111626c31..69d62fab3 100644 --- a/Sources/Player/Player.docc/PillarboxPlayer.md +++ b/Sources/Player/Player.docc/PillarboxPlayer.md @@ -8,6 +8,8 @@ Create engaging audio and video playback experiences. ## Overview +> Warning: PillarboxPlayer APIs are currently meant to be used from the main thread only. Calling APIs from background threads is not supported and leads to undefined behavior. + The PillarboxPlayer framework provides a complete toolbox to add advanced audiovisual media capabilities to your app. Play content easily with a ``Player`` and display its content in the standard AVKit user interface with ``SystemVideoView``, or build an entirely custom user interface starting from a simple ``VideoView``. Play any kind of content from any source by implementing your own ``PlayerItem``s and ``Asset``s, no matter where your content comes from or how it must be played. Track playback with your own ``PlayerItemTracker``, whether for analytics purposes or Quality of Service (QoS) data collection. diff --git a/Sources/Player/Tracking/CurrentTracker.swift b/Sources/Player/Tracking/CurrentTracker.swift index 9f10321f4..9a3e2c0d0 100644 --- a/Sources/Player/Tracking/CurrentTracker.swift +++ b/Sources/Player/Tracking/CurrentTracker.swift @@ -19,12 +19,14 @@ final class CurrentTracker { item.enableTrackers(for: player) player.propertiesPublisher + .receiveOnMainThread() .sink { properties in item.updateTrackerProperties(properties) } .store(in: &cancellables) item.metricLog.eventPublisher() + .receiveOnMainThread() .sink { event in item.receiveMetricEvent(event) }