Instance Method

playerViewController(_:didAccept:)

Tells the delegate the user accepts the presented content proposal.

Declaration

optional func playerViewController(_ playerViewController: AVPlayerViewController, didAccept proposal: AVContentProposal)

Parameters

playerViewController

The player view controller to which this delegate is assigned.

proposal

The content proposal.

Discussion

If you implement this method, you should replace the player’s current player item with a player item for the proposed content.

See Also

Responding to Content Proposals

func playerViewController(AVPlayerViewController, didReject: AVContentProposal)

Tells the delegate the user rejects the presented content proposal.

func playerViewController(AVPlayerViewController, shouldPresent: AVContentProposal) -> Bool

Tells the delegate whether the content proposal should be presented.