Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/sdk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,11 @@ <h3>Console Logs</h3>
processedVideo: document.getElementById('processed-video')
};

// Pre-populate API key from environment variable if available
if (import.meta.env.VITE_DECART_API_KEY) {
elements.apiKey.value = import.meta.env.VITE_DECART_API_KEY;
}

// Logging system
function addLog(message, type = 'info') {
const timestamp = new Date().toLocaleTimeString();
Expand Down Expand Up @@ -574,10 +579,10 @@ <h3>Console Logs</h3>

// Disconnect
elements.disconnectBtn.addEventListener('click', () => {
if (decartClient) {
if (decartRealtime) {
addLog('Disconnecting from Decart...', 'info');
// Note: The SDK doesn't seem to have a disconnect method,
// so we'll just reset our state
decartRealtime.disconnect();
decartRealtime = null;
decartClient = null;
}

Expand Down
Loading