Creates a new capture session in this media environment or throws an error if it can not be created.
The media environment must be activated before the capture session can be started.
method · iOS 17.4+
createXPCRepresentation
TypeScript
createXPCRepresentation(): SDKHandle
Swift declaration
func createXPCRepresentation() -> xpc_object_t
The media environment encoded as an `xpc_object_t`.
method · iOS 17.4+ · Deprecated in iOS 27.0
suspend
TypeScript
suspend(): void
Swift declaration
func suspend() throws
Suspends the media environment.
init · iOS 17.4+
init
TypeScript
static initWebPage(url: string): MediaEnvironment
Swift declaration
init(webPage url: URL)
Creates a new media playback environment identified by the web page URL
- Parameters:
- webPage: The URL identifying the media playback environment