Re: AVSimplePlayer in Swift?
Re: AVSimplePlayer in Swift?
- Subject: Re: AVSimplePlayer in Swift?
- From: Uli Kusterer <email@hidden>
- Date: Sat, 11 Feb 2017 14:19:27 +0100
On 13 Jan 2017, at 00:42, Charles Jenkins <email@hidden> wrote:
> Here is the code I promised to post. This version is using didSet instead
> of KVO. In both cases, if I imitate the way AVSimplePlayer seeks in the
> setter for currentTime, the video won’t play.
Just a thought: Does AVSimplePlayer[ObjC] actually call the getters and setters, or does it assign directly to the ivars? I don't have access to the code right now.
In the latter case, there would be no KVO notification, whereas in your case didSet always runs. Also, AFAIR KVO or at least bindings have loop prevention. So if you're triggering a notification on a particular object/property and while that is being handled in -observeValueForKeyPath:..., it will not send a second notification.
Did you move code from the -observeValueForKeyPath:... into didSet?
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden