Start or Stop a Recording on a Channel
LiveSwitch has the capability to capture and store individual, multiple or mixed streams in real-time for easy archiving and post-processing.
To record your channel, do the following:
- Configure and enable recording from the Console of your Application and Channel configurations.
- To start recordings on your channel, do one of the following:
- If your channel is active, close it and then restart it.
- If your channel is active but you don't want to restart it, start recording with the LiveSwitch SDK.
- If your channel isn't active, activate it.
Start or Stop a Recording on an Active Channel
Use the LiveSwitch SDK to start or stop a recording on an active channel.
// ChannelClaims must have the "CanUpdate" flag set to true
var ChannelClaims = new[] { new ChannelClaim(ChannelId) { CanUpdate = true } };
// The Channel object mentioned here is the one returned when you call Client.Register()
var channelConfig = new ChannelConfig();
channelConfig.Recording = true;
channel.Update(channelConfig);
// ChannelClaims must have the "CanUpdate" flag set to true
final ChannelClaim channelClaim = new ChannelClaim(channelId);
channelClaim.setCanUpdate(true);
final ChannelClaim[] channelClaims = new ChannelClaim[]{channelClaim};
// The Channel object mentioned here is the one returned when you call Client.Register()
final ChannelConfig channelConfig = new ChannelConfig();
channelConfig.setRecording(NullableBoolean.trueValue());
channel.update(channelConfig);
// ChannelClaims must have the "CanUpdate" flag set to true
let channelClaim: FMLiveSwitchChannelClaim = FMLiveSwitchChannelClaim.init(id: channelId)
channelClaim.setCanUpdate(true)
let channelClaims: NSMutableArray = [channelClaim]
// The Channel object mentioned here is the one returned when you call Client.Register()
let channelConfig: FMLiveSwitchChannelConfig = FMLiveSwitchChannelConfig.init()
channelConfig.setRecording(FMLiveSwitchNullableBool.fromValue(true))
channel?.update(withNewConfig: channelConfig)
// ChannelClaims must have the "CanUpdate" flag set to true
let channelClaim = new fm.liveswitch.ChannelClaim(channelId);
channelClaim.setCanUpdate(true);
let channelClaims = [channelClaim];
// The Channel object mentioned here is the one returned when you call Client.Register()
let channelConfig = new fm.liveswitch.ChannelConfig();
channelConfig.setRecording(true);
channel.update(channelConfig);