Go Live with ReplayKit

121
© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Graphics and Games #WWDC16 Session 601 Go Live with ReplayKit Ben Harry Software Engineer Edwin Iskandar Software Engineer

Transcript of Go Live with ReplayKit

Page 1: Go Live with ReplayKit

© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Graphics and Games #WWDC16

Session 601

Go Live with ReplayKit

Ben Harry Software EngineerEdwin Iskandar Software Engineer

Page 2: Go Live with ReplayKit

ReplayKit

Record app visuals and audioRecord microphone inputShare recordingsSimple API

Page 3: Go Live with ReplayKit

ReplayKit

HD quality• Low performance impact• Minimal power usage

Privacy safeguards• User consent prompt• Recording excludes system UI

Available since iOS 9

Page 4: Go Live with ReplayKit

ReplayKit NEW

Page 5: Go Live with ReplayKit

ReplayKit

Apple TV support

NEW

Page 6: Go Live with ReplayKit

ReplayKit

Apple TV supportLive broadcasting

NEW

Page 7: Go Live with ReplayKit

ReplayKit

Apple TV supportLive broadcastingExpanded commentary options

NEW

Page 8: Go Live with ReplayKit

ReplayKit Architecture

Application

Application

Page 9: Go Live with ReplayKit

ReplayKit Architecture

Application

RPScreenRecorder

Application

Page 10: Go Live with ReplayKit

ReplayKit Architecture

Replay Daemon MovieSystem

Application

RPScreenRecorder

Application

Page 11: Go Live with ReplayKit

Replay Daemon Preview and Share ExtensionMovieSystem

ReplayKit Architecture

Application

RPScreenRecorder RPPreviewViewController

Application

Page 12: Go Live with ReplayKit

Classes and Protocols

Page 13: Go Live with ReplayKit

Classes and Protocols

RPScreenRecorder

• Start, stop, discard recording• Check availability to record

RPScreenRecorderDelegate

• Availability changes• Recording stops

Page 14: Go Live with ReplayKit

Classes and Protocols

RPScreenRecorder

• Start, stop, discard recording• Check availability to record

RPScreenRecorderDelegate

• Availability changes• Recording stops

RPPreviewViewController

• Preview the recording• Edit and trim (iOS)• Share

RPPreviewViewControllerDelegate

• Finished with preview user interface

Page 15: Go Live with ReplayKit

DemoReplayKit on Apple TV

Page 16: Go Live with ReplayKit

From beginning to endReplayKit on Apple TV

Menu

Record

Page 17: Go Live with ReplayKit

From beginning to endReplayKit on Apple TV

Menu

Record

Gameplay

Recording

Page 18: Go Live with ReplayKit

From beginning to endReplayKit on Apple TV

MenuMenu

Record

Gameplay

StopRecording

Page 19: Go Live with ReplayKit

Menu

From beginning to endReplayKit on Apple TV

Preview Share

MenuMenu

Record

Gameplay

StopRecording

Page 20: Go Live with ReplayKit

Start Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

Page 21: Go Live with ReplayKit

Start Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func didPressRecordButton() { let sharedRecorder = RPScreenRecorder.shared()

sharedRecorder.startRecording { error in if error == nil { self.showIndicatorView(text: "Recording") } } }

Page 22: Go Live with ReplayKit

Start Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func didPressRecordButton() { let sharedRecorder = RPScreenRecorder.shared()

sharedRecorder.startRecording { error in if error == nil { self.showIndicatorView(text: "Recording") } } }

Page 23: Go Live with ReplayKit

Start Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func didPressRecordButton() { let sharedRecorder = RPScreenRecorder.shared()

sharedRecorder.startRecording { error in if error == nil { self.showIndicatorView(text: "Recording") } } }

Page 24: Go Live with ReplayKit

Start Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func didPressRecordButton() { let sharedRecorder = RPScreenRecorder.shared()

sharedRecorder.startRecording { error in if error == nil { self.showIndicatorView(text: "Recording") } } }

Page 25: Go Live with ReplayKit

Excluding UI

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

Page 26: Go Live with ReplayKit

Excluding UI

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func showIndicatorView(text: String) {

recordingIndicatorWindow = UIWindow(frame: UIScreen.main().bounds) recordingIndicatorWindow?.isHidden = false recordingIndicatorWindow?.backgroundColor = UIColor.clear() recordingIndicatorWindow?.isUserInteractionEnabled = false let indicatorView = IndicatorView(text: text) recordingIndicatorWindow?.addSubview(indicatorView) }

Page 27: Go Live with ReplayKit

Excluding UI

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func showIndicatorView(text: String) {

recordingIndicatorWindow = UIWindow(frame: UIScreen.main().bounds) recordingIndicatorWindow?.isHidden = false recordingIndicatorWindow?.backgroundColor = UIColor.clear() recordingIndicatorWindow?.isUserInteractionEnabled = false let indicatorView = IndicatorView(text: text) recordingIndicatorWindow?.addSubview(indicatorView) }

Page 28: Go Live with ReplayKit

Excluding UI

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func showIndicatorView(text: String) {

recordingIndicatorWindow = UIWindow(frame: UIScreen.main().bounds) recordingIndicatorWindow?.isHidden = false recordingIndicatorWindow?.backgroundColor = UIColor.clear() recordingIndicatorWindow?.isUserInteractionEnabled = false let indicatorView = IndicatorView(text: text) recordingIndicatorWindow?.addSubview(indicatorView) }

Page 29: Go Live with ReplayKit

Stop Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

Page 30: Go Live with ReplayKit

Stop Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func didPressStopButton() {

sharedRecorder.stopRecording { previewViewController, error in

self.hideIndicatorView()

if error == nil { self.previewViewController = previewViewController

self.previewViewController?.previewControllerDelegate = self } } }

Page 31: Go Live with ReplayKit

Stop Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func didPressStopButton() {

sharedRecorder.stopRecording { previewViewController, error in

self.hideIndicatorView()

if error == nil { self.previewViewController = previewViewController

self.previewViewController?.previewControllerDelegate = self } } }

Page 32: Go Live with ReplayKit

Stop Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func didPressStopButton() {

sharedRecorder.stopRecording { previewViewController, error in

self.hideIndicatorView()

if error == nil { self.previewViewController = previewViewController

self.previewViewController?.previewControllerDelegate = self } } }

Page 33: Go Live with ReplayKit

Stop Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

func didPressStopButton() {

sharedRecorder.stopRecording { previewViewController, error in

self.hideIndicatorView()

if error == nil { self.previewViewController = previewViewController

self.previewViewController?.previewControllerDelegate = self } } }

Page 34: Go Live with ReplayKit

Preview Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

Page 35: Go Live with ReplayKit

Preview Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

Page 36: Go Live with ReplayKit

Preview Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

// RPPreviewViewController public var mode: RPPreviewViewControllerMode

Page 37: Go Live with ReplayKit

Preview Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

// RPPreviewViewController public var mode: RPPreviewViewControllerMode

func didPressPreviewButton() { if let preview = previewViewController { preview.mode = .preview self.present(preview, animated: true) } }

Page 38: Go Live with ReplayKit

Share Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

Page 39: Go Live with ReplayKit

Share Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

// RPPreviewViewController public var mode: RPPreviewViewControllerMode

Page 40: Go Live with ReplayKit

Share Recording

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

// RPPreviewViewController public var mode: RPPreviewViewControllerMode

func didPressShareButton() { if let preview = previewViewController { preview.mode = .share self.present(preview, animated: true) } }

Page 41: Go Live with ReplayKit

Dismissing Preview UI

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

Page 42: Go Live with ReplayKit

Dismissing Preview UI

Menu

Preview Share

MenuMenu

Record

Gameplay

StopRecording

// RPPreviewViewControllerDelegate func previewControllerDidFinish(_ previewController: RPPreviewViewController) { previewController.dismiss(animated: true) }

Page 43: Go Live with ReplayKit

Discarding the Recording

Automatically discarded when new recording starts• One recording allowed at a time, per app

Discard when preview no longer available• Use discardRecording()

Page 44: Go Live with ReplayKit

ReplayKit on Apple TV

Record your app video and audio content• Microphone reserved by system

Preview and share the recordingSame simple API as iOSNew in tvOS 10

Page 45: Go Live with ReplayKit

Live Broadcast

Edwin Iskandar Software Engineer

Page 46: Go Live with ReplayKit

Live Broadcast

Broadcast live to 3rd party broadcast servicesDirectly from iOS / tvOS deviceProvide commentary with mic and camera (iOS)Content is secure and only accessible to the broadcast service

NEW

Page 47: Go Live with ReplayKit
Page 48: Go Live with ReplayKit
Page 49: Go Live with ReplayKit
Page 50: Go Live with ReplayKit
Page 51: Go Live with ReplayKit
Page 52: Go Live with ReplayKit
Page 53: Go Live with ReplayKit
Page 54: Go Live with ReplayKit

Olympus Rising: Epic SiegeOlympus Rising: Epic Siege

Alex

Daisy

Alex

Daisy

Page 55: Go Live with ReplayKit

Game Implementation

Page 56: Go Live with ReplayKit
Page 57: Go Live with ReplayKit

Initiate Broadcast

Page 58: Go Live with ReplayKit

Initiate Broadcast

Select a Broadcast Service

Page 59: Go Live with ReplayKit

Initiate Broadcast

Select a Broadcast Service

Set Up a Broadcast

Page 60: Go Live with ReplayKit

Initiate Broadcast

Select a Broadcast Service

Set Up a Broadcast

Start and Stop a Broadcast

Page 61: Go Live with ReplayKit

Initiate Broadcast

Select a Broadcast Service

Set Up a Broadcast

Start and Stop a Broadcast

Indicate Broadcast

Page 62: Go Live with ReplayKit

Initiate Broadcast

Upload

Select a Broadcast Service

Set Up a Broadcast

Start and Stop a Broadcast

Indicate Broadcast

Page 63: Go Live with ReplayKit

Initiate Broadcast

Start and Stop a Broadcast

Indicate Broadcast

Upload

Select a Broadcast Service

Set Up a Broadcast

Page 64: Go Live with ReplayKit

Initiating a Broadcast

func didPressBroadcastButton() {

RPBroadcastActivityViewController.load { broadcastAVC, error in if let broadcastAVC = broadcastAVC { broadcastAVC.delegate = self self.present(broadcastAVC, animated: true) } } }

Page 65: Go Live with ReplayKit

Initiating a Broadcast

func didPressBroadcastButton() {

RPBroadcastActivityViewController.load { broadcastAVC, error in if let broadcastAVC = broadcastAVC { broadcastAVC.delegate = self self.present(broadcastAVC, animated: true) } } }

Page 66: Go Live with ReplayKit

Initiating a Broadcast

func didPressBroadcastButton() {

RPBroadcastActivityViewController.load { broadcastAVC, error in if let broadcastAVC = broadcastAVC { broadcastAVC.delegate = self self.present(broadcastAVC, animated: true) } } }

Page 67: Go Live with ReplayKit

Initiating a Broadcast

func didPressBroadcastButton() {

RPBroadcastActivityViewController.load { broadcastAVC, error in if let broadcastAVC = broadcastAVC { broadcastAVC.delegate = self self.present(broadcastAVC, animated: true) } } }

Page 68: Go Live with ReplayKit
Page 69: Go Live with ReplayKit
Page 70: Go Live with ReplayKit

Starting a Broadcast

