Having already added all the videos you need to deliver a rich and immersive user experience, you can now add the necessary code to play a video continuously in the background. For that purpose, you can leverage the power of the AVFoundation on tvOS. The AV Foundation framework provides a great interface for managing and playing audiovisual media on tvOS.
- [Instructor] After a lot of preparations,…we have finally reached a point…where we can write code, and we're going to…start with the video background for the…Your Location tab in our Application.…And to get started, please open up…the Your Location View Controller in our project,…and we need to import here a set of classes…that is going to be responsible for…media playback, which is called, AVFoundation,…and this gives us, for example, AVPlayerLayer.…We're going to use these classes…to define some properties here, right below…our outlets for the User Interface components.…
And the first property is going to be…an AVPlayer, which is off the type AVPlayer.…And the AVPlayer is a controller object…used to manage the playback and timing of a media asset.…And we're going to use another AVPlayerLayer object…here as a property, which is an AVPlayerLayer.…And AVPlayerLayer is a subclass of CA Layer,…to which an AVPlayer object can direct…it's visual output, and this is…what we're going to use to add…to our View Controller's View.…
- The Siri remote
- The focus model
- Adding video assets and imagery
- UIKit components
- Location services
- Accessing a Web API
- Enabling the top shelf and layered images
- Setting up shortcuts
- Communicating with URL schemes
- Adding a layered app icon
Skill Level Beginner
1. Introducing tvOS Development
What makes tvOS special?3m 35s
2. Your First tvOS App: Build the UI
3. Your First tvOS App: Add the Logic
4. Multipeer Connectivity
5. Final Touches
Next steps1m 18s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.