Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get "invalid torrent indetifier" when using torrent as buffer #1661

Closed
Naor1Levi opened this issue Jun 30, 2019 · 5 comments
Closed

get "invalid torrent indetifier" when using torrent as buffer #1661

Naor1Levi opened this issue Jun 30, 2019 · 5 comments

Comments

@Naor1Levi
Copy link

@Naor1Levi Naor1Levi commented Jun 30, 2019

webTorrent version: the new (just downloaded)

i am using webtorrent in java script (front end)
browser: chrome/firefox (both dont work)
client.add(torrentId, function (torrent) { // Torrents can contain many files. Let's use the .mp4 file var file = torrent.files.find(function (file) { if (file.name.endsWith('.mp4')){ console.log('success finding .mp4'); return file.name.endsWith('.mp4') } })
expected result: the player will appear with the video
actual results: got an error

@alxhotel

This comment has been minimized.

Copy link
Member

@alxhotel alxhotel commented Jun 30, 2019

Can you post the torrent identifier you are using?

Can you also post the details of the error thrown (such as the trace)?

By the way, based only on the code you have posted, no video is expected to appear (unless you add it to the DOM by, for example, calling renderTo)

@Naor1Levi

This comment has been minimized.

Copy link
Author

@Naor1Levi Naor1Levi commented Jun 30, 2019

  (anonymous) @ webtorrent.min.js:11
  d.run @ webtorrent.min.js:11
  s @ webtorrent.min.js:11
  setTimeout (async)    
  o @ webtorrent.min.js:11
  c.nextTick @ webtorrent.min.js:11
  S @ webtorrent.min.js:11
  playTorrent @ script.js:50
  xhttp.onreadystatechange @ script.js:29
  XMLHttpRequest.send (async)    
  searchTorrent @ script.js:37
  onclick @ (index):16

by the way, i am using a torrent buffer exported from search-torrent-api.
and i appended the video the the body element.

i got this error only when i am using torrent buffer, torrent files are working

@Naor1Levi

This comment has been minimized.

Copy link
Author

@Naor1Levi Naor1Levi commented Jul 1, 2019

Can someone give an example of downloadTorrent feature? That I will understand how it work

@SilentBot1

This comment has been minimized.

Copy link
Member

@SilentBot1 SilentBot1 commented Jul 20, 2019

Hi @Naor1Levi

Without an example of the buffer returned from search-torrent-api's downloadTorrent function, we're going to be unable to help you with this issue as I'm unfamiliar with the library.

Note: if you do provide a buffer, ensure it's not of copyrighted content.

Kind regards
Brad

@no-response

This comment has been minimized.

Copy link

@no-response no-response bot commented Jul 27, 2019

This issue has been automatically closed because there was no response to a request for more information from the issue opener. Please leave a comment or open a new issue if you have additional information related to this issue.

@no-response no-response bot closed this Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.