title: How to preview a video in ReactJS
body: <p>I am working on project in ReactJS, Currently I am using ant-design for file uploading. I want to preview video when user select a video . I am new to reactjs and unable to complete my task. Could someone please help me how it would be possible to preview a video . I will share my code with you You may check my code . Thanks</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>import React from 'react';
  import styled from 'styled-components';
  import 'antd/dist/antd.css';
  import './styletwo.css';
  import { Form, Upload, Button, Icon } from 'antd';
  // import reqwest from 'reqwest';
  const Dragger = Upload.Dragger;
  
  const FormItem = Form.Item;
  const PhotoText = styled.div`
    font-size: 16px;
    font-weight: bold;
    padding: 2rem 0 1rem 0;
    display: block;
    text-align: -webkit-auto;
  `;
  
  const props = {
    action: '',
    listType: 'picture',
  };
  class RegisterStepTwo extends React.Component {
  
  
    render() {
  
      const { getFieldDecorator } = this.props;
  
      return (
        &lt;div&gt;
          &lt;PhotoText&gt;Select a Photo to Upload&lt;/PhotoText&gt;
            &lt;FormItem&gt;
              {getFieldDecorator('picture', {
                rules: [
                  {
                    required: true,
                    message: 'Please upload picture!',
                  },
                ],
              })(
                &lt;Dragger {...props}&gt;
                  &lt;p className="ant-upload-drag-icon"&gt;
                    &lt;Icon type="upload" /&gt;
                  &lt;/p&gt;
                  &lt;p className="ant-upload-text"&gt;
                    Click or drag photo to this area to upload
                  &lt;/p&gt;
                &lt;/Dragger&gt;,
              )}
            &lt;/FormItem&gt;
  
            &lt;PhotoText&gt;Select a Video to Upload&lt;/PhotoText&gt;
            &lt;FormItem&gt;
              {getFieldDecorator('video', {
                rules: [
                  {
                    required: true,
                    message: 'Please upload video!',
                  },
                ],
              })(
                &lt;Dragger&gt;
                &lt;p className="ant-upload-drag-icon"&gt;
                  &lt;Icon type="upload" /&gt;
                &lt;/p&gt;
                &lt;p className="ant-upload-text"&gt;
                  Click or drag Video to this area to upload
                &lt;/p&gt;
              &lt;/Dragger&gt;,
              )}
            &lt;/FormItem&gt;
  
        &lt;/div&gt;
      );
    }
  }
  export default RegisterStepTwo;
  </code></pre>