Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

swift play audio stream from url

func loadRadio(radioURL: String) {

        guard let url = URL.init(string: radioURL) else { return }
        let playerItem = AVPlayerItem.init(url: url)
        player = AVPlayer.init(playerItem: playerItem)
        player?.play()
        startNowPlayingAnimation(true)
        played = true
    }
Comment

PREVIOUS NEXT
Code Example
Swift :: swiftui button style 
Swift :: swift swipe gesture 
Swift :: convert data to json swift 
Swift :: how to add button dynamically in swift 4 
Swift :: how to play a video in swift 
Swift :: how to check object is nil in swift 
Swift :: Properties Swift 
Swift :: how do i get a string from a float swift to 1 decimal swift 
Swift :: swift for loop 
Swift :: swift post request 
Swift :: swift core data sort by date 
Swift :: swift enum 
Swift :: string.format swift 
Swift :: string to swift 2022 
Swift :: swift add width/height constraint to view 
Swift :: change image tint color swiftui 
Swift :: set in swift 
Swift :: how to change background color of stackview swift 
Swift :: Swift Remove an Element from a Dictionary 
Swift :: swiftui tabview background color 
Swift :: hstack spacing swiftui 
Swift :: swift 5 change message color of alert 
Swift :: fetch request core data 
Swift :: get middle index of center cell in table view swift 
Swift :: Type Constraints Swift 
Swift :: waiting for all the threads to finish swift 
Swift :: uiviewcontroller title color 
Swift :: swift ranges 
Swift :: flow ios swift kotlin 
Swift :: selenium lfor loops 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =