0

我有点像 torrent 的新手,但我目前正在尝试在我正在创建的网站上播放视频。我正在使用 popcorntime 的 API 接收电影磁力链接,然后我使用 Webtorrents 源代码进行测试。当我将 torrentID 更改为电影的磁力链接时,没有任何播放。

(如果有人想查看源代码,请点击以下链接:https ://webtorrent.io/intro )

我做了一些研究,发现我需要在磁铁链接上安装一个跟踪器,但我不确定我将如何去做。

这是一个示例磁铁链接:'magnet:?xt=urn:btih:6268ABCCB049444BEE76813177AA46643A7ADA88&tr=udp://glotorrents.pw:6969/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://torrent .gresille.org:80/announce&tr=udp://tracker.openbittorrent.com:80&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp:/ /p4p.arenabg.ch:1337&tr=udp://tracker.internetwarriors.net:1337'

我注意到的奇怪的事情是,当我将上面的链接复制到 Webtorrents 桌面应用程序中时,视频可以正常播放,甚至可以下载。

如果有人可以让我深入了解我做错了什么,将不胜感激。

4

1 回答 1

2

真实客户端中的 webtorrent WebRTC 和 TCP/UDP/DHT

要在浏览器中通过 webtorrent 下载内容,您至少需要以下一项:

  • 来自webtorrent Desktop的另一个 WebRTC peer fe (它是混合 WebRTC/bittorrent 客户端)
  • 启用和配置CORS的 webseed

    ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F

我不确定,但如您所见,url 有所不同。没有://%3A%2F%2F

您可以尝试玩 Sintel 并检查它是否正常工作。

magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent

webtorrent 网站上也有不匹配的信息。Archive.org 不适用于缺少 CORS 标头的 webtorrent cos。

于 2019-01-07T21:33:39.243 回答