I’m new to swift.
This is a code from this sample becoming_a_now_playable_app, at AssetPlayer
‘s handlePlayerItemChange()
method.
guard let currentIndex = playerItems.firstIndex(where: { $0 == currentItem }) else { return }
At here, playerItems
is an array of AVPlayerItem
, and currentItem
is AVPlayerItem
.
I can’t understand how this code works. How isEqual()
possible for AVPlayerItem
? I can’t find any overrided methods like isEqual()
or hash()
at AVPlayerItem
.