import React from 'react' import { Player } from 'video-react' import Img from 'react-image' import Md from './Md' import Spinner from '../presentational/Spinner' import NoSource from '../presentational/NoSource' export default ({ media, viewIdx, translations, switchLanguage, langIdx }) => { const el = document.querySelector(`.source-media-gallery`) const shiftW = el ? el.getBoundingClientRect().width : 0 function renderMedia (media) { let { path, type, poster } = media switch (type) { case 'Image': return (