I am working on AVPlayer based streaming apps wherein I am relying on ID3 tags for reading 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 doc 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.