-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Uncaught ReferenceError: X is not defined #8170
Comments
👋 Thanks for opening your first issue here! 👋 If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
Any MP4 wou;dn't work if you loaded it as type application/x-mpegURL. If you're actually using an HLS video, a reduced test case with an unminified Video.js would be useful. |
Surprisingly it works in video.js 7 - I normaly use videojs for play
^^ does not work in video.js 8.. but only when I build react app and serve it using express.. If I run react app on my local computer then playback works I also tried:
And it works ^^ .. So problem may be in |
Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:
|
I was able to player that source ( Also, Can you provide a minimal live test case? We likely won't be able to help anymore without one. |
Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:
|
Please see Steps to reproduce.. it occurs only after react app build.. you will need create react app and build it.. |
Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:
|
+1. I have the same issue, upgraded to v8, and
|
A quicker workaround may be to replace the x-mpegURL type with video/mp4, which may work per the comment above. Running into the same issue here at https://github.com/OdyseeTeam/odysee-frontend in an uncommitted branch. |
Thanks for workaround suggestion! Doesn't work for my reolink feed unfortunately CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED. |
We tried this too earlier today, same issue. Hoping the team can figure this one out soon. @gkatsev do you think it's in http-streaming or here? |
Please add a link to a reduced test case. Here the error does not occur in a simple react app: https://codesandbox.io/s/react-videojs-strictmode-v8-gkk5eh?file=/src/App.js |
@mister-ben
|
This is in aes-decrypter. |
Any more progress on this? It's holding back our upgrade to v8. |
This is the same as the issue discussed in another project here and here: classes are transpiled in a way that results in broken code in workers. The undefined function is Mapbox's solutions also work here. See https://docs.mapbox.com/mapbox-gl-js/guides/install/#targeting-transpilation-to-es6-with-browserslist for details, but basically use one of these so that Babel leaves ES6 classes intact: Set the production
Or when importing videojs use the ! syntax
|
good |
reduced version to 8.2.0 and it works. hope it helps! |
I just tried with version 8.2.0, same problem. I can play a video when running the app, but if the app is builded, don't work |
See the comment above, which is also documented at https://videojs.com/guides/webpack/ You will need to ensure the build process does not break the code that is used in service workers. The react boilerplate app's default configuration will not work. |
For vite users, adding these lines to vite.config.ts helped me
|
Description
video.js 8> Uncaught ReferenceError at video type:
'application/x-mpegURL'
after build react-appPackages:
"react": "^18.2.0",
"react-scripts": "5.0.1",
"video.js": 8>,
Description:
video.js 7.x.x
) - ALSO WORKS WELLCode snippet:
player.src({ src: "//vjs.zencdn.net/v/oceans.mp4", type: "application/x-mpegURL", })
Reduced test case
No response
Steps to reproduce
application/x-mpegURL
npm run build
build
folderErrors
Uncaught ReferenceError: X is not defined
What version of Video.js are you using?
8>
Video.js plugins used.
No response
What browser(s) including version(s) does this occur with?
110.0.5481.178
What OS(es) and version(s) does this occur with?
Windows 11
The text was updated successfully, but these errors were encountered: