react-icons/fa#FaPhotoVideo TypeScript Examples

The following examples show how to use react-icons/fa#FaPhotoVideo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx    From webapis-playground with MIT License 5 votes vote down vote up
function ImageCapture() {
  if (!hasSupport()) {
    return <NotSupported />;
  }

  return (
    <div
      className="
        tw-flex
        tw-flex-col
        tw-items-start
      "
    >
      <div className="tw-grid tw-grid-cols-2 tw-gap-2 md:tw-space-x-4 md:tw-flex md:tw-gap-0">
        <Button leftIcon={<FaPlayCircle />} onClick={run.onGetUserMedia}>
          Start the stream
        </Button>
        <Button leftIcon={<FaStopCircle />} onClick={run.onStop}>
          Stop
        </Button>
        <Button leftIcon={<FaHandHolding />} onClick={run.onGrabFrame}>
          Grab frame
        </Button>
        <Button leftIcon={<FaPhotoVideo />} onClick={run.onTakePhoto}>
          Take a photo
        </Button>
      </div>

      <div
        className="
          tw-flex
          tw-flex-col
          tw-w-full
          tw-mt-6
          tw-overflow-hidden
          tw-border
          tw-border-gray-200
          tw-rounded-lg
        "
      >
        <div
          className="
            tw-aspect-w-16
            tw-aspect-h-9
          "
        >
          <video id="js-resize--content" className="tw-w-full" autoPlay />
        </div>
        <span
          id="js-image--error"
          className="
            tw-p-4
            tw-border-t
            tw-border-gray-200
            tw-font-semibold
            tw-text-gray-600
          "
        >
          Frame
        </span>
      </div>
      <div className="tw-mt-4">
        <canvas id="js-image--frame" className="tw-inline-block"></canvas>
        <canvas id="js-image--photo" className="tw-inline-block"></canvas>
      </div>
    </div>
  );
}