Dunfey · Hotel WWDC as data, est. 1983
Front desk everything
Years
Topics

2024 Spatial ComputingAudio & Video

WWDC24 · 17 min · Spatial Computing / Audio & Video

Enhance the immersion of media viewing in custom environments

Extend your media viewing experience using Reality Composer Pro components like Docking Region, Reverb, and Virtual Environment Probe. Find out how to further enhance immersion using Reflections, Tint Surroundings Effect, SharePlay, and the Immersive Environment Picker.

Watch at developer.apple.com ↗

Transcript all transcripts

Chapters

Code shown on screen · 2 snippets

Add environments to the Immersive Environment Picker swift · at 15:14 ↗
WindowGroup {
            ContentView()
                .immersiveEnvironmentPicker {
                    ForEach(viewModel.environmentItems) { item in
                        Button(item.title, image: item.thumbnail) {
                            Task { 
                                await openImmersiveSpace(id: item.id)
                            }
                        }
                    }
                }
        }
Synchronization of an environment state using SharePlay swift · at 15:47 ↗
import AVKit
import GroupActivities

   for await session in MyActivity.sessions() {
        
        // join the session, activate the activity, etc.

        playerViewController
            .player?
            .playbackCoordinator
            .coordinateWithSession(session)

        playerViewController
            .groupExperienceCoordinator
            .coordinateWithSession(session)
    }

Resources