-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Describe the bug
TLDR: Playback doesn't load with PUBLIC_URL=. set.
Hi,
I'm not sure if that's a bug, or did I misunderstood something, but I have hard time running a final build of latest version (we're trying to make an upgrade from player version around BBB 2.2 or 2.3) using PUBLIC_URL=.. We're using that in pair with REACT_APP_MEDIA_ROOT_URL to serve recordings from a separate domain.
With latest version it works in dev, but not on minimized version. Checked different browsers and machines.
To Reproduce
- Pull latest code
- Use
PUBLIC_URL=. REACT_APP_MEDIA_ROOT_URL=https://some-s3-bucket.com/recordings npm run start - Open URL in the browser and test some recordings - should work (like http://localhost:3000/d3a7504b938be957c8f9a8923d0435d90eba0222-1143407945744)
- Run
PUBLIC_URL=. REACT_APP_MEDIA_ROOT_URL=https://some-s3-bucket.com/recordings npm run build - Serve the
./builddirectory somehow, could be nginx orserve - Try the same URL in the browser, it won't load
Expected behavior
I would expect player to work no matter if running in dev, or deploying to server.
Screenshots
If it won't load, it's just a blank screen
Desktop (please complete the following information):
- OS - tried on macos
- Browser - any (safari, brave, chrome)
Smartphone (please complete the following information):
Didn't tried on smartphone
Additional context
I did some small investigation, and my temporary solution is to remove basename from /src/components/router.js.
Originally it's basename={process.env.PUBLIC_URL} which is substituted with the basename=. in the end (by setting PUBLIC_URL=. as stated in the docs).
Without that basename, the built and minified version works like a charm again.