Structure

WKAudiovisualMediaTypes

The media types that require a user gesture to begin playing

Declaration

struct WKAudiovisualMediaTypes

Overview

To indicate that no user gestures are required to play media, use an empty set of audio/visual media types, indicated by the empty array literal, []. For example, let myAudiovisualMediaType: WKAudiovisualMediaTypes = [].

Topics

Type Properties

static var all: WKAudiovisualMediaTypes

All media types require a user gesture to begin playing.

static var audio: WKAudiovisualMediaTypes

Media types containing audio require a user gesture to begin playing.

static var video: WKAudiovisualMediaTypes

Media types containing video require a user gesture to begin playing.

Relationships

Conforms To

See Also

Setting Media Playback Preferences

var allowsInlineMediaPlayback: Bool

A Boolean value indicating whether HTML5 videos play inline or use the native full-screen controller.

var allowsAirPlayForMediaPlayback: Bool

A Boolean value indicating whether AirPlay is allowed.

var allowsPictureInPictureMediaPlayback: Bool

A Boolean value indicating whether HTML5 videos can play picture-in-picture.

var mediaTypesRequiringUserActionForPlayback: WKAudiovisualMediaTypes

Determines which media types require a user gesture to begin playing.

var mediaPlaybackAllowsAirPlay: Bool

Deprecated property. Instead, use allowsAirPlayForMediaPlayback.

Deprecated
var requiresUserActionForMediaPlayback: Bool

A Boolean value indicating whether HTML5 videos require the user to start playing them (true) or whether the videos can be played automatically (false).

Deprecated