Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
frank-dspeed
@frank-dspeed:matrix.org
[m]
so you was correct it is a TypeError
forest (he/him)
@forestjohnson:cyberia.club
[m]
I'm willing to bet about $5 that simanovv.dev is passng the wrong thing to the webtorrent constructor or init function (which eventually gets passed to parsetorrent as seen above) and its falling through to that last else statement where it throws that error
Good old javascript.
frank-dspeed
@frank-dspeed:matrix.org
[m]
ja we call that now type errors
we even got a new TypeError Constructor
because its nicer to split the general runtime errors from such typeerrors
but webtorrent did not got updated
forest (he/him)
@forestjohnson:cyberia.club
[m]

the name of the error type (TypeError vs Error) is cool and all, but the real way to solve this is with the error message.

First of all, any proper error message will use the word "because". 2nd of all, the reason given in the because should match what the code is doing.

The correct error message would have said something like

parseTorrent() was aborted because it recieved an object containing the properties [statusCode, headers, body, etc etc] but the required property 'infoHash' was missing

frank-dspeed
@frank-dspeed:matrix.org
[m]
nice catch i love that style
i wish there would be more people like you forest
i am always searching for simplicity but i find it no where
thats why i am inventing my own Language at present Stealify Lang
Stealify is a term invented by me and means to steal but do it in a awsome way
the core of stealify lang is a fast ultimative compiler feedback with such nice errors as you demonstrated just now
Stealify aims to teach coders while coding via fast compiler feedback even on runtime
You inspired me to now add a new position i need people who write good meaningfull error messages
Eren Yagdiran
@m00dy
hello
Is there any benchmark for this project out there
or has anyone built a streaming service on the top of this ?
forest (he/him)
@forestjohnson:cyberia.club
[m]
WebTorrent doesn't really work for streaming video
BitTorrent was designed to transmit large static files -- the entire content of the file must be known before the swarm starts sharing pieces of the file
In that way, it's not suitable for streaming
I have heard of some other projects that may have used bits and pieces of WebTorrent for video streaming .. Here is one https://github.com/Novage/p2p-media-loader
Eren Yagdiran
@m00dy
thank you
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <12Nyzoka> Hi friends ! :) on webtorrent desktop, it's possible to add a torrent without start the download by default ? 🤔Thx :)
frank-dspeed
@frank-dspeed:matrix.org
[m]
is any one in here running on ubuntu core or at last a linux distro with snapd installed? On a Device that supports pinch zoom?
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <06Jeff> Hey folks. What would be a good way to pre-load a list of magnets? I have a list and I want to smoothly load the videos, but I'd like to load 5 at once, since they're small chunks
irc-discord-bot <06Jeff> I was thinking of creating 5 video tags and load all chunks, but keeping the next 4 hidden, then excluding when each video reachs the end
irc-discord-bot <06Jeff> But I'm not sure how smooth that would be
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <04BJSamuel> Hi, I have this magnet URI magnet:?xt=urn:btih:BCW2LJ5GDA5K4HQJ3AY56Z2I2VTASWQQ&dn=Sintel&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969 from qBittorrent I am able to get the files but not with this library. can you pls help me? I observed that all the magnet uris in the document ends with an extension. Do I need to change my uri to any other format??
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <12angry.robot> @Jeff what exactly are you looking for? Why not just add each of the magnets to the client and swap out/update the video tag when necessary?
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <06Jeff> Well, that's what I'm doing. I've used a mediarecorder for generating 30s of video. When it reaches 30s length, I transform it into a blob and create seed it using webtorrent.
irc-discord-bot <06Jeff> Then clear the buffer, start recording another 30s and so on.
irc-discord-bot <06Jeff> The thing is: it works for the first magnet, but the subsequent are not working and I'm not sure why. Possibly an issue while changing the magnet uri for the video OR not being able to download the new chunk in time OR some issue on the streamer side, when creating multiple torrent seeds.
irc-discord-bot <06Jeff> But the blobs have size, the video is fine, it works fine for the first 30s and the magnet uri is being generated without errors
irc-discord-bot <06Jeff> If this works, we can call this a live streaming with 30s of delay. If I improve it somehow to 15s it would be very acceptable.
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <06Jeff> I'm using python for the signaling server, but def will change to node, to use webtorrent hybrid as well.
valverde82
@valverde-marcelo
@06Jeff @m00dy @forestjohnson:cyberia.club I had started a streaming project using webtorrent. If anyone is interested in continuing it, here's the repository: https://github.com/valverde-marcelo/liveontorrent
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <12angry.robot> @Jeff you can decrease the delay by shortening the clip duration.
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <06Jeff> I couldn't find the ideal length yet
irc-discord-bot <06Jeff> @valverde-marcelo looks really great!
irc-discord-bot <06Jeff> Congrats!
irc-discord-bot <06Jeff> it's almost the same I've been doing. But for some reason, it only creates the first slice successfully
valverde82
@valverde-marcelo
@06Jeff i use slice 5s
valverde82
@valverde-marcelo
@06Jeff please see https://github.com/valverde-marcelo/liveontorrent/blob/main/js/seed.js
Line 220 call the function "record_and_send" every 5s.
Line 240 on data availabe -> put the piece on array "chuncks"
Line 260 set to recorder stop after 5s
Line 250 on recorder stop, create a blob with all pieces in array "chunks" and seed
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <06Jeff> Sim, isso já fazia aqui. Não com 5s, mas 15s.
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <06Jeff> Does udp trackers really work for wt?
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <10nateoWid> Hi. Does WebTorrent work in a browser? I’ve seen it a couple of times, although didn’t find a way to watch something directly in my browser without downloading the actual desktop app. Thanks
forest (he/him)
@forestjohnson:cyberia.club
[m]
yes, see the demo on https://webtorrent.io/, it loads a video and plays it in the browser
irc-gitter-bot
@irc-gitter-bot
irc-discord-bot <10chovyfu> How can I get seeders and leechers info from an infohash? I’m using nodejs.