2025 Audio & Video
WWDC25 · 20 min · Audio & Video
Create a seamless multiview playback experience
Learn how to build advanced multiview playback experiences in your app. We’ll cover how you can synchronize playback between multiple players, enhance multiview playback with seamless AirPlay integration, and optimize playback quality to deliver engaging multiview playback experiences.
Watch at developer.apple.com ↗Chapters
Code shown on screen · 3 snippets
Coordinate playback
import AVFoundation
var closeUpVideo = AVPlayer()
var birdsEyeVideo = AVPlayer()
let coordinationMedium = AVPlaybackCoordinationMedium()
do {
try closeUpVideo.playbackCoordinator.coordinate(using: coordinationMedium)
}catch let error {
// Handle error
}
do {
try birdsEyeVideo.playbackCoordinator.coordinate(using: coordinationMedium)
}catch let error {
// Handle error
} Set preferred participant
import AVFoundation
import AVRouting
var closeUpVideo = AVPlayer()
var birdsEyeVideo = AVPlayer()
let routingPlaybackArbiter = AVRoutingPlaybackArbiter.shared()
routingPlaybackArbiter.preferredParticipantForExternalPlayback = birdsEyeVideo
routingPlaybackArbiter.preferredParticipantForNonMixableAudioRoutes = birdsEyeVideo Set network resource priority
birdsEyeVideo.networkResourcePriority = .high
closeUpVideo.networkResourcePriority = .low Resources
Related sessions
-
38 min