Skip to content

Picture in Picture not working #776

@bstillitano

Description

@bstillitano

What did you do?

I have got a live stream up and running however noticing that when closing the app on a simulator that supports PiP, it just minimises the app instead of entering PiP mode.

struct WatchView: View {
    static let apiKey = "SOME_KEY"
    static let token = "TOKEN_HERE"
    static let callId = "SOME_ID"

    @State var pip: Bool = false

    @StateObject var streamVideo = StreamVideo(
        apiKey: apiKey,
        user: .anonymous,
        token: .init(rawValue: token)
    )

    var body: some View {
        LivestreamPlayer(type: "livestream", id: Self.callId)
    }
}

What did you expect to happen?

Expected that the app would enter PiP mode when minimising the app.

What happened instead?

It just minimises the app and pauses the stream in the background.

GetStream Environment

GetStream Video version: 1.21.0
GetStream Video frameworks: StreamVideo, StreamVideoSwiftUI
iOS version: 18.4
Swift version: 6.0
Xcode version: 16.4
Device: iPhone 16 Pro Max (Simulator)

Additional context

I have ensured the PiP capability is enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions