diff --git a/frontend/app/api_client.ts b/frontend/app/api_client.ts index 2ff35c561..cf59aa2d1 100644 --- a/frontend/app/api_client.ts +++ b/frontend/app/api_client.ts @@ -167,7 +167,11 @@ export default class APIClient { delete init.body; } + const noChalice = path.includes('v1/integrations') || path.includes('/spot') && !path.includes('/login') let edp = window.env.API_EDP || window.location.origin + '/api'; + if (noChalice && !edp.includes('api.openreplay.com')) { + edp = edp.replace('/api', '') + } if ( path !== '/targets_temp' && !path.includes('/metadata/session_search') && @@ -181,6 +185,7 @@ export default class APIClient { } const fullUrl = edp + _path; + console.log(path, edp, _path, fullUrl) const response = await window.fetch(fullUrl, init); if (response.status === 403) { console.warn('API returned 403. Clearing JWT token.'); diff --git a/frontend/app/components/Spots/SpotPlayer/components/SpotVideoContainer.tsx b/frontend/app/components/Spots/SpotPlayer/components/SpotVideoContainer.tsx index 0fe7a81ea..87165789d 100644 --- a/frontend/app/components/Spots/SpotPlayer/components/SpotVideoContainer.tsx +++ b/frontend/app/components/Spots/SpotPlayer/components/SpotVideoContainer.tsx @@ -77,10 +77,10 @@ function SpotVideoContainer({ setProcessingState(ProcessingState.Ready); } import('hls.js').then(({ default: Hls }) => { + const isSafari = /^((?!chrome|android).)*safari/i.test( + navigator.userAgent + ); if (Hls.isSupported() && videoRef.current) { - const isSafari = /^((?!chrome|android).)*safari/i.test( - navigator.userAgent - ); if (isSafari) { setLoaded(true); } else {