Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As you can see in the code, once the event is received, we double check to action just for the final video_approved event, when we finally close the popup of a quick action. 
This is a simple example, but any custom logic can be built just listening to events and leveraging the data specified alongside them.


The full list of events, by "eventType" are:

  1. video_initialised: the video recorder component has been initialised on the hosting page
  2. video_access_forbidden: the camera has not been granted access to
  3. video_access_granted: the camera has been granted access to
  4. video_recording: the recording has started
  5. video_stop_recording: the recording has been stopped
  6. video_uploading: the uploading has started
  7. video_uploading_progress (info on how much it has been uploaded vs the total amount): the upload is in progress
  8. video_uploaded: the upload has been completed
  9. video_verified: the video has been verified (we recommend to listen to this even before destroying the recorder component or moving to another page)
  10. video_processed: the media backend confirms that the processing has been completed
  11. video_rerecord: the user has selected to retake the recording
  12. video_approved: the user has approved this video
  13. video_vault: the video has been selected from the video vault


The VideoRecordingEvent specifies the following attributes:

  • eventType, to define which type of event this is
  • videoExternalId, identifier of the video on the media server
  • videoId, Salesforce ID of the video
  • referenceRecordId, Salesforce ID of the record associated with this video
  • vaultId, Salesforce ID of the video vault used to create this video
  • videoUploaded, how much has been uploaded so far
  • videoTotal, total size of this video
  • containerDomId, identifier of the element in the HTML that hosts this instance of the video recorder

Conclusion & Next Steps

In this section we have hopefully made more clear the process followed by each video, from the upload onwards. We have then discovered how to listen and react to these events, directly from your own Lightning component. In the next section we will wrap up the advanced section for the recording component, listing all the available parameters.

...