Build recorder with AudioKit

We will begin by creating a model around our interaction with AudioKit's recording APIs. You could just start writing directly against these APIs right from your Angular component or service, but since we want to provide a consistent API across iOS and Android, there's a smarter way to architect this. Instead, we will abstract a simple API, usable across both platforms, which will tap into the correct native implementations under the hood. 

There will be a lot of interesting details related to AudioKit going on here, but create app/modules/recorder/models/record.model.ts with the following and we will explain some of the bits in a moment:

Later, we will add the .ios.ts suffix to this model, since it will contain ...

Get NativeScript for Angular Mobile Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.