executeCommand method

  1. @override
Future<void> executeCommand(
  1. Map<String, dynamic> inputs
)
override

Abstract method for subclasses to implement their specific logic

Implementation

@override
Future<void> executeCommand(Map<String, dynamic> inputs) async {
  final cursorValue = inputs['cursorValue'] as int;

  // Validate that cursor value is non-negative for set operation
  if (cursorValue < 0) {
    throw UsageException(
      'The `media-cursor` parameter must be a non-negative integer (>= 0).',
      '',
    );
  }

  await obs.mediaInputs.setMediaInputCursor(
    inputName: inputs['inputName'],
    inputUuid: inputs['inputUuid'],
    mediaCursor: cursorValue,
  );
}