cloudinary / cloudinary-react

React components that utilize Cloudinary functionality
MIT License
502 stars 219 forks source link

Add support for `sources` prop in Video component #212

Closed YomesInc closed 3 years ago

YomesInc commented 3 years ago

Brief Summary of Changes

<Video> now supports the sources property:

<Video
  cloudName='demo'
  publicId='dog'
  sources={[
    {
      type: 'mp4',
      codecs: ['vp8', 'vorbis'],
      transformations: {
        videoCodec: 'auto'
      }
    },
    {
      type: 'webm',
      codecs: ['avc1.4D401E', 'mp4a.40.2'],
      transformations: {
        videoCodec: 'auto'
      }
    }
  ]}
/>

What does this PR address?

Are tests included?

Checklist:

patrick-tolosa commented 3 years ago

@maoznir Please note the build is failing, it looks like react is not a dependency of this project (it should probably be a devDependency).