motion/project/template/ios-broadcast-ui-extension/files/app/broadcast_view_controller.rb
def userDidFinishSetup
    # Broadcast url that will be returned to the application
    broadcastURL = NSURL.URLWithString("http://broadcastURL_example/stream1")

    # Service specific broadcast data example which will be supplied to the process extension during broadcast
    userID = "user1"
    endpointURL = "http://broadcastURL_example/stream1/upload"
    setupInfo = { userID: userID, endpointURL: endpointURL }

    # Set broadcast settings
    broadcastConfig = RPBroadcastConfiguration.new
    broadcastConfig.clipDuration = 5 # deliver movie clips every 5 seconds

    # Tell ReplayKit that the extension is finished setting up and can begin broadcasting
    self.extensionContext.completeRequestWithBroadcastURL(broadcastURL, broadcastConfiguration:broadcastConfig, setupInfo:setupInfo)
  end
# Called when the user has finished interacting with the view controller and a broadcast stream can start
Called when the user has finished interacting with the view controller and a broadcast stream can start
Called when the user has finished interacting with the view controller and a broadcast stream can start
def userDidFinishSetup
    broadcastURL = NSURL.URLWithString("http://broadcastURL_example/stream1")
    userID = "user1"
    endpointURL = "http://broadcastURL_example/stream1/upload"
    setupInfo = { userID: userID, endpointURL: endpointURL }
    broadcastConfig = RPBroadcastConfiguration.new
    broadcastConfig.clipDuration = 5 
    self.extensionContext.completeRequestWithBroadcastURL(broadcastURL, broadcastConfiguration:broadcastConfig, setupInfo:setupInfo)
  end
def userDidFinishSetup broadcastURL = NSURL . URLWithString ( "http://broadcastURL_example/stream1" ) userID = "user1" endpointURL = "http://broadcastURL_example/stream1/upload" setupInfo = { userID : userID , endpointURL : endpointURL } broadcastConfig = RPBroadcastConfiguration . new broadcastConfig . clipDuration = 5 self . extensionContext . completeRequestWithBroadcastURL ( broadcastURL , broadcastConfiguration : broadcastConfig , setupInfo : setupInfo ) end
Called when the user has finished interacting with the view controller and a broadcast stream can start
Called when the user has finished interacting with the view controller and a broadcast stream can start
# Broadcast url that will be returned to the application # Service specific broadcast data example which will be supplied to the process extension during broadcast # Set broadcast settings # deliver movie clips every 5 seconds # Tell ReplayKit that the extension is finished setting up and can begin broadcasting