fix worker url in env vars for prod
This commit is contained in:
parent
ec9db36a50
commit
3b137b0b55
|
|
@ -1,5 +1,6 @@
|
||||||
import { BaseBoxShapeUtil, TLBaseShape } from "tldraw"
|
import { BaseBoxShapeUtil, TLBaseShape } from "tldraw"
|
||||||
import { useEffect, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
|
import { WORKER_URL } from "../routes/Board"
|
||||||
|
|
||||||
interface DailyApiResponse {
|
interface DailyApiResponse {
|
||||||
url: string;
|
url: string;
|
||||||
|
|
@ -58,7 +59,7 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
|
||||||
}
|
}
|
||||||
|
|
||||||
async generateMeetingToken(roomName: string) {
|
async generateMeetingToken(roomName: string) {
|
||||||
const workerUrl = import.meta.env.VITE_TLDRAW_WORKER_URL;
|
const workerUrl = WORKER_URL;
|
||||||
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
||||||
|
|
||||||
if (!apiKey) {
|
if (!apiKey) {
|
||||||
|
|
@ -109,12 +110,12 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const workerUrl = import.meta.env.VITE_TLDRAW_WORKER_URL;
|
const workerUrl = WORKER_URL;
|
||||||
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
||||||
|
|
||||||
// Debug logging
|
// Debug logging
|
||||||
console.log('🔧 VideoChat Debug:');
|
console.log('🔧 VideoChat Debug:');
|
||||||
console.log('import.meta.env.VITE_TLDRAW_WORKER_URL:', import.meta.env.VITE_TLDRAW_WORKER_URL);
|
console.log('WORKER_URL:', WORKER_URL);
|
||||||
console.log('workerUrl:', workerUrl);
|
console.log('workerUrl:', workerUrl);
|
||||||
console.log('apiKey exists:', !!apiKey);
|
console.log('apiKey exists:', !!apiKey);
|
||||||
|
|
||||||
|
|
@ -199,8 +200,8 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
|
||||||
async startRecording(shape: IVideoChatShape) {
|
async startRecording(shape: IVideoChatShape) {
|
||||||
if (!shape.props.roomUrl) return;
|
if (!shape.props.roomUrl) return;
|
||||||
|
|
||||||
const workerUrl = import.meta.env.VITE_TLDRAW_WORKER_URL;
|
const workerUrl = WORKER_URL;
|
||||||
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Extract room name from URL (same as transcription methods)
|
// Extract room name from URL (same as transcription methods)
|
||||||
|
|
@ -245,7 +246,7 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
|
||||||
async stopRecording(shape: IVideoChatShape) {
|
async stopRecording(shape: IVideoChatShape) {
|
||||||
if (!shape.props.recordingId) return;
|
if (!shape.props.recordingId) return;
|
||||||
|
|
||||||
const workerUrl = import.meta.env.VITE_TLDRAW_WORKER_URL;
|
const workerUrl = WORKER_URL;
|
||||||
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -285,7 +286,7 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const workerUrl = import.meta.env.VITE_TLDRAW_WORKER_URL;
|
const workerUrl = WORKER_URL;
|
||||||
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
||||||
|
|
||||||
console.log('🔧 Environment variables:');
|
console.log('🔧 Environment variables:');
|
||||||
|
|
@ -346,7 +347,7 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const workerUrl = import.meta.env.VITE_TLDRAW_WORKER_URL;
|
const workerUrl = WORKER_URL;
|
||||||
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
const apiKey = import.meta.env.VITE_DAILY_API_KEY;
|
||||||
|
|
||||||
// Extract room name from URL
|
// Extract room name from URL
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue