#audioplayer #mp3player #HLS #livestream #audiostream #radio #radioplayer #musicplayer #musicstream #objective-c #swift #swift5 #iOS
- Live audio streaming
- HLS/m3u8/m3u audio streaming
- Play from local audio file
- Supports many audio codecs incluing mp3 & m4a
- Swift 5
Objective-C- iOS 9 and above
- Manages playlist
- Audio interruptions handling
- Background play
- Actions from Control Center/EarPods
- Update UI in Control Center
Drag and drop SDK in your project.
Create song object
let song = MySongObj()//MySongObj is your class which implements SHAudioPlayerItemProtocol
song.songUrl = your song URL
song.albumArtImage = UIImage(named: "MusicImg")//Optional album art image. Also support url, provided code in MySongObj class.
Setup playlist
let arSongs = [song]//Playlist
SHAudioPlayer.shared.initialize(songsAr: arSongs)
Play
SHAudioPlayer.shared.play(atIndex: 0)
For more details, please look ViewController.swift
in sample project.
Note: At present we are providing two SDK, one is specifically for real device and another one is specifically for simulator. You can find both inside SDK folder.