Created
December 14, 2018 07:58
-
-
Save SunXiaoShan/eda962cf792d901558b8835befec0c29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension ViewController: RPBroadcastActivityViewControllerDelegate { | |
func broadcastActivityViewController(_ broadcastActivityViewController: RPBroadcastActivityViewController, didFinishWith broadcastController: RPBroadcastController?, error: Error?) { | |
// Step 1 | |
guard error == nil else { | |
print("Broadcast Activity Controller is not available.") | |
return | |
} | |
// Step 2 | |
broadcastActivityViewController.dismiss(animated: true) { | |
// Step 3 | |
broadcastController?.startBroadcast { error in | |
// Step 4 | |
if error == nil { | |
print("Broadcast started successfully!") | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment