Skip to content

Commit

Permalink
Updated Call Page
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulgoel873 committed Feb 9, 2024
1 parent b8d54f0 commit ba51e89
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions public/CallPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,29 @@ <h3>CALLING...</h3>
<button type="button">CALL</button>
<button type="button">HANG UP</button>
</div>
<div>
<form id="uploadForm" enctype="multipart/form-data" method="POST" action="/upload">
<label for="fileInput" style="margin-bottom: 10px;">Choose a file:</label>
<input type="file" id="fileInput" name="file" accept=".wav" style="margin-bottom: 20px;">
<button type="submit" id="Upload" style="padding: 10px; background-color: #2ecc71; color: #fff; border: none; border-radius: 4px; cursor: pointer;">Upload File</button>
<script>
const { spawn } = require('child_process');

document.getElementById('Upload').addEventListener('click', () => {
spawn('node', ['server.js']);
console.log("Reached");
});
</script>
</form>
<script>
function play() {
var audio = new Audio('audio/not-translated_translated.wav');
console.log("PLAYING");
audio.play();
}
</script>
<button onclick = "play()" type="submit" id="Audio" type="PlayAudio">Play Translated Audio</button>
</div>
</section>
</div>
</main>
Expand Down

0 comments on commit ba51e89

Please sign in to comment.