Skip to content

Instantly share code, notes, and snippets.

@atulkhatri
Created July 12, 2021 17:52
Show Gist options
  • Save atulkhatri/f6237f2183f8b35b21a4c3abb4e30581 to your computer and use it in GitHub Desktop.
Save atulkhatri/f6237f2183f8b35b21a4c3abb4e30581 to your computer and use it in GitHub Desktop.
tvOS Bootcamp Player 7
extension PlayerViewController: AVPlayerViewControllerDelegate {
func playerViewController(_ playerViewController: AVPlayerViewController, willPresent interstitial: AVInterstitialTimeRange) {
let playerVC = PlayerViewController()
playerVC.url = kAdvertUrl
present(playerVC, animated: false, completion: nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment