Launch Floating Player (iOS)

We can utilize the VideoFeedViewController.openVideoPlayer API with pinned playback mode to directly launch the floating player. The code snippets are:

let channelID = "Your encoded channel id"
let playlistID = "Your encoded playlist id"
var configuration = VideoFeedContentConfiguration()
VideoFeedViewController.openVideoPlayer(
    source: .channelPlaylist(channelID: channelID, playlistID: playlistID),
    playbackMode: .pinned, // Use pinned playback mode
    feedConfiguration: configuration,
    isPictureInPictureEnabled: true
) { result in
    debugPrint("Opened player with result: \(result)")
}

Last updated

Was this helpful?