Solution design

To achieve our solution, we are going to do the following:

  1. On the view-thread page, we are going to provide a button next to Reply named Reply with Video, to keep things simple
  2. The user is going to record a video using the camera attached to their laptop/computer
  3. We are going to the upload that video recording to our server
  4. The video will be saved on our servers temporarily
  5. The uploaded video will then be sent to Google Video Intelligence API to detect labels and explicit content
  6. If the explicit content returns POSSIBLE for the pornographyLikelihood property on any of the segments in the video, we do not allow the user to upload that video
  7. If the video is safe, we then upload it to Cloudinary, as we did in Chapter 3, Cloud Vision API
  8. Once the upload to Cloudinary is successful, we will get back the public URL
  9. Using all the data we have gathered so far, we are going to create a new message and then respond with it
  10. The Angular app will process the response and update the thread
Uploading videos to Cloudinary is optional. I have implemented it to show an end-to-end flow.

Before we start the implementation, make sure you have the API key for Cloudinary. If not, please refer to Setting up Cloudinary section in Chapter 3Cloud Vision API, .

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.37.136