A view displaying a broadcast button that, when tapped, shows a broadcast picker.
SDKs
- iOS 12.0+
- Mac Catalyst 13.0+
Framework
- Replay
Kit
Declaration
class RPSystemBroadcastPickerView : UIView
Overview
Add this view to your view hierarchy to let users broadcast directly from your app. When a user taps the broadcast button, it displays a broadcast picker, allowing the user to select a broadcast provider.
Note
When your iPad app runs in macOS, clicking the broadcast button has no effect.
You can limit the picker to a particular broadcast provider by setting preferred
to the bundle identifier of a broadcast extension. You can also show or hide the microphone button displayed in the picker by setting the shows
property. Set these properties before presenting RPSystem
, as shown here:
class ViewController: UIViewController {
@IBOutlet var containerView: UIView!
override func viewDidLoad() {
super.viewDidLoad()
let broadcastPicker = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
broadcastPicker.preferredExtension = "com.your-app.broadcast.extension"
containerView.addSubview(broadcastPicker)
}
}