run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
void run() async {
await initializeOnvif();
try {
final mediaUri = await media.getStreamUri(argResults!['profile-token'],
streamType: argResults?['stream-type'],
transportProtocol: argResults?['transport-protocol'],
validUntilConnect: argResults?['valid-until-connect'],
validUntilReboot: argResults?['valid-until-reboot'],
timeout: argResults?['timeout']);
print(json.encode(mediaUri));
} on DioError catch (err) {
throw UsageException('API usage error:', err.usage);
}
}