I am trying to add a microphone icon to use it to record some audio and enable a playback button on Ankidroid. But when i come to press on the microphone icon button, it doesn’t work so i can’t record anything. I would also like to enable a playback button to hear what i have recorded. I would appreciate it.
Here’s the code:
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interactive Example</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
<h3>Say the Word in a Complete Sentence Using the Microphone</h3>
<div>
{{Audio}}
<div>
<button id="recordButton">
<i class="fas fa-microphone"></i> Record
</button>
<script>
document.getElementById('recordButton').addEventListener('click', function() {
// Functionality to start recording will go here
alert('Start recording...');
});
</script>
</body>
<div>
{{hint:Word}}
<div>
{{hint:Definition}}
<div>
{{hint:Example Sentence}}