Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVKit in OSX 10.8

We're developing an OSX app that have to be supported by OSX 10.7 to 10.9. We're currently using QTKit and QTMovieView to show videos, but when trying to upload a new version recently we got this error message:

Deprecated API usage. Apple no longer accepts submissions of apps that use QuickTime APIs.

We have also tested to set the Base SDK to 10.8, but same result there.

And changing to AVKit and AVPlayerView does not work for version prior to 10.9.

So is there a way to use AVKit for versions prior to 10.9 or some way to publish an app with QTKit?

like image 650
Sunkas Avatar asked Mar 30 '14 15:03

Sunkas


1 Answers

You can't use AVKit on OS X versions prior to Mavericks.

But AVKit is a very small framework that only consists of a player view that has some advanced features out of the box (e.g. chapter navigation, selection & trimming, ... - similar to QTMovieView).
If your app doesn't require those features, you can easily implement a view with simple playback functionality with AVFoundation-only classes (AVFoundation was introduced with OS X 10.7).

Instead of AVPlayerView, you can use a combination of AVPlayer & AVPlayerLayer.
There is some Apple sample code that shows how to build a DIY player view here: https://developer.apple.com/library/mac/samplecode/AVSimplePlayerOSX/Introduction/Intro.html#//apple_ref/doc/uid/DTS40011060

This custom player view supports:

  • Play/Pause
  • Rewind
  • Playback progress
  • Fast forward
  • Volume control
like image 144
Thomas Zoechling Avatar answered Sep 28 '22 09:09

Thomas Zoechling