media-stream-player-js icon indicating copy to clipboard operation
media-stream-player-js copied to clipboard

Local Start Works but Fails when Deployed.

Open Alex-Wenner-FHR opened this issue 2 years ago • 2 comments

Describe the bug Locally when I start the implementation of the react multi stream, it works great. However when deployed I see the following error:

Screen Shot 2022-08-16 at 2 28 17 PM

To Reproduce I am really at a loss as to how to reproduce this, because this does not happen locally. Everything works great locally, just fails when the site has been deployed.

Environment (please complete the following information):

  • OS: macOS Monterey 12.5
  • Browser: Microsoft Edge, Chrome, Safari
  • Version: Latest

Alex-Wenner-FHR avatar Aug 16 '22 19:08 Alex-Wenner-FHR

I may add, that I essentially have the exact code seen here https://github.com/AxisCommunications/media-stream-player-js/blob/main/examples/react-app/MultiStream.jsx

I have made sure I have all of the peer dependencies installed per documentation as well.

Alex-Wenner-FHR avatar Aug 17 '22 13:08 Alex-Wenner-FHR

This appears to be coming from this alias alias: { stream: 'stream-browserify', }, }, in the vite.config of this project. It works fine locally but this does not exist once actually deployed to a react site.

Any thoughts on how to avoid using this alias and actually getting something in there that will be consistent from vite to browser

Alex-Wenner-FHR avatar Oct 05 '22 16:10 Alex-Wenner-FHR