Loading...

Swift 2.0 Programming Language Tutorial: AVFoundation : AVAudioPlayer , NSURL, NSBundle and more

16,264 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Oct 31, 2015

Get our Auto Layout Course. Click below:
http://rshankar.com/courses/autolayou...

Swift Programming Language Tutorial: AVFoundation : AVAudioPlayer , NSURL, NSBundle and more. This is the first in a series of AV or audio visual videos in Swift. In this video, we will develop a simple App that will play an mp3 file. We will be focusing Swift's AVFoundation framework which allows us to play sound files, record audio and much more.

Code:
=====
https://github.com/funzaAcademy/swift...

Script:
=======
Hello People and welcome. This is the first in a series of AV or audio visual videos in Swift.
We will be focusing Swift's AVFoundation framework which allows us to play sound files, record audio and much more.

In this video, we will develop a simple App that will play an mp3 file.
So here's the plan.
We will first download a freely available audio file from the web.
We will then add this file to our Xcode project. We will also add buttons to play, pause and stop this file.
And yeah, we will add a volume controller too.
Then we will write some code to bring bring this functionality to life.
So lets get going, shall we?

References:
========
https://developer.apple.com/library/i...
https://developer.apple.com/library/i...
http://www.ioscreator.com/tutorials/p...
https://developer.apple.com/library/i...
https://developer.apple.com/library/i...
http://www.techotopia.com/index.php/P...
https://developer.apple.com/library/p...
https://www.hackingwithswift.com/swift2
https://www.hackingwithswift.com/new-...
http://www.ioscreator.com/tutorials/p...
https://www.safaribooksonline.com/lib...
https://developer.apple.com/library/i...
http://jlmendezbonini.com/2013/03/27/...
Notes:
======

1. An instance of the AVAudioPlayer class, called an audio player, provides playback of audio data from a file or memory.
2. An NSURL object represents a URL that can potentially contain the location of a resource on a remote server, the path of a local file on disk,
or even an arbitrary piece of encoded data.
3. An NSBundle object represents a location in the file system that groups code and resources that can be used in a program
4. mainBundle() : The NSBundle object that corresponds to the directory where the application executable is located
4. Some operations are not guaranteed to always complete execution or produce a useful output . As an example, consider the task of reading and processing data from a file on disk. There are a number of ways this task can fail. Distinguishing among these different situations allows a program to resolve some errors and to communicate to the user any errors it cant resolve.

Tools Used:
============
Microphone : Blue Yeti
Voice Editor : Audacity
Animation : Sparkol Video scribe
Illustrations: funza Academy + openclipart.org
Video editor + SFX : iMovie + ScreenFlow
Computer : MacBook Air
Content Creator: Sanjay Noronha

Loading...

Advertisement
to add this to Watch Later

Add to

Loading playlists...