func broadcastActivityViewController( _ broadcastAVC: RPBroadcastActivityViewController,

didFinishWith broadcastController: RPBroadcastController?, error: NSError?) {

broadcastAVC.dismiss(animated: true) { self.startCountDownTimer { broadcastController?.startBroadcast { error in // broadcast started! } }

Page 71: Go Live with ReplayKit

Starting a Broadcast

func broadcastActivityViewController( _ broadcastAVC: RPBroadcastActivityViewController,

didFinishWith broadcastController: RPBroadcastController?, error: NSError?) {

broadcastAVC.dismiss(animated: true) { self.startCountDownTimer { broadcastController?.startBroadcast { error in // broadcast started! } }

Page 72: Go Live with ReplayKit

Starting a Broadcast

func broadcastActivityViewController( _ broadcastAVC: RPBroadcastActivityViewController,

didFinishWith broadcastController: RPBroadcastController?, error: NSError?) {

broadcastAVC.dismiss(animated: true) { self.startCountDownTimer { broadcastController?.startBroadcast { error in // broadcast started! } }

Page 73: Go Live with ReplayKit

Starting a Broadcast

func broadcastActivityViewController( _ broadcastAVC: RPBroadcastActivityViewController,

didFinishWith broadcastController: RPBroadcastController?, error: NSError?) {

broadcastAVC.dismiss(animated: true) { self.startCountDownTimer { broadcastController?.startBroadcast { error in // broadcast started! } }

Page 74: Go Live with ReplayKit

Starting a Broadcast

func broadcastActivityViewController( _ broadcastAVC: RPBroadcastActivityViewController,

didFinishWith broadcastController: RPBroadcastController?, error: NSError?) {

broadcastAVC.dismiss(animated: true) { self.startCountDownTimer { broadcastController?.startBroadcast { error in // broadcast started! } }

Page 75: Go Live with ReplayKit

Indicating a Broadcast

Animate to indicate activityMerge with controls if space constrainedRequired during broadcast

broadcastController.isBroadcasting

Page 76: Go Live with ReplayKit

Indicating a Broadcast

Animate to indicate activityMerge with controls if space constrainedRequired during broadcast

broadcastController.isBroadcasting

Page 77: Go Live with ReplayKit

Indicating a Broadcast

Animate to indicate activityMerge with controls if space constrainedRequired during broadcast

broadcastController.isBroadcasting

Page 78: Go Live with ReplayKit

Indicating a Broadcast

Animate to indicate activityMerge with controls if space constrainedRequired during broadcast

func updateBroadcastButton() { if self.broadcastController?.isBroadcasting == true { self.startAnimateIndicator() } else { self.stopAnimatingIndicator() } }

broadcastController.isBroadcasting

Page 79: Go Live with ReplayKit

Finish Broadcast

func didPressBroadcastButton() { self.broadcastController?.finishBroadcast { error in if error == nil {

// broadcast finished! self.updateBroadcastUI()

} } }

Page 80: Go Live with ReplayKit

Finish Broadcast

func didPressBroadcastButton() { self.broadcastController?.finishBroadcast { error in if error == nil {

// broadcast finished! self.updateBroadcastUI()

} } }

Page 81: Go Live with ReplayKit

Finish Broadcast

func didPressBroadcastButton() { self.broadcastController?.finishBroadcast { error in if error == nil {

// broadcast finished! self.updateBroadcastUI()

} } }

Page 82: Go Live with ReplayKit

Finish Broadcast

func didPressBroadcastButton() { self.broadcastController?.finishBroadcast { error in if error == nil {

// broadcast finished! self.updateBroadcastUI()

} } }

Page 83: Go Live with ReplayKit

// Error Handling

func broadcastActivityViewController(

_ broadcastActivityViewController: RPBroadcastActivityViewController,

didFinishWith broadcastController: RPBroadcastController?,

error: NSError?) {

self.broadcastController = broadcastController

// set a delegate to be notified of errors

self.broadcastController?.delegate = self

}

Page 84: Go Live with ReplayKit

// Error Handling

func broadcastActivityViewController(

_ broadcastActivityViewController: RPBroadcastActivityViewController,

didFinishWith broadcastController: RPBroadcastController?,

error: NSError?) {

self.broadcastController = broadcastController

// set a delegate to be notified of errors

self.broadcastController?.delegate = self

}

Page 85: Go Live with ReplayKit

// Error Handling

func broadcastController(

_ broadcastController: RPBroadcastController,

didFinishWithError error: NSError?) {

if error != nil {

// error occurred during broadcast

self.showErrorMessage(message: error!.localizedDescription)

// update UI to indicate the broadcast is stopped

self.updateBroadcastUI()

}

}

Page 86: Go Live with ReplayKit

// Error Handling

func broadcastController(

_ broadcastController: RPBroadcastController,

didFinishWithError error: NSError?) {

if error != nil {

// error occurred during broadcast

self.showErrorMessage(message: error!.localizedDescription)

// update UI to indicate the broadcast is stopped

self.updateBroadcastUI()

}

}

Page 87: Go Live with ReplayKit

// Application Backgrounding

func applicationWillResignActive() {

// ReplayKit will automatically pause the broadcast

}

func applicationDidBecomeActive() {

if self.broadcastController?.isBroadcasting == true {

self.promptUserToResumeBroadcast { userWantsToResume in

if (userWantsToResume == true) {

// user wants to resume

self.broadcastController?.resumeBroadcast()

self.updateBroadcastUI()

} else {

// user does not want to resume

self.broadcastController?.finishBroadcast { error in

self.updateBroadcastUI()

}

Page 88: Go Live with ReplayKit

// Application Backgrounding

func applicationWillResignActive() {

// ReplayKit will automatically pause the broadcast

}

func applicationDidBecomeActive() {

if self.broadcastController?.isBroadcasting == true {

self.promptUserToResumeBroadcast { userWantsToResume in

if (userWantsToResume == true) {

// user wants to resume

self.broadcastController?.resumeBroadcast()

self.updateBroadcastUI()

} else {

// user does not want to resume

self.broadcastController?.finishBroadcast { error in

self.updateBroadcastUI()

}

Page 89: Go Live with ReplayKit

// Application Backgrounding

func applicationWillResignActive() {

// ReplayKit will automatically pause the broadcast

}

func applicationDidBecomeActive() {

if self.broadcastController?.isBroadcasting == true {

self.promptUserToResumeBroadcast { userWantsToResume in

if (userWantsToResume == true) {

// user wants to resume

self.broadcastController?.resumeBroadcast()

self.updateBroadcastUI()

} else {

// user does not want to resume

self.broadcastController?.finishBroadcast { error in

self.updateBroadcastUI()

}

Page 90: Go Live with ReplayKit

// Application Backgrounding

func applicationWillResignActive() {

// ReplayKit will automatically pause the broadcast

}

func applicationDidBecomeActive() {

if self.broadcastController?.isBroadcasting == true {

self.promptUserToResumeBroadcast { userWantsToResume in

if (userWantsToResume == true) {

// user wants to resume

self.broadcastController?.resumeBroadcast()

self.updateBroadcastUI()

} else {

// user does not want to resume

self.broadcastController?.finishBroadcast { error in

self.updateBroadcastUI()

}

Page 91: Go Live with ReplayKit

Classes and ProtocolsGame API

Page 92: Go Live with ReplayKit

Classes and Protocols

RPBroadcastActivityViewController

• Present installed broadcast services

RPBroadcastActivityViewControllerDelegate

• Notified when broadcast setup is complete

Game API

Page 93: Go Live with ReplayKit

Classes and Protocols

RPBroadcastActivityViewController

• Present installed broadcast services

RPBroadcastActivityViewControllerDelegate

• Notified when broadcast setup is complete

Game API

RPBroadcastController

• Start and finish broadcast• Check if broadcast is in-progress

RPBroadcastControllerDelegate

• Handle errors during broadcast

Page 94: Go Live with ReplayKit

Broadcast Services

Page 95: Go Live with ReplayKit

Upload

Initiate Broadcast

Select a Broadcast Service

Set Up a Broadcast

Start and Stop a Broadcast

Indicate Broadcast

Page 96: Go Live with ReplayKit

Upload

Initiate Broadcast

Select a Broadcast Service

Set Up a Broadcast

Start and Stop a Broadcast

Indicate Broadcast

Page 97: Go Live with ReplayKit

Upload

Initiate Broadcast

Select a Broadcast Service

Set Up a Broadcast

Start and Stop a Broadcast

Indicate Broadcast

Page 98: Go Live with ReplayKit

Broadcast Services

Broadcast UI Extension• Set up broadcast

Broadcast Upload Extension• Process and upload video and audio data

Upload

Set Up a Broadcast

Page 99: Go Live with ReplayKit

Broadcast Extensions

Embedded in your applicationExecute alongside other application processesCan share data between parent applicationLimited in resources compared to applications

Page 100: Go Live with ReplayKit

Xcode Templates

New Target templates available in XcodeAdd Target -> iOS/tvOS -> Application ExtensionPre-configured with NSExtension properties in info.plist Broadcast UI Extension Broadcast Upload

Page 101: Go Live with ReplayKit

Broadcast UI Extension

Authenticate the user and provide sign-upAccept terms and conditionsSet up the broadcastOptionally share via social mediaNotify setup is complete

Set Up a Broadcast

Page 102: Go Live with ReplayKit

Broadcast Upload Extension

Receive and process video and audio dataUpload to serverImplementation to be defined by broadcast servicesWork together with us

Upload

Page 103: Go Live with ReplayKit

Initiate Broadcast

Select a Broadcast Service

Set Up a Broadcast

Start and Stop a Broadcast

Indicate Broadcast

Upload

Page 104: Go Live with ReplayKit

Initiate Broadcast

Select a Broadcast Service

Set Up a Broadcast

Start and Stop a Broadcast

Indicate Broadcast

Upload

Page 105: Go Live with ReplayKit

Initiate Broadcast

Select a Broadcast Service

Set Up a Broadcast

Start and Stop a Broadcast

Indicate Broadcast

Upload

Page 106: Go Live with ReplayKit

Responsibilities

Initiate Broadcast Select a Broadcast Service Set Up a Broadcast

Start and Stop a Broadcast Upload

Indicate Broadcast

Page 107: Go Live with ReplayKit

Responsibilities

Initiate Broadcast Select a Broadcast Service Set Up a Broadcast

Start and Stop a Broadcast Upload

Indicate Broadcast

Game ReplayKit Broadcast Service

Page 108: Go Live with ReplayKit

Live Broadcasting

Page 109: Go Live with ReplayKit

Expanded Commentary Options

FaceTime camera support Flexible microphone recordingAvailable in iOS 10

Page 110: Go Live with ReplayKit

FaceTime Camera Support

Page 111: Go Live with ReplayKit

FaceTime Camera Support

Page 112: Go Live with ReplayKit

RPScreenRecorder.shared().isCameraEnabled

Camera preview view available in RPScreenRecorderSubclass of UIViewPosition to not obstruct gameplayOptionally allow the user to move it

FaceTime Camera Support

Page 113: Go Live with ReplayKit

RPScreenRecorder.shared().isCameraEnabled

Camera preview view available in RPScreenRecorderSubclass of UIViewPosition to not obstruct gameplayOptionally allow the user to move it

RPScreenRecorder.shared().isCameraEnabled = true

FaceTime Camera Support

Page 114: Go Live with ReplayKit

RPScreenRecorder.shared().isCameraEnabled

Camera preview view available in RPScreenRecorderSubclass of UIViewPosition to not obstruct gameplayOptionally allow the user to move it

if let cameraPreview = RPScreenRecorder.shared().cameraPreviewView { cameraPreview.frame = CGRect(…) self.view.addSubview(cameraPreview)

}

RPScreenRecorder.shared().isCameraEnabled = true

FaceTime Camera Support

Page 115: Go Live with ReplayKit

Microphone Support

Page 116: Go Live with ReplayKit

// Microphone Recording

func enableMic { RPScreenRecorder.shared().isMicrophoneEnabled = true }

func disableMic { RPScreenRecorder.shared().isMicrophoneEnabled = false }

Page 117: Go Live with ReplayKit

Summary

Apple TV supportLive broadcastingExpanded commentary options

Page 118: Go Live with ReplayKit

More Information

https://developer.apple.com/wwdc16/601

Page 119: Go Live with ReplayKit

Related Sessions

What's New in GameplayKit Pacific Heights Thursday 9:00AM

What’s New in SpriteKit Presidio Thursday 5:00PM

What’s New in Game Center Mission Friday 10:00AM

Page 120: Go Live with ReplayKit

Labs

ReplayKit Lab Graphics Lab A Tuesday 12:00PM

ReplayKit Lab Graphics Lab B Wednesday 9:00AM

Page 121: Go Live with ReplayKit