Webtorrent-cli crashes in HTTPS context
**Versions:**
`webtorrent: 5.1.3 (2.5.19)` `os: macOS 14.6.1` `node: v23.5.0` `npm: 10.9.2`
**What happened?**
I'm in the process of building a website that plays streamed videos from webtorrent-cli in the browser and syncs it between users in real time.
When trying to do this in https, webtorrent-cli crashes.
(You can try this [website](https://videojs-http-streaming.netlify.app))
<img width="400" alt="Image" src="https://github.com/user-attachments/assets/39350f17-9890-4875-b0af-9aedb02132ac" />
<img width="713" alt="Image" src="https://github.com/user-attachments/assets/a685e12c-7a89-46c3-86cb-8f0a71e6b347" />
**What did you expect to happen?**
As I'm trying to get around the fact that browsers don't support playing localhost'ed media in https context, it would be great not to crash. And it would be even better if webtorrent-cli facilitated using https://localhost
**Are you willing to submit a pull request to fix this bug?**
Yes. With some help, I wouldn't mind looking into it.
1 条评论