在 vercel 上部署后视频未播放,但在本地正在运行
我在 React 中使用自定义视频播放器,它在 localhost 上工作正常,但当我将其部署在 vercel 上时,它无法工作。我需要这方面的帮助,我不知道该怎么做,我想 vimeo 外部链接会起作用,但这些是付费的,我需要一个免费的解决方案。
这是我用于自定义视频播放器的 GitHub 存储库
https://github.com/ PiotrBerebecki/custom-video-player-react
上述存储库的部署链接:https://custom-video-player-react.herokuapp.com/
下面是我的 vercel 链接
https://saderino-dapp-plnhfmbis-blockeyfi.vercel.app/
还有我需要解决的其他问题吗请查看,请指导我。多谢:)
I am using a custom video player in react and it is working fine on localhost but when i deploy it on vercel it is not working. I need help about this and idk what to do, vimeo external links will work i guess but those are paid and i need a free solution.
Here's the GitHub repo I'm using for custom video player
https://github.com/PiotrBerebecki/custom-video-player-react
Deployed link of above repo: https://custom-video-player-react.herokuapp.com/
And below is my vercel link
https://saderino-dapp-plnhfmbis-blockeyfi.vercel.app/
Is there any other issue that i need to look in please do guide me. Thanks alot:)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您转到浏览器开发工具中的“网络”选项卡,您将看到 HTTP 请求 https://saderino-dapp-plnhfmbis-blockeyfi.vercel.app/videos/alienplants.mp4 视频文件。该文件未正确提供。也许以不同的方式看待托管视频。
看看这个链接:
https://vercel。 com/support/articles/best-practices-for-hosting-videos-on-vercel-nextjs-mp4-gif
If you go to the "Network" tab in the browser dev tools, you will see that the HTTP requests the https://saderino-dapp-plnhfmbis-blockeyfi.vercel.app/videos/alienplants.mp4 video file. This file is not being served correctly. Maybe look at hosting the video differently.
Take a look at this link:
https://vercel.com/support/articles/best-practices-for-hosting-videos-on-vercel-nextjs-mp4-gif