code: function destroyCameraPreview() {
          capturePreview.pause();
          capturePreview.src = null;
          if (previewContainer) {
              document.body.removeChild(previewContainer);
          }
          if (capture) {
              capture.stopRecordAsync();
              capture = null;
          }
      }
docs: Destroys camera preview, removes all elements created