Fetching ID3 metadata while HLS stream is being played on AppleTV via Airplay

I am working on AVPlayer based streaming apps wherein I am relying on ID3 tags for fetching metadata from the HLS stream. I am using KVO for this and observing AVPlayerItem’s timedMetadata property. This works perfectly well in normal scenario. However when I route the playback to Apple TV via Airplay, I do not get any notifications for the said KVO. In fact, the timedMetadata property resets to nil once the Airplay is activated as the API docs says here,

“As an optimization for playback, AVPlayerItem may omit the processing of timed metadata when no observer of this property is registered. Therefore, when no such observer is registered, the value of the timedMetadata property may remain nil regardless of the contents of the underlying media.”


Is there any way, we can fetch timedMetadata property of AVPlayerItem while the steam is being played via Airplay mode.

Replies

Any joy with this? I've just come across the same issue 😟

Just noticed this too. We are registering an observer for the timedMetadata property. so based on the docs, it should not be omitted, but we do not receive any KVO callbacks for this when airplaying...