AVSimplePlayer in Swift?
AVSimplePlayer in Swift?
- Subject: AVSimplePlayer in Swift?
- From: Charles Jenkins <email@hidden>
- Date: Fri, 06 Jan 2017 22:32:13 -0500
Has anyone recoded Apple's AVSimplePlayer example in Swift?
I’m trying to do that in order to get some AVFoundation experience in
Swift, and I’m having a bit of trouble. I can’t figure out how to do the
bindings to currentTime and duration.
- If I do them the easy way, using didSet clause, everything works and I
can play the video and use the Rewind and Fast Forward buttons to alter
playback rate, but I can’t scrub using the time slider.
- If I imitate the ObjC version and try to do the bindings in IB, the
time slider’s maxValue and value bindings don’t work (won’t compile)
because duration and currentTime are not NSNumbers.
- And if I change duration and currentTime to computed variables based
on NSNumber, the video won’t play at all.
Any suggestions?
--
Charles
_______________________________________________
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