스트리밍은 대부분의 브라우저와
Developer 앱에서 사용할 수 있습니다.
-
매력적인 공간 비디오 및 사진 경험 빌드하기
공간 비디오 및 사진을 앱으로 가져오는 방법을 알아보세요. 스테레오스코프 미디어의 여러 유형을 살펴보고, iPhone 15 Pro에서 iOS 앱의 공간 비디오를 캡처하는 방법을 알아보세요. 새로운 QuickLook Preview Application API 등 visionOS에서 공간 미디어를 감지하고 표시하는 다양한 방법을 확인해 보세요. 사진 또는 비디오에 공간 컴퓨팅을 적용하는 메타데이터 및 스테레오 개념에 대해서도 자세히 알아보세요.
챕터
- 0:00 - Introduction
- 1:07 - Types of stereoscopic experiences
- 4:13 - Tour of the new APIs
- 13:14 - Deep dive into spatial media formats
리소스
- AVCam
- Converting side-by-side 3D video to multiview HEVC and spatial video
- Creating spatial photos and videos with spatial metadata
- Forum: Spatial Computing
- Writing spatial photos
관련 비디오
WWDC24
- 공간 웹을 위해 최적화하기
- 맞춤형 환경에서 더욱 몰입감 넘치는 미디어 시청 경험 만들기
- iOS 또는 iPadOS 게임을 visionOS로 가져오기
- visionOS용 훑어보기의 새로운 기능
WWDC23
-
다운로드Array
-
-
6:19 - Spatial video capture on iPhone 15 Pro
class CaptureManager { var session: AVCaptureSession! var input: AVCaptureDeviceInput! var output: AVCaptureMovieFileOutput! func setupSession() throws -> Bool { session = AVCaptureSession() session.beginConfiguration() guard let videoDevice = AVCaptureDevice.default( .builtInDualWideCamera, for: .video, position: .back ) else { return false } var foundSpatialFormat = false for format in videoDevice.formats { if format.isSpatialVideoCaptureSupported { try videoDevice.lockForConfiguration() videoDevice.activeFormat = format videoDevice.unlockForConfiguration() foundSpatialFormat = true break } } guard foundSpatialFormat else { return false } let videoDeviceInput = try AVCaptureDeviceInput(device: videoDevice) guard session.canAddInput(videoDeviceInput) else { return false } session.addInput(videoDeviceInput) input = videoDeviceInput let movieFileOutput = AVCaptureMovieFileOutput() guard session.canAddOutput(movieFileOutput) else { return false } session.addOutput(movieFileOutput) output = movieFileOutput guard let connection = output.connection(with: .video) else { return false } guard connection.isVideoStabilizationSupported else { return false } connection.preferredVideoStabilizationMode = .cinematicExtendedEnhanced guard movieFileOutput.isSpatialVideoCaptureSupported else { return false } movieFileOutput.isSpatialVideoCaptureEnabled = true session.commitConfiguration() session.startRunning() return true } }
-
9:13 - Observing spatial capture discomfort reasons
let observation = videoDevice.observe(\.spatialCaptureDiscomfortReasons) { (device, change) in guard let newValue = change.newValue else { return } if newValue.contains(.subjectTooClose) { // Guide user to move back } if newValue.contains(.notEnoughLight) { // Guide user to find a brighter environment } }
-
9:58 - PhotosPicker
import SwiftUI import PhotosUI struct PickerView: View { @State var selectedItem: PhotosPickerItem? var body: some View { PhotosPicker(selection: $selectedItem, matching: .spatialMedia) { Text("Choose a spatial photo or video") } } }
-
10:14 - PhotoKit - all spatial assets
import Photos func fetchSpatialAssets() { let fetchOptions = PHFetchOptions() fetchOptions.predicate = NSPredicate( format: "(mediaSubtypes & %d) != 0", argumentArray: [PHAssetMediaSubtype.spatialMedia.rawValue] ) fetchResult = PHAsset.fetchAssets(with: fetchOptions) }
-
10:36 - AVAssetPlaybackAssistant
import AVFoundation extension AVURLAsset { func isSpatialVideo() async -> Bool { let assistant = AVAssetPlaybackAssistant(asset: self) let options = await assistant.playbackConfigurationOptions return options.contains(.spatialVideo) } }
-
-
찾고 계신 콘텐츠가 있나요? 위에 주제를 입력하고 원하는 내용을 바로 검색해 보세요.
쿼리를 제출하는 중에 오류가 발생했습니다. 인터넷 연결을 확인하고 다시 시도해 주세요.