DOM Load
This commit is contained in:
@@ -6,6 +6,8 @@ import { Conversation } from 'https://cdn.skypack.dev/@elevenlabs/client';
|
|||||||
const callBtn = document.getElementById('callBtn');
|
const callBtn = document.getElementById('callBtn');
|
||||||
let conversation = null;
|
let conversation = null;
|
||||||
|
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
callBtn.addEventListener('click', async () => {
|
callBtn.addEventListener('click', async () => {
|
||||||
console.log('Requesting microphone access...');
|
console.log('Requesting microphone access...');
|
||||||
|
|
||||||
@@ -41,5 +43,6 @@ callBtn.addEventListener('click', async () => {
|
|||||||
console.log('Failed to start session.');
|
console.log('Failed to start session.');
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user