Skip to content

Latest commit

 

History

History
64 lines (53 loc) · 2.87 KB

README.md

File metadata and controls

64 lines (53 loc) · 2.87 KB

06-Audio-Player

(No Storyboard, no UITableView)

Description:

This project is an audio player app that allows users to play music from their device's local storage. The app loads songs from the main bundle using the Storage class, which uses the AVFoundation framework to extract metadata from the songs, such as title, artist, and artwork. The app supports remote control events, such as play, pause, next, and previous.

Features:

  • Play/pause, skip forward/backward;
  • Play music in the background;
  • Change the system volume;
  • Supports remote control;
  • Display the current song's title, artist, and artwork;
  • Display a playlist of all available songs;
  • Choose from four different play modes: repeat playlist, repeat song, shuffle, and once;
  • Seek through a song using a slider.

Used Frameworks:

  • UIKit for creating the user interface and handling user interactions;
  • AVFoundation for playing audio and extracting metadata from audio files;
  • MediaPlayer for controlling the system's audio output volume.
Used classes
UI Elements Additionally
UINavigationController AVAudioPlayer
UILabel AVAsset
UIButton AVAudioSession
UIImageView MPVolumeView
UIImage MPNowPlayingInfoCenter
UITapGestureRecognizer CALayer
UIView NSLayoutConstraint
UISlider NSAttributedString
UIStackView UIButton.Configuration
UIScrollView DateFormatter
UIEvent NotificationCenter
UIVisualEffectView Timer
UIBlurEffect KVO

Used Technology Stack:

  • Swift programming language (lazy variables, closures, and extensions);
  • Model-View-Controller (MVC) application architecture;
  • AVAudioPlayer for playing music;
  • Delegation pattern for communicating between classes and passing data;
  • Observer pattern (NSKeyValueObservation) for monitoring changes in sound volume.

GIF DEMO