Skip to main content
Version: iOS 1.0.12

Stream Screen Capture

Stream a Screen Capture of Your App#

This example creates a webview and broadcasts your apps screen.

Please note that streaming is paused if you move your app into background. To enable streaming from background, you will have to implement a broadcast extension.

override func viewDidLoad() {
// Prepare webview that we are going to broadcast
webView.anchor(top: view.topAnchor, leading: view.leadingAnchor, bottom: view.bottomAnchor, trailing: view.trailingAnchor)
webView.navigationDelegate = self
let url = URL(string: "")!
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true
let vkLive = VKLiveStream()
// Set streaming mode to screen and audio capture
vkLive.streamingMode = .appScreenCaptureAndAudio
// Start Broadcasting .lowLatency) { (stream, error) in
guard let stream = stream else {
print("There was an error starting your stream.")
print("Stream started: \(")
print("Playback url: " + stream.getPlaybackUrl()?.absoluteString ?? "Error retrieving stream URL")
Last updated on by Mattia Iavarone