limited-arm-86913
07/21/2025, 10:51 PMtall-airline-16756
07/21/2025, 10:51 PMtall-airline-16756
07/21/2025, 10:54 PMlet audioSettings: [String: Any] = [
AVFormatIDKey: kAudioFormatMPEG4AAC,
AVSampleRateKey: 16000,
AVNumberOfChannelsKey: 1,
AVLinearPCMBitDepthKey: 32,
AVLinearPCMIsFloatKey: true,
AVLinearPCMIsNonInterleaved: false,
AVLinearPCMIsBigEndianKey: false,
]
let recordFilePath = URL(fileURLWithPath: NSTemporaryDirectory())
.appendingPathComponent("recording.aac")
let recorder = try AudioMixRecorder(filePath: recordFilePath, audioSettings: audioSettings)
try recorder.start()
// Add audio sources and record...
recorder.stop()
Audio recording is fully supported with these methods. Currently, the SDK does not provide a built-in method for local video recording on the Swift client.
Sources: Sources/LiveKit/Track/Local/LocalVideoTrack.swift | sample-app-record-local/README.md