Basic Explanation - Storm iOS Library

StormLibrary is a signal and data processing library designed for Storm Server Server, and based on the AVPlayer library. This library is only used to run the playback, as it does not include a working user interface (GUI), like its JavaScript counterpart.

It is also possible to use our free and ready-to-use ios player component, which comes with a complete, working GUI. By modifying its code, it might be easier to get your streaming service running. Click here to check our Storm iOS Player.

ContentView.swift file

                        
import SwiftUI
import StormLibrary

struct ContentView: View {

    @StateObject var stormImpl = StormImpl()

    var body: some View {
        AVPlayerView(player: stormImpl.stormLibrary.getAvPlayer())
        HStack{
            Button("Play"){
                do{
                    try stormImpl.stormLibrary.play()
                }catch{
                    print(error)
                }
            }
            Button("Pause"){
                stormImpl.stormLibrary.pause()
            }
        }
    }
}
                    

StormImpl.swift file

                        
import SwiftUI
import StormLibrary

class StormImpl : ObservableObject{

        public var stormLibrary : StormLibrary

    init() {

        stormLibrary = StormLibrary()

        stormLibrary.addStormMediaItem(stormMediaItem: StormMediaItem(host: "sub1.domain.com", port: 80, isSSL: false, applicationName: "live", streamName: "test_hd", label: "720p", isSelected: true))

    }

}
                    
Next Step

In the next step you'll learn more about controlling streams in Media Management guide.

Support Needed?

Create a free ticket and our support team will provide you necessary assistance.