mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-06 07:46:32 +00:00
Fix 'Love service endpoint not found' error (#5875)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
7ea0a05f59
commit
ddd38648da
@ -117,7 +117,7 @@ isCurrentInstanceConnected.subscribe((value) => {
|
|||||||
})
|
})
|
||||||
export const screenSharing = writable<boolean>(false)
|
export const screenSharing = writable<boolean>(false)
|
||||||
export const isRecording = writable<boolean>(false)
|
export const isRecording = writable<boolean>(false)
|
||||||
export const isRecordingAvailable = writable<boolean | undefined>(undefined)
|
export const isRecordingAvailable = writable<boolean>(false)
|
||||||
export const isMicEnabled = writable<boolean>(false)
|
export const isMicEnabled = writable<boolean>(false)
|
||||||
export const isCameraEnabled = writable<boolean>(false)
|
export const isCameraEnabled = writable<boolean>(false)
|
||||||
export const isSharingEnabled = writable<boolean>(false)
|
export const isSharingEnabled = writable<boolean>(false)
|
||||||
@ -697,16 +697,18 @@ export async function record (room: Room): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function checkRecordAvailable (): Promise<void> {
|
async function checkRecordAvailable (): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const endpoint = getMetadata(love.metadata.ServiceEnpdoint)
|
const endpoint = getMetadata(love.metadata.ServiceEnpdoint)
|
||||||
if (endpoint === undefined) {
|
if (endpoint === undefined) {
|
||||||
throw new Error('Love service endpoint not found')
|
setTimeout(() => {
|
||||||
}
|
void checkRecordAvailable()
|
||||||
|
}, 500)
|
||||||
|
} else {
|
||||||
const res = await fetch(concatLink(endpoint, '/checkRecordAvailable'))
|
const res = await fetch(concatLink(endpoint, '/checkRecordAvailable'))
|
||||||
const result = await res.json()
|
const result = await res.json()
|
||||||
isRecordingAvailable.set(result)
|
isRecordingAvailable.set(result)
|
||||||
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
Analytics.handleError(err)
|
Analytics.handleError(err)
|
||||||
console.error(err)
|
console.error(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user