From 31c1b05c4e232dbca3867c720c1b80d9435f4506 Mon Sep 17 00:00:00 2001 From: Leo <36849323+leotoll@users.noreply.github.com> Date: Fri, 8 May 2020 16:19:30 +0300 Subject: [PATCH] Fix Video component and add autoplay (#76) * fix: Video component and add autplay * add sources support to video * Remove poster from video. * Version bump Co-authored-by: kevhender --- package.json | 2 +- src/carousel/Media.js | 23 +++++++++++-- src/carousel/MediaCarousel.js | 25 ++++++++++++-- test/carousel/Media.test.js | 6 ++++ test/carousel/MediaCarousel.test.js | 51 ++++++++++++++++++++--------- 5 files changed, 84 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index d3ec505e..1d1358bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-storefront", - "version": "7.12.0", + "version": "7.12.1", "description": "Build and deploy e-commerce progressive web apps (PWAs) in record time.", "module": "./index.js", "license": "Apache-2.0", diff --git a/src/carousel/Media.js b/src/carousel/Media.js index 24e63749..81dc0826 100644 --- a/src/carousel/Media.js +++ b/src/carousel/Media.js @@ -23,9 +23,11 @@ const useStyles = makeStyles(theme => ({ export default function Media({ magnifyProps, imageProps, + videoProps, src, alt, magnify, + sources, poster, type = 'image', }) { @@ -55,7 +57,17 @@ export default function Media({ } if (type === 'video') { - return