From aa79be06a929c7fea84272cf3192d32731b89447 Mon Sep 17 00:00:00 2001 From: Haris <4259838+Wulf@users.noreply.github.com> Date: Fri, 12 Jun 2020 08:01:31 -0400 Subject: [PATCH] Don't render video if audio is explicitely set --- src/utils/get-vendor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/get-vendor.js b/src/utils/get-vendor.js index f45a858..d544a65 100644 --- a/src/utils/get-vendor.js +++ b/src/utils/get-vendor.js @@ -4,7 +4,9 @@ import Youtube from "../vendors/Youtube"; export default function getVendor(src, vendor) { src = src || ""; - if (vendor === "youtube" || /youtube.com|youtu.be/.test(src)) { + if (vendor === "audio") { + return { vendor: "audio", component: _HTML2.default } + } else if (vendor === "youtube" || /youtube.com|youtu.be/.test(src)) { return { vendor: "youtube", component: Youtube }; } else if (vendor === "vimeo" || /vimeo.com/.test(src)) { return { vendor: "vimeo", component: Vimeo };