Skip to content

Instantly share code, notes, and snippets.

@stelabouras
Last active February 27, 2020 14:05
Show Gist options
  • Save stelabouras/c87000254f1359160481 to your computer and use it in GitHub Desktop.
Save stelabouras/c87000254f1359160481 to your computer and use it in GitHub Desktop.
Horizon SDK sample
// Initialize the camera
HVTCamera *camera = [HVTCamera new];
// Create a simple view
HVTView *videoPreview = [[HVTView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
videoPreview.center = self.view.center;
[self.view addSubview:videoPreview];
// Attach this view to your camera
[camera addView:videoPreview];
// Start the camera (assuming that user has already granted permission for camera and mic)
[camera startRunning];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment