Modifying the view thread component

I wanted to keep the audio record and upload feature simple. So, along with the existing reply with text, reply with image, and reply with video features, we are going to add another button named Reply with Audio; this button will launch a modal and help us with the record and upload process. Open client/app/view-thread/view-thread.component.html and, next to the Reply with Video button at the bottom of the page, add this code:

// SNIPP SNIPP<div class="col text-center"> <button class="btn btn-dark" type="submit" (click)="uploadAudio(thread)"><i class="fa fa-microphone"></i> Reply with Audio</button></div>// SNIPP SNIPP

Next, the required logic for uploadAudio will be placed in client/app/view-thread/view-thread.component.ts ...

Get Google Cloud AI Services Quick Start Guide 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.