In the next step you'll learn more about controlling streams in Media Management guide.
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.
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))
    }
}
                        
                    In the next step you'll learn more about controlling streams in Media Management guide.
Create a free ticket and our support team will provide you necessary assistance.