Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GoLive/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
<outlet property="broadcastButton" destination="tL4-2S-1Xx" id="LTc-Ll-GBH"/>
<outlet property="colorSelector" destination="hIQ-gJ-1O9" id="RW6-UB-1cP"/>
<outlet property="colorView" destination="FRj-uP-fsm" id="vxJ-eg-lp3"/>
<outlet property="micLabel" destination="T7y-DL-IMw" id="ReC-fz-4TO"/>
<outlet property="micSwitch" destination="Xbd-Ej-U93" id="F8o-O8-gN9"/>
<outlet property="statusLabel" destination="G6P-o7-xf2" id="OJR-G4-hQD"/>
</connections>
Expand Down
24 changes: 14 additions & 10 deletions GoLive/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,24 @@ class ViewController: UIViewController, RPBroadcastActivityViewControllerDelegat

func broadcastStarted() {
// Called to update the UI when a broadcast starts.
broadcastButton.setTitle("Stop Broadcast", for: .normal)
statusLabel.text = "You are live!" // Any app that does not notify the user that they are live will be rejected in app review.
statusLabel.textColor = UIColor.red
micSwitch.isHidden = false
micLabel.isHidden = false
DispatchQueue.main.sync {
broadcastButton.setTitle("Stop Broadcast", for: .normal)
statusLabel.text = "You are live!" // Any app that does not notify the user that they are live will be rejected in app review.
statusLabel.textColor = UIColor.red
micSwitch.isHidden = false
micLabel.isHidden = false
}
}

func broadcastEnded() {
// Called to update the UI when a broadcast ends.
broadcastButton.setTitle("Start Broadcast", for: .normal)
statusLabel.text = "You are not live"
statusLabel.textColor = UIColor.black
micSwitch.isHidden = true
micLabel.isHidden = true
DispatchQueue.main.sync {
broadcastButton.setTitle("Start Broadcast", for: .normal)
statusLabel.text = "You are not live"
statusLabel.textColor = UIColor.black
micSwitch.isHidden = true
micLabel.isHidden = true
}
}


Expand Down