Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup and configuration issues in Next.js #9

Open
astarivi opened this issue Nov 1, 2024 · 0 comments
Open

Setup and configuration issues in Next.js #9

astarivi opened this issue Nov 1, 2024 · 0 comments

Comments

@astarivi
Copy link

astarivi commented Nov 1, 2024

I’m experiencing issues when attempting to replicate the demo project setup with Next.js 15.0.1. Specifically, the project doesn’t function as expected:

  • libmpv.data and libmpv.js are fetched from the root / (ex: /libmpv.data) route, regardless of the path provided to MpvPlayer.load
  • libmpv.wasm is always fetched from /_next/static/chunks/app/libmpv.wasm, instead of the specified URL in MpvPlayer.load

If libmpv.data and libmpv.js are moved to the root of the public folder, they load correctly, but libmpv.wasm still fails to load.

Current file structure:

.
├── public/
│   └── static/
│       └── js/
│           ├── libmpv.data
│           ├── libmpv.js
│           └── libmpv.wasm
└── src/
    └── app/
        └── components/
            └── play/
                └── mpvplayer/
                    └── native/
                        ├── index.js
                        ├── libmpv.js
                        ├── MpvPlayer.js
                        └── utils.js

Environment is Next.js 15.0.1, react 19.0.0-rc, Next.js development server, client is LibreWolf 131.0.3-1, also fails on Chromium 128.0.6613.120.

Additionally, right now the usage documentation is rather limited, and does not mention various critical things, such as the need to set the following headers:

Cross-Origin-Opener-Policy=same-origin
Cross-Origin-Embedder-Policy=require-corp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant