From e8374048d5d83db902989c6163e5e161cc7d222c Mon Sep 17 00:00:00 2001 From: kanhaiya04 Date: Thu, 23 Mar 2023 02:49:34 +0530 Subject: [PATCH] Audio speaker is now working --- com-dict-client/src/components/WordHome/wordDay.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/com-dict-client/src/components/WordHome/wordDay.js b/com-dict-client/src/components/WordHome/wordDay.js index 8bb9699..772ced6 100644 --- a/com-dict-client/src/components/WordHome/wordDay.js +++ b/com-dict-client/src/components/WordHome/wordDay.js @@ -2,6 +2,7 @@ import React from "react"; import { Typography, Card, Row, Col, Divider } from "antd"; import { SoundOutlined, + AudioMutedOutlined, // LikeOutlined, // DislikeOutlined, } from "@ant-design/icons"; @@ -155,9 +156,14 @@ function wordDay({ data }) { type="vertical" style={{ height: "4vmin" }} > - + {!data.pronunciation ? ( + new Audio(data.pronunciation).play()} + style={{ fontSize: "3.5vmin", fontWeight: "bold" }} + /> + ) : ( + + )}