-
Notifications
You must be signed in to change notification settings - Fork 0
Core Camera Max Recording Duration
Mr.P edited this page Aug 29, 2026
·
2 revisions
Read or set the maximum video recording duration. The SDK expresses the value in minutes.
AIBuds.xcframework
/// The protocol for device API that supports camera.
protocol DeviceCameraAPI: DeviceAPI {
/// Maximum video recording duration (in minutes) allowed by the device.
var maxVideoRecordDuration: NSNumber? { get }
/// Sets the maximum video recording duration.
/// - Parameters:
/// - duration: The maximum recording duration in minutes.
/// - completion: A closure that is called when the operation completes.
/// - success: `true` if the operation was successful; otherwise `false`.
/// - error: An `NSError` object that describes the error that occurred, or `nil` if the operation was successful.
func setMaxVideoRecordDuration(
_ duration: Int,
completion: AIBudsCompletionHandler?
)
}/// The protocol for device API that supports camera.
@protocol AIBudsDeviceCameraAPI <AIBudsDeviceAPI>
/// Maximum video recording duration (in minutes) allowed by the device.
@property(nonatomic, readonly, strong) NSNumber *_Nullable maxVideoRecordDuration;
/// Sets the maximum video recording duration.
/// - Parameters:
/// - duration: The maximum recording duration in minutes.
/// - completion: A closure that is called when the operation completes.
/// - success: `true` if the operation was successful; otherwise `false`.
/// - error: An `NSError` object that describes the error that occurred, or `nil` if the
/// operation was successful.
- (void)setMaxVideoRecordDuration:(NSInteger)duration
completion:(AIBudsCompletionHandler _Nullable)completion;
@end| Symbol | Purpose |
|---|---|
maxVideoRecordDuration |
Current maximum duration in minutes. |
setMaxVideoRecordDuration |
Set the maximum duration in minutes. |
guard let device = device as? DeviceCameraAPI else { return }
print(
"Current maximum: \(device.maxVideoRecordDuration?.intValue.description ?? "Unavailable") minutes"
)
device.setMaxVideoRecordDuration(30) { success, error in
if !success { print(error?.localizedDescription ?? "Update failed") }
}id<AIBudsDeviceCameraAPI> device = (id<AIBudsDeviceCameraAPI>)self.device;
if ([device conformsToProtocol:@protocol(AIBudsDeviceCameraAPI)]) {
NSLog(@"Current maximum: %@ minutes", device.maxVideoRecordDuration);
[device setMaxVideoRecordDuration:30
completion:^(BOOL success, NSError *_Nullable error) {
if (!success)
NSLog(@"Update failed: %@", error.localizedDescription);
}];
}The current Demo uses a 1...120 minute slider. The public SDK does not document a universal range, so treat those limits as a Demo convention pending a public capability.
AIBuds SDK documentation · Full documentation · API Reference
- Introduction
- Getting Started
- Core Concepts
-
Core Features
- Basic Features
- Device Info
- Find Device
- Physical Operations
- Work Mode
- Work Status
- Wear Detection
- Volume Control
- Music Control
- TWS
- Equalizer
- ANC
- Audio
- Camera
- Remote Camera
- File Import
- Teleprompter
- Segment Navigation
- Live Streaming
- Device Applications
- OTA
- Camera OTA
- Service Auth
- AI Services
- Voice Assistant
- Logging
- Advanced Topics
- Releases
- Troubleshooting