admin管理员组文章数量:1387467
I'm kinda of a newbie to torrents and what not but I'm currently trying to play a video on a website I'm creating. I'm using popcorntime's API to receive movies magnet links which I am then using Webtorrents source code to test. When I change the torrentID to a movie's magnet link, nothing plays.
(Here's the link if anyone wants to look at the source code: )
I've done some researching and found out that I need a tracker on the magnet link but I'm unsure how I would go about doing that.
This is an example magnet link: 'magnet:?xt=urn:btih:6268ABCCB049444BEE76813177AA46643A7ADA88&tr=udp://glotorrents.pw:6969/announce&tr=udp://tracker.opentrackr:1337/announce&tr=udp://torrent.gresille:80/announce&tr=udp://tracker.openbittorrent:80&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise:6969&tr=udp://p4p.arenabg.ch:1337&tr=udp://tracker.internetwarriors:1337'
The weird thing I noticed is that when I copy the link above into Webtorrents desktop application, the video plays fine and even downloads.
If anyone could give me an insight into what I'm doing wrong, it would be very much appreciated.
I'm kinda of a newbie to torrents and what not but I'm currently trying to play a video on a website I'm creating. I'm using popcorntime's API to receive movies magnet links which I am then using Webtorrents source code to test. When I change the torrentID to a movie's magnet link, nothing plays.
(Here's the link if anyone wants to look at the source code: https://webtorrent.io/intro)
I've done some researching and found out that I need a tracker on the magnet link but I'm unsure how I would go about doing that.
This is an example magnet link: 'magnet:?xt=urn:btih:6268ABCCB049444BEE76813177AA46643A7ADA88&tr=udp://glotorrents.pw:6969/announce&tr=udp://tracker.opentrackr:1337/announce&tr=udp://torrent.gresille:80/announce&tr=udp://tracker.openbittorrent.:80&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise:6969&tr=udp://p4p.arenabg.ch:1337&tr=udp://tracker.internetwarriors:1337'
The weird thing I noticed is that when I copy the link above into Webtorrents desktop application, the video plays fine and even downloads.
If anyone could give me an insight into what I'm doing wrong, it would be very much appreciated.
Share Improve this question asked Dec 14, 2018 at 17:37 JohnnyJohnny 431 gold badge1 silver badge8 bronze badges1 Answer
Reset to default 2webtorrent WebRTC and TCP/UDP/DHT in real client
To download content via webtorrent in browser you need at least one of:
- another WebRTC peer f.e. from webtorrent Desktop (which is hybrid WebRTC/bittorrent client)
webseed with enabled and configured CORS
ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F
I am not sure, but there is a difference in url, as you see. There is no :// but %3A%2F%2F.
You can try play Sintel and check if it's working correctly.
magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie%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%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent
Also there is mismatch informations on webtorrent website. Archive don't work well with webtorrent cos of missing CORS headers.
本文标签: javascriptHow to add tracker to magnet linkStack Overflow
版权声明:本文标题:javascript - How to add tracker to magnet link? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744540895a2611605.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论