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 upHow to specify custom announce urls? #1011
Comments
This comment has been minimized.
This comment has been minimized.
|
Why do you say it doesn't work? Is this in the browser or Node? Do you get any errors? |
This comment has been minimized.
This comment has been minimized.
edit: weird. This took 5+ minutes to load. On webtorrent.io site it loads immediately for me. |
This comment has been minimized.
This comment has been minimized.
|
If you find out any info about why it took so long, please share. |
This comment has been minimized.
This comment has been minimized.
|
The only difference I can see is I'm using vue.js -- perhaps that is causing severe slowdown? I'm using the same bootstrap socket servers you are. So its very odd. I will do a simple test w/o vue.js and see if that's the issue. |
This comment has been minimized.
This comment has been minimized.
|
It could be because webtorrent.io is using a web seed as a fallback. Try adding this to your magnet link:
|
This comment has been minimized.
This comment has been minimized.
|
I don't know. I just tried again and it still never loads although it does start to download but does not play right away. I'm guessing it has to wait for the entire file to download for some reason.
Above is a simple test which rules out vue.js being my problem. I tried the 2nd url (with ws fallback) and it still seems to not play until the entire file is downloaded (i did not wait that long). If I do
The above test.html seems to be missing some options perhaps? I could not tell by looking at webtorrent.io source what options (if any) you are passing to 20 seconds on the cli and basically never on web. I gotta be missing something here. Tried in both Canary and Chrome. Both have same issues. |
This comment has been minimized.
This comment has been minimized.
|
I did not see this error with
|
This comment has been minimized.
This comment has been minimized.
|
Ahh, are you running this page with a Try creating a server and running from http://localhost instead. |
This comment has been minimized.
This comment has been minimized.
|
Yeah. I realized that right away. I am using Like i said cli interface starts playing right away in VLC. I even cloned the repo and built the debug version to make sure I have the latest. I'm curious if you want that test and paste in the magnet does it work consistently for you? The webtorrent.io site works fine and so does instant.io but not when web server is running locally. One difference I observed between your webinstant.io and my test is that when i watch the websocket frames in the |
This comment has been minimized.
This comment has been minimized.
|
Only diff i could find is that you're adding this tracker option with ice servers. What is that?
rtcConfig (ice servers)
When I tried adding this your demo movie plays right away for me. But other magnet urls I try still suffer from same problem where downloading never starts. What are these ice servers used for and where can I read more about setting one up? |
This comment has been minimized.
This comment has been minimized.
|
Sounds like you're on a network with a restrictive firewall or NAT. This makes it harder for peers to connect to you. Those "ice servers" are also known as TURN servers and they're a way to help WebRTC connections succeed even when there's a firewall or NAT that is preventing the direct P2P connection from working. You can make an account with Twilio and sign up for this service (https://www.twilio.com/stun-turn) and they'll run the server for you. That's what I currently do. You can also try to install a TURN server yourself, but I hear it's tricky. If you include these in the rtcConfig option, then webtorrent will include them in the RTCPeerConnection (webrtc constructor) option, so the WebRTC connections are more likely to succeed. TURN servers are only used as a fallback, when P2P connections fail. TURN is essentially a central server. |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
This doesn't work for me...I'm probably not specifying the announce urls properly but I don't really know what they should be.
Using browser version from CDN.