changeDirection method
Implementation
Future<bool> changeDirection(VideoDirection direction,
{int timeout = 5}) async {
if (direction == null) {
return false;
}
if (this.direction != direction) {
bool ret = await writeCgi(
"camera_control.cgi?param=5&value=${direction.index}&");
if (ret == true) {
CommandResult result = await waitCommandResult((cmd, data) {
return cmd == 24594;
}, timeout);
if (result.isSuccess == true) {
this.direction = direction;
}
return result.isSuccess;
}
return false;
}
return true;
}