Skip to content

StreamVoodoo/voodoo-spatial-player-sdk

Repository files navigation

VoodooSpatialPlayer

VoodooSpatialPlayer is a Swift package for video streaming playback,.

Installation

Add VoodooSpatialPlayer to your project via Swift Package Manager.

dependencies: [
    .package(url: "https://github.com/StreamVoodoo/voodoo-spatial-player-sdk", from: "1.0.0")
]

Usage

Initialization

Create a VoodooPlayer instance and load a Stream:

import VoodooSpatialPlayer

let player = VoodooPlayer(configuration: .default)

SwiftUI Integration

Use the .voodooPlayer() modifier in your SwiftUI view:

import SwiftUI

struct ContentView: View {
    @State private var player = VoodooPlayer()

    var body: some View {
        Button("Play Stream") {
            try? player.load(userId: "UserId", streamId: "StreamId", showPreview: true)
        }
        .voodooPlayer(player)
    }
}

Playback Controls

player.play()
player.pause()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages