Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upEvent metadata and ready not work #1580
Closed
Comments
This comment has been minimized.
This comment has been minimized.
|
In your code you are trying to listen for a const webtorrent = require('webtorrent');
const client = new webtorrent();
var torrent = client.add('391881E62436BFE67EDCFA49E1580AF89D5F5038');
torrent.on('noPeers', () => {
console.log('noPeers');
torrent.files.forEach(function(file) {
console.log(file.name);
});
});
torrent.on('metadata', () => {
console.log('metadata');
torrent.files.forEach(function(file) {
console.log(file.name);
});
});
torrent.on('ready', () => {
console.log('ready');
torrent.files.forEach(function(file) {
console.log(file.name);
});
});
torrent.on('warning', () => {
console.log('warning');
torrent.files.forEach(function(file) {
console.log(file.name);
});
});
torrent.on('error', () => {
console.log('error');
torrent.files.forEach(function(file) {
console.log(file.name);
});
});
torrent.on('done', () => {
console.log('done');
torrent.files.forEach(function(file) {
console.log(file.name);
});
}); |
This comment has been minimized.
This comment has been minimized.
|
Thanks @alxhotel, it works. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Latest webtorrent 0.103.0
Windows 10, v10.15.0
Result:
Event metadata? Event ready?