Instance Method

playerViewController(_:didReject:)

Tells the delegate the user rejects the presented content proposal.

Declaration

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

Parameters

playerViewController

The player view controller to which this delegate is assigned.

proposal

The content proposal.

Discussion

The delegate should react to the user rejecting the content proposal, typically by dismissing the player view controller. If you do not implement this method, the player view controller will be dismissed.

See Also

Responding to Content Proposals

func playerViewController(AVPlayerViewController, didAccept: AVContentProposal)

Tells the delegate the user accepts the presented content proposal.

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

Tells the delegate whether the content proposal should be presented.