• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AVSimplePlayer in Swift?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: AVSimplePlayer in Swift? (From: Charles Jenkins <email@hidden>)

  • Prev by Date: Re: Change NSCursor globally
  • Next by Date: CoreData: error: couldn't read cache file
  • Previous by thread: Re: AVSimplePlayer in Swift?
  • Next by thread: Optionality in a NSManagedObject sub-class
  • Index(es):
    • Date
    • Thread