Skip to content

The audio player plays songs in the background and displays the current song on the lock screen and in the control panel

Notifications You must be signed in to change notification settings

YevhenBiiak/06-Audio-Player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The audio player plays songs in the background and displays the current song on the lock screen and in the control panel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages