kaltura / playkit-ios

PlayKit: Kaltura Player SDK for iOS
https://developer.kaltura.com/player/ios
GNU Affero General Public License v3.0
87 stars 37 forks source link

fix: post seeking notification before initiating AVPlayer seek operation #476

Closed kononenkoAnton closed 3 months ago

kononenkoAnton commented 6 months ago

Description of the Changes

Moved the 'seeking' notification to precede the initiation of the AVPlayer seek operation. This change aims to mitigate potential edge cases where the 'seeking' operation could be erroneously called after the 'seeked' notification, ensuring a more accurate sequence of event notifications.

In our release builds, we found a problem where sometimes the 'seeked' event happens before the 'seeking' event. This happens right after we set up the player and try to move to a 'continue watching' position. We couldn't see this issue when we were debugging, but looking closer at the Play-Kit code, we think the issue might be because of the order we send out notifications. This update fixes that by making sure we send the 'seeking' notification before we start the seek. This should stop the 'seeked' event from showing up too early.

Also question about in case failed, are you expecting to do seeked event or some new event seekFailed

CheckLists

kaltura-hooks commented 6 months ago

Hi @kononenkoAnton, Thank you for contributing this pull request! Please sign the Kaltura CLA so we can review and merge your contribution. Learn more at http://bit.ly/KalturaContrib

x-NR-x commented 5 months ago

Hi @kononenkoAnton,

Thank you for your contribution. Regarding your question, I currently don't know of an additional events, but will check.

Thanks, Nilit Danan