Class

AVContentProposal

An object that describes the content proposed to follow the current item.

Declaration

class AVContentProposal : NSObject

Overview

An AVContentProposal object models the data about the proposed content such as its title, preview image, presentation time, and content URL. A content proposal becomes eligible to be presented when set as the nextContentProposal of the current AVPlayerItem.

let proposal = AVContentProposal(contentTimeForTransition: time,
                                 title: title,
                                 previewImage: image)
// Set the proposal as the nextContentProposal of the current player item
currentPlayerItem.nextContentProposal = proposal

Topics

Creating a Content Proposal

init(contentTimeForTransition: CMTime, title: String, previewImage: UIImage?)

Creates a new instance of AVContentProposal with the specified transition time, title, and preview image.

Configuring the Content Proposal

var contentTimeForTransition: CMTime

The time within the timeline of the current player item when the content proposal presentation should begin.

var title: String

The title of the proposed content.

var previewImage: UIImage?

The preview image of the proposed item.

var metadata: [AVMetadataItem]

Optional custom metadata associated with the proposed item.

var automaticAcceptanceInterval: TimeInterval

The interval between the time playback ends, and automatic acceptance of this content proposal.

var url: URL?

The URL for the proposed content.

Relationships

Inherits From

See Also

Up Next Content

Presenting Content Proposals (tvOS)

Display a preview of an upcoming media item at the conclusion of the currently playing media item.

class AVContentProposalViewController

A view controller used to create custom content proposal presentations.