Skip to content

PUBLIC_URL and basename problems on minified version #275

@Biegal

Description

@Biegal

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

  1. Pull latest code
  2. Use PUBLIC_URL=. REACT_APP_MEDIA_ROOT_URL=https://some-s3-bucket.com/recordings npm run start
  3. Open URL in the browser and test some recordings - should work (like http://localhost:3000/d3a7504b938be957c8f9a8923d0435d90eba0222-1143407945744)
  4. Run PUBLIC_URL=. REACT_APP_MEDIA_ROOT_URL=https://some-s3-bucket.com/recordings npm run build
  5. Serve the ./build directory somehow, could be nginx or serve
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